| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 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/longjump.h" | 10 #include "vm/longjump.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // object pool, but the HashMap uses 0 to indicate not found. | 42 // object pool, but the HashMap uses 0 to indicate not found. |
| 43 | 43 |
| 44 object_pool_.Add(Bool::True(), Heap::kOld); | 44 object_pool_.Add(Bool::True(), Heap::kOld); |
| 45 patchable_pool_entries_.Add(kNotPatchable); | 45 patchable_pool_entries_.Add(kNotPatchable); |
| 46 object_pool_index_table_.Insert(ObjIndexPair(Bool::True().raw(), 1)); | 46 object_pool_index_table_.Insert(ObjIndexPair(Bool::True().raw(), 1)); |
| 47 | 47 |
| 48 object_pool_.Add(Bool::False(), Heap::kOld); | 48 object_pool_.Add(Bool::False(), Heap::kOld); |
| 49 patchable_pool_entries_.Add(kNotPatchable); | 49 patchable_pool_entries_.Add(kNotPatchable); |
| 50 object_pool_index_table_.Insert(ObjIndexPair(Bool::False().raw(), 2)); | 50 object_pool_index_table_.Insert(ObjIndexPair(Bool::False().raw(), 2)); |
| 51 | 51 |
| 52 const Smi& vacant = Smi::Handle(Smi::New(0xfa >> kSmiTagShift)); |
| 53 |
| 52 if (StubCode::UpdateStoreBuffer_entry() != NULL) { | 54 if (StubCode::UpdateStoreBuffer_entry() != NULL) { |
| 53 FindExternalLabel(&StubCode::UpdateStoreBufferLabel(), kNotPatchable); | 55 FindExternalLabel(&StubCode::UpdateStoreBufferLabel(), kNotPatchable); |
| 54 } else { | 56 } else { |
| 55 object_pool_.Add(Object::null_object(), Heap::kOld); | 57 object_pool_.Add(vacant, Heap::kOld); |
| 56 patchable_pool_entries_.Add(kNotPatchable); | 58 patchable_pool_entries_.Add(kNotPatchable); |
| 57 } | 59 } |
| 58 | 60 |
| 59 if (StubCode::CallToRuntime_entry() != NULL) { | 61 if (StubCode::CallToRuntime_entry() != NULL) { |
| 60 FindExternalLabel(&StubCode::CallToRuntimeLabel(), kNotPatchable); | 62 FindExternalLabel(&StubCode::CallToRuntimeLabel(), kNotPatchable); |
| 61 } else { | 63 } else { |
| 62 object_pool_.Add(Object::null_object(), Heap::kOld); | 64 object_pool_.Add(vacant, Heap::kOld); |
| 63 patchable_pool_entries_.Add(kNotPatchable); | 65 patchable_pool_entries_.Add(kNotPatchable); |
| 64 } | 66 } |
| 65 | 67 |
| 66 // Create fixed object pool entry for debugger stub. | 68 // Create fixed object pool entry for debugger stub. |
| 67 if (StubCode::BreakpointRuntime_entry() != NULL) { | 69 if (StubCode::BreakpointRuntime_entry() != NULL) { |
| 68 intptr_t index = | 70 intptr_t index = |
| 69 FindExternalLabel(&StubCode::BreakpointRuntimeLabel(), kNotPatchable); | 71 FindExternalLabel(&StubCode::BreakpointRuntimeLabel(), kNotPatchable); |
| 70 ASSERT(index == kBreakpointRuntimeCPIndex); | 72 ASSERT(index == kBreakpointRuntimeCPIndex); |
| 71 } else { | 73 } else { |
| 72 object_pool_.Add(Object::null_object(), Heap::kOld); | 74 object_pool_.Add(vacant, Heap::kOld); |
| 73 patchable_pool_entries_.Add(kNotPatchable); | 75 patchable_pool_entries_.Add(kNotPatchable); |
| 74 } | 76 } |
| 75 } | 77 } |
| 76 } | 78 } |
| 77 | 79 |
| 78 | 80 |
| 79 void Assembler::InitializeMemoryWithBreakpoints(uword data, intptr_t length) { | 81 void Assembler::InitializeMemoryWithBreakpoints(uword data, intptr_t length) { |
| 80 ASSERT(Utils::IsAligned(data, 4)); | 82 ASSERT(Utils::IsAligned(data, 4)); |
| 81 ASSERT(Utils::IsAligned(length, 4)); | 83 ASSERT(Utils::IsAligned(length, 4)); |
| 82 const uword end = data + length; | 84 const uword end = data + length; |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 AddImmediate(temp_reg, temp_reg, class_offset, PP); | 952 AddImmediate(temp_reg, temp_reg, class_offset, PP); |
| 951 ldr(TMP, Address(temp_reg, count_field_offset)); | 953 ldr(TMP, Address(temp_reg, count_field_offset)); |
| 952 AddImmediate(TMP, TMP, 1, PP); | 954 AddImmediate(TMP, TMP, 1, PP); |
| 953 str(TMP, Address(temp_reg, count_field_offset)); | 955 str(TMP, Address(temp_reg, count_field_offset)); |
| 954 } | 956 } |
| 955 } | 957 } |
| 956 | 958 |
| 957 } // namespace dart | 959 } // namespace dart |
| 958 | 960 |
| 959 #endif // defined TARGET_ARCH_ARM64 | 961 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |