Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Side by Side Diff: runtime/vm/assembler_ia32.cc

Issue 10543013: More code for ia32, more shared code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/heap.h" 9 #include "vm/heap.h"
10 #include "vm/memory_region.h" 10 #include "vm/memory_region.h"
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 1274
1275 1275
1276 void Assembler::cmpxchgl(const Address& address, Register reg) { 1276 void Assembler::cmpxchgl(const Address& address, Register reg) {
1277 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 1277 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
1278 EmitUint8(0x0F); 1278 EmitUint8(0x0F);
1279 EmitUint8(0xB1); 1279 EmitUint8(0xB1);
1280 EmitOperand(reg, address); 1280 EmitOperand(reg, address);
1281 } 1281 }
1282 1282
1283 1283
1284 void Assembler::CompareRegisters(Register a, Register b) {
1285 cmpl(a, b);
1286 }
1287
1288
1289 void Assembler::MoveRegister(Register to, Register from) {
1290 if (to != from) {
1291 movl(to, from);
1292 }
1293 }
1294
1295
1284 void Assembler::AddImmediate(Register reg, const Immediate& imm) { 1296 void Assembler::AddImmediate(Register reg, const Immediate& imm) {
1285 int value = imm.value(); 1297 int value = imm.value();
1286 if (value > 0) { 1298 if (value > 0) {
1287 if (value == 1) { 1299 if (value == 1) {
1288 incl(reg); 1300 incl(reg);
1289 } else if (value != 0) { 1301 } else if (value != 0) {
1290 addl(reg, imm); 1302 addl(reg, imm);
1291 } 1303 }
1292 } else if (value < 0) { 1304 } else if (value < 0) {
1293 value = -value; 1305 value = -value;
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1633 comments.SetCommentAt(i, comments_[i]->comment()); 1645 comments.SetCommentAt(i, comments_[i]->comment());
1634 } 1646 }
1635 1647
1636 return comments; 1648 return comments;
1637 } 1649 }
1638 1650
1639 1651
1640 } // namespace dart 1652 } // namespace dart
1641 1653
1642 #endif // defined TARGET_ARCH_IA32 1654 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698