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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 | 56 |
57 void Assembler::call(Label* label) { | 57 void Assembler::call(Label* label) { |
58 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | 58 AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
59 static const int kSize = 5; | 59 static const int kSize = 5; |
60 EmitUint8(0xE8); | 60 EmitUint8(0xE8); |
61 EmitLabel(label, kSize); | 61 EmitLabel(label, kSize); |
62 } | 62 } |
63 | 63 |
64 | 64 |
65 void Assembler::LoadExternalLabel(Register dst, | |
66 const ExternalLabel* label, | |
67 Patchability patchable) { | |
68 const int32_t offset = ObjectPool::element_offset( | |
69 object_pool_wrapper_.FindExternalLabel(label, patchable)); | |
70 LoadWordFromPoolOffset(dst, offset - kHeapObjectTag); | |
71 } | |
72 | |
73 | |
74 void Assembler::LoadNativeEntry(Register dst, | 65 void Assembler::LoadNativeEntry(Register dst, |
75 const ExternalLabel* label, | 66 const ExternalLabel* label, |
76 Patchability patchable) { | 67 Patchability patchable) { |
77 const int32_t offset = ObjectPool::element_offset( | 68 const int32_t offset = ObjectPool::element_offset( |
78 object_pool_wrapper_.FindNativeEntry(label, patchable)); | 69 object_pool_wrapper_.FindNativeEntry(label, patchable)); |
79 LoadWordFromPoolOffset(dst, offset - kHeapObjectTag); | 70 LoadWordFromPoolOffset(dst, offset - kHeapObjectTag); |
80 } | 71 } |
81 | 72 |
82 | 73 |
83 void Assembler::call(const ExternalLabel* label) { | 74 void Assembler::call(const ExternalLabel* label) { |
(...skipping 3892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3976 | 3967 |
3977 | 3968 |
3978 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3969 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
3979 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 3970 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
3980 return xmm_reg_names[reg]; | 3971 return xmm_reg_names[reg]; |
3981 } | 3972 } |
3982 | 3973 |
3983 } // namespace dart | 3974 } // namespace dart |
3984 | 3975 |
3985 #endif // defined TARGET_ARCH_X64 | 3976 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |