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" | 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/cpu.h" | 9 #include "vm/cpu.h" |
10 #include "vm/heap.h" | 10 #include "vm/heap.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 // object pool, but the HashMap uses 0 to indicate not found. | 38 // object pool, but the HashMap uses 0 to indicate not found. |
39 | 39 |
40 object_pool_.Add(Bool::True(), Heap::kOld); | 40 object_pool_.Add(Bool::True(), Heap::kOld); |
41 patchable_pool_entries_.Add(kNotPatchable); | 41 patchable_pool_entries_.Add(kNotPatchable); |
42 object_pool_index_table_.Insert(ObjIndexPair(Bool::True().raw(), 1)); | 42 object_pool_index_table_.Insert(ObjIndexPair(Bool::True().raw(), 1)); |
43 | 43 |
44 object_pool_.Add(Bool::False(), Heap::kOld); | 44 object_pool_.Add(Bool::False(), Heap::kOld); |
45 patchable_pool_entries_.Add(kNotPatchable); | 45 patchable_pool_entries_.Add(kNotPatchable); |
46 object_pool_index_table_.Insert(ObjIndexPair(Bool::False().raw(), 2)); | 46 object_pool_index_table_.Insert(ObjIndexPair(Bool::False().raw(), 2)); |
47 | 47 |
| 48 const Smi& vacant = Smi::Handle(Smi::New(0xfa >> kSmiTagShift)); |
| 49 |
48 if (StubCode::UpdateStoreBuffer_entry() != NULL) { | 50 if (StubCode::UpdateStoreBuffer_entry() != NULL) { |
49 FindExternalLabel(&StubCode::UpdateStoreBufferLabel(), kNotPatchable); | 51 FindExternalLabel(&StubCode::UpdateStoreBufferLabel(), kNotPatchable); |
50 } else { | 52 } else { |
51 object_pool_.Add(Object::null_object(), Heap::kOld); | 53 object_pool_.Add(vacant, Heap::kOld); |
52 patchable_pool_entries_.Add(kNotPatchable); | 54 patchable_pool_entries_.Add(kNotPatchable); |
53 } | 55 } |
54 | 56 |
55 if (StubCode::CallToRuntime_entry() != NULL) { | 57 if (StubCode::CallToRuntime_entry() != NULL) { |
56 FindExternalLabel(&StubCode::CallToRuntimeLabel(), kNotPatchable); | 58 FindExternalLabel(&StubCode::CallToRuntimeLabel(), kNotPatchable); |
57 } else { | 59 } else { |
58 object_pool_.Add(Object::null_object(), Heap::kOld); | 60 object_pool_.Add(vacant, Heap::kOld); |
59 patchable_pool_entries_.Add(kNotPatchable); | 61 patchable_pool_entries_.Add(kNotPatchable); |
60 } | 62 } |
61 | 63 |
62 // Create fixed object pool entry for debugger stub. | 64 // Create fixed object pool entry for debugger stub. |
63 if (StubCode::BreakpointRuntime_entry() != NULL) { | 65 if (StubCode::BreakpointRuntime_entry() != NULL) { |
64 intptr_t index = | 66 intptr_t index = |
65 FindExternalLabel(&StubCode::BreakpointRuntimeLabel(), kNotPatchable); | 67 FindExternalLabel(&StubCode::BreakpointRuntimeLabel(), kNotPatchable); |
66 ASSERT(index == kBreakpointRuntimeCPIndex); | 68 ASSERT(index == kBreakpointRuntimeCPIndex); |
67 } else { | 69 } else { |
68 object_pool_.Add(Object::null_object(), Heap::kOld); | 70 object_pool_.Add(vacant, Heap::kOld); |
69 patchable_pool_entries_.Add(kNotPatchable); | 71 patchable_pool_entries_.Add(kNotPatchable); |
70 } | 72 } |
71 } | 73 } |
72 } | 74 } |
73 | 75 |
74 | 76 |
75 void Assembler::InitializeMemoryWithBreakpoints(uword data, intptr_t length) { | 77 void Assembler::InitializeMemoryWithBreakpoints(uword data, intptr_t length) { |
76 memset(reinterpret_cast<void*>(data), Instr::kBreakPointInstruction, length); | 78 memset(reinterpret_cast<void*>(data), Instr::kBreakPointInstruction, length); |
77 } | 79 } |
78 | 80 |
(...skipping 3185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3264 | 3266 |
3265 | 3267 |
3266 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3268 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
3267 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 3269 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
3268 return xmm_reg_names[reg]; | 3270 return xmm_reg_names[reg]; |
3269 } | 3271 } |
3270 | 3272 |
3271 } // namespace dart | 3273 } // namespace dart |
3272 | 3274 |
3273 #endif // defined TARGET_ARCH_X64 | 3275 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |