OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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" // NOLINT | 5 #include "vm/globals.h" // NOLINT |
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/cpu.h" | 9 #include "vm/cpu.h" |
10 #include "vm/heap.h" | 10 #include "vm/heap.h" |
(...skipping 2792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2803 | 2803 |
2804 void Assembler::LoadWordFromPoolOffset(Register dst, Register pp, | 2804 void Assembler::LoadWordFromPoolOffset(Register dst, Register pp, |
2805 int32_t offset) { | 2805 int32_t offset) { |
2806 // This sequence must be of fixed size. AddressBaseImm32 | 2806 // This sequence must be of fixed size. AddressBaseImm32 |
2807 // forces the address operand to use a fixed-size imm32 encoding. | 2807 // forces the address operand to use a fixed-size imm32 encoding. |
2808 movq(dst, Address::AddressBaseImm32(pp, offset)); | 2808 movq(dst, Address::AddressBaseImm32(pp, offset)); |
2809 } | 2809 } |
2810 | 2810 |
2811 | 2811 |
2812 void Assembler::LoadIsolate(Register dst) { | 2812 void Assembler::LoadIsolate(Register dst) { |
2813 movq(dst, Immediate(reinterpret_cast<uword>(Isolate::Current()))); | 2813 movq(dst, Address(THR, Thread::isolate_offset())); |
2814 } | 2814 } |
2815 | 2815 |
2816 | 2816 |
2817 void Assembler::LoadObject(Register dst, const Object& object, Register pp) { | 2817 void Assembler::LoadObject(Register dst, const Object& object, Register pp) { |
2818 if (CanLoadFromObjectPool(object)) { | 2818 if (CanLoadFromObjectPool(object)) { |
2819 const int32_t offset = | 2819 const int32_t offset = |
2820 Array::element_offset(object_pool_.FindObject(object, kNotPatchable)); | 2820 Array::element_offset(object_pool_.FindObject(object, kNotPatchable)); |
2821 LoadWordFromPoolOffset(dst, pp, offset - kHeapObjectTag); | 2821 LoadWordFromPoolOffset(dst, pp, offset - kHeapObjectTag); |
2822 } else { | 2822 } else { |
2823 ASSERT((Isolate::Current() == Dart::vm_isolate()) || | 2823 ASSERT((Isolate::Current() == Dart::vm_isolate()) || |
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3896 | 3896 |
3897 | 3897 |
3898 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3898 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
3899 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 3899 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
3900 return xmm_reg_names[reg]; | 3900 return xmm_reg_names[reg]; |
3901 } | 3901 } |
3902 | 3902 |
3903 } // namespace dart | 3903 } // namespace dart |
3904 | 3904 |
3905 #endif // defined TARGET_ARCH_X64 | 3905 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |