OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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_X64) | 6 #if defined(TARGET_ARCH_X64) |
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 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1536 EmitUint8(0xB8 | (dst & 7)); | 1536 EmitUint8(0xB8 | (dst & 7)); |
1537 buffer_.EmitObject(object); | 1537 buffer_.EmitObject(object); |
1538 } | 1538 } |
1539 } | 1539 } |
1540 | 1540 |
1541 | 1541 |
1542 void Assembler::StoreObject(const Address& dst, const Object& object) { | 1542 void Assembler::StoreObject(const Address& dst, const Object& object) { |
1543 if (object.IsSmi() || object.IsNull()) { | 1543 if (object.IsSmi() || object.IsNull()) { |
1544 movq(dst, Immediate(reinterpret_cast<int64_t>(object.raw()))); | 1544 movq(dst, Immediate(reinterpret_cast<int64_t>(object.raw()))); |
1545 } else { | 1545 } else { |
| 1546 ASSERT(object.IsOld()); |
1546 LoadObject(TMP, object); | 1547 LoadObject(TMP, object); |
1547 movq(dst, TMP); | 1548 movq(dst, TMP); |
1548 } | 1549 } |
1549 } | 1550 } |
1550 | 1551 |
1551 | 1552 |
1552 void Assembler::PushObject(const Object& object) { | 1553 void Assembler::PushObject(const Object& object) { |
1553 if (object.IsSmi() || object.IsNull()) { | 1554 if (object.IsSmi() || object.IsNull()) { |
1554 pushq(Immediate(reinterpret_cast<int64_t>(object.raw()))); | 1555 pushq(Immediate(reinterpret_cast<int64_t>(object.raw()))); |
1555 } else { | 1556 } else { |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1984 | 1985 |
1985 const char* Assembler::XmmRegisterName(XmmRegister reg) { | 1986 const char* Assembler::XmmRegisterName(XmmRegister reg) { |
1986 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 1987 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
1987 return xmm_reg_names[reg]; | 1988 return xmm_reg_names[reg]; |
1988 } | 1989 } |
1989 | 1990 |
1990 | 1991 |
1991 } // namespace dart | 1992 } // namespace dart |
1992 | 1993 |
1993 #endif // defined TARGET_ARCH_X64 | 1994 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |