| OLD | NEW |
| 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 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1293 value = -value; | 1293 value = -value; |
| 1294 if (value == 1) { | 1294 if (value == 1) { |
| 1295 decl(reg); | 1295 decl(reg); |
| 1296 } else if (value != 0) { | 1296 } else if (value != 0) { |
| 1297 subl(reg, Immediate(value)); | 1297 subl(reg, Immediate(value)); |
| 1298 } | 1298 } |
| 1299 } | 1299 } |
| 1300 } | 1300 } |
| 1301 | 1301 |
| 1302 | 1302 |
| 1303 void Assembler::Drop(intptr_t stack_elements) { |
| 1304 if (stack_elements > 0) { |
| 1305 addl(ESP, Immediate(stack_elements * kWordSize)); |
| 1306 } |
| 1307 } |
| 1308 |
| 1309 |
| 1303 void Assembler::LoadObject(Register dst, const Object& object) { | 1310 void Assembler::LoadObject(Register dst, const Object& object) { |
| 1304 if (object.IsSmi()) { | 1311 if (object.IsSmi()) { |
| 1305 movl(dst, Immediate(reinterpret_cast<int32_t>(object.raw()))); | 1312 movl(dst, Immediate(reinterpret_cast<int32_t>(object.raw()))); |
| 1306 } else { | 1313 } else { |
| 1307 ASSERT(object.IsZoneHandle()); | 1314 ASSERT(object.IsZoneHandle()); |
| 1308 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | 1315 AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
| 1309 EmitUint8(0xB8 + dst); | 1316 EmitUint8(0xB8 + dst); |
| 1310 buffer_.EmitObject(object); | 1317 buffer_.EmitObject(object); |
| 1311 } | 1318 } |
| 1312 } | 1319 } |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1616 comments.SetCommentAt(i, comments_[i]->comment()); | 1623 comments.SetCommentAt(i, comments_[i]->comment()); |
| 1617 } | 1624 } |
| 1618 | 1625 |
| 1619 return comments; | 1626 return comments; |
| 1620 } | 1627 } |
| 1621 | 1628 |
| 1622 | 1629 |
| 1623 } // namespace dart | 1630 } // namespace dart |
| 1624 | 1631 |
| 1625 #endif // defined TARGET_ARCH_IA32 | 1632 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |