| 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 2830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2841 LoadWordFromPoolOffset(dst, pp, offset - kHeapObjectTag); | 2841 LoadWordFromPoolOffset(dst, pp, offset - kHeapObjectTag); |
| 2842 } else { | 2842 } else { |
| 2843 ASSERT((Isolate::Current() == Dart::vm_isolate()) || | 2843 ASSERT((Isolate::Current() == Dart::vm_isolate()) || |
| 2844 object.IsSmi() || | 2844 object.IsSmi() || |
| 2845 object.InVMHeap()); | 2845 object.InVMHeap()); |
| 2846 LoadImmediate(dst, Immediate(reinterpret_cast<int64_t>(object.raw())), pp); | 2846 LoadImmediate(dst, Immediate(reinterpret_cast<int64_t>(object.raw())), pp); |
| 2847 } | 2847 } |
| 2848 } | 2848 } |
| 2849 | 2849 |
| 2850 | 2850 |
| 2851 void Assembler::LoadUniqueObject(Register dst, |
| 2852 const Object& object, |
| 2853 Register pp) { |
| 2854 if (CanLoadFromObjectPool(object)) { |
| 2855 const int32_t offset = |
| 2856 ObjectPool::element_offset(object_pool_wrapper_.AddObject(object)); |
| 2857 LoadWordFromPoolOffset(dst, pp, offset - kHeapObjectTag); |
| 2858 } else { |
| 2859 ASSERT((Isolate::Current() == Dart::vm_isolate()) || |
| 2860 object.IsSmi() || |
| 2861 object.InVMHeap()); |
| 2862 LoadImmediate(dst, Immediate(reinterpret_cast<int64_t>(object.raw())), pp); |
| 2863 } |
| 2864 } |
| 2865 |
| 2866 |
| 2851 void Assembler::StoreObject(const Address& dst, const Object& object, | 2867 void Assembler::StoreObject(const Address& dst, const Object& object, |
| 2852 Register pp) { | 2868 Register pp) { |
| 2853 if (CanLoadFromObjectPool(object)) { | 2869 if (CanLoadFromObjectPool(object)) { |
| 2854 LoadObject(TMP, object, pp); | 2870 LoadObject(TMP, object, pp); |
| 2855 movq(dst, TMP); | 2871 movq(dst, TMP); |
| 2856 } else { | 2872 } else { |
| 2857 MoveImmediate(dst, Immediate(reinterpret_cast<int64_t>(object.raw())), pp); | 2873 MoveImmediate(dst, Immediate(reinterpret_cast<int64_t>(object.raw())), pp); |
| 2858 } | 2874 } |
| 2859 } | 2875 } |
| 2860 | 2876 |
| (...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3924 | 3940 |
| 3925 | 3941 |
| 3926 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3942 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
| 3927 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 3943 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
| 3928 return xmm_reg_names[reg]; | 3944 return xmm_reg_names[reg]; |
| 3929 } | 3945 } |
| 3930 | 3946 |
| 3931 } // namespace dart | 3947 } // namespace dart |
| 3932 | 3948 |
| 3933 #endif // defined TARGET_ARCH_X64 | 3949 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |