| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 object_pool_.Add(Bool::True(), Heap::kOld); | 45 object_pool_.Add(Bool::True(), Heap::kOld); |
| 46 patchable_pool_entries_.Add(kNotPatchable); | 46 patchable_pool_entries_.Add(kNotPatchable); |
| 47 object_pool_index_table_.Insert(ObjIndexPair(Bool::True().raw(), 1)); | 47 object_pool_index_table_.Insert(ObjIndexPair(Bool::True().raw(), 1)); |
| 48 | 48 |
| 49 object_pool_.Add(Bool::False(), Heap::kOld); | 49 object_pool_.Add(Bool::False(), Heap::kOld); |
| 50 patchable_pool_entries_.Add(kNotPatchable); | 50 patchable_pool_entries_.Add(kNotPatchable); |
| 51 object_pool_index_table_.Insert(ObjIndexPair(Bool::False().raw(), 2)); | 51 object_pool_index_table_.Insert(ObjIndexPair(Bool::False().raw(), 2)); |
| 52 | 52 |
| 53 const Smi& vacant = Smi::Handle(Smi::New(0xfa >> kSmiTagShift)); | 53 const Smi& vacant = Smi::Handle(Smi::New(0xfa >> kSmiTagShift)); |
| 54 StubCode* stub_code = Isolate::Current()->stub_code(); |
| 54 | 55 |
| 55 if (StubCode::UpdateStoreBuffer_entry() != NULL) { | 56 if (stub_code->UpdateStoreBuffer_entry() != NULL) { |
| 56 FindExternalLabel(&StubCode::UpdateStoreBufferLabel(), kNotPatchable); | 57 FindExternalLabel(&stub_code->UpdateStoreBufferLabel(), kNotPatchable); |
| 57 } else { | 58 } else { |
| 58 object_pool_.Add(vacant, Heap::kOld); | 59 object_pool_.Add(vacant, Heap::kOld); |
| 59 patchable_pool_entries_.Add(kNotPatchable); | 60 patchable_pool_entries_.Add(kNotPatchable); |
| 60 } | 61 } |
| 61 | 62 |
| 62 if (StubCode::CallToRuntime_entry() != NULL) { | 63 if (StubCode::CallToRuntime_entry() != NULL) { |
| 63 FindExternalLabel(&StubCode::CallToRuntimeLabel(), kNotPatchable); | 64 FindExternalLabel(&StubCode::CallToRuntimeLabel(), kNotPatchable); |
| 64 } else { | 65 } else { |
| 65 object_pool_.Add(vacant, Heap::kOld); | 66 object_pool_.Add(vacant, Heap::kOld); |
| 66 patchable_pool_entries_.Add(kNotPatchable); | 67 patchable_pool_entries_.Add(kNotPatchable); |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 971 } | 972 } |
| 972 // A store buffer update is required. | 973 // A store buffer update is required. |
| 973 if (value != R0) { | 974 if (value != R0) { |
| 974 // Preserve R0. | 975 // Preserve R0. |
| 975 Push(R0); | 976 Push(R0); |
| 976 } | 977 } |
| 977 Push(LR); | 978 Push(LR); |
| 978 if (object != R0) { | 979 if (object != R0) { |
| 979 mov(R0, object); | 980 mov(R0, object); |
| 980 } | 981 } |
| 981 BranchLink(&StubCode::UpdateStoreBufferLabel(), PP); | 982 StubCode* stub_code = Isolate::Current()->stub_code(); |
| 983 BranchLink(&stub_code->UpdateStoreBufferLabel(), PP); |
| 982 Pop(LR); | 984 Pop(LR); |
| 983 if (value != R0) { | 985 if (value != R0) { |
| 984 // Restore R0. | 986 // Restore R0. |
| 985 Pop(R0); | 987 Pop(R0); |
| 986 } | 988 } |
| 987 Bind(&done); | 989 Bind(&done); |
| 988 } | 990 } |
| 989 | 991 |
| 990 | 992 |
| 991 void Assembler::StoreIntoObjectNoBarrier(Register object, | 993 void Assembler::StoreIntoObjectNoBarrier(Register object, |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1381 LoadImmediate(TMP, tags, pp); | 1383 LoadImmediate(TMP, tags, pp); |
| 1382 StoreFieldToOffset(TMP, instance_reg, Object::tags_offset(), pp); | 1384 StoreFieldToOffset(TMP, instance_reg, Object::tags_offset(), pp); |
| 1383 } else { | 1385 } else { |
| 1384 b(failure); | 1386 b(failure); |
| 1385 } | 1387 } |
| 1386 } | 1388 } |
| 1387 | 1389 |
| 1388 } // namespace dart | 1390 } // namespace dart |
| 1389 | 1391 |
| 1390 #endif // defined TARGET_ARCH_ARM64 | 1392 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |