OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_ARM64_CODE_STUBS_ARM64_H_ | 5 #ifndef V8_ARM64_CODE_STUBS_ARM64_H_ |
6 #define V8_ARM64_CODE_STUBS_ARM64_H_ | 6 #define V8_ARM64_CODE_STUBS_ARM64_H_ |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // We patch the two first instructions of the stub back and forth between an | 124 // We patch the two first instructions of the stub back and forth between an |
125 // adr and branch when we start and stop incremental heap marking. | 125 // adr and branch when we start and stop incremental heap marking. |
126 // The branch is | 126 // The branch is |
127 // b label | 127 // b label |
128 // The adr is | 128 // The adr is |
129 // adr xzr label | 129 // adr xzr label |
130 // so effectively a nop. | 130 // so effectively a nop. |
131 static void Patch(Code* stub, Mode mode) { | 131 static void Patch(Code* stub, Mode mode) { |
132 // We are going to patch the two first instructions of the stub. | 132 // We are going to patch the two first instructions of the stub. |
133 PatchingAssembler patcher( | 133 PatchingAssembler patcher( |
| 134 stub->GetIsolate(), |
134 reinterpret_cast<Instruction*>(stub->instruction_start()), 2); | 135 reinterpret_cast<Instruction*>(stub->instruction_start()), 2); |
135 Instruction* instr1 = patcher.InstructionAt(0); | 136 Instruction* instr1 = patcher.InstructionAt(0); |
136 Instruction* instr2 = patcher.InstructionAt(kInstructionSize); | 137 Instruction* instr2 = patcher.InstructionAt(kInstructionSize); |
137 // Instructions must be either 'adr' or 'b'. | 138 // Instructions must be either 'adr' or 'b'. |
138 DCHECK(instr1->IsPCRelAddressing() || instr1->IsUncondBranchImm()); | 139 DCHECK(instr1->IsPCRelAddressing() || instr1->IsUncondBranchImm()); |
139 DCHECK(instr2->IsPCRelAddressing() || instr2->IsUncondBranchImm()); | 140 DCHECK(instr2->IsPCRelAddressing() || instr2->IsUncondBranchImm()); |
140 // Retrieve the offsets to the labels. | 141 // Retrieve the offsets to the labels. |
141 auto offset_to_incremental_noncompacting = | 142 auto offset_to_incremental_noncompacting = |
142 static_cast<int32_t>(instr1->ImmPCOffset()); | 143 static_cast<int32_t>(instr1->ImmPCOffset()); |
143 auto offset_to_incremental_compacting = | 144 auto offset_to_incremental_compacting = |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; | 382 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; |
382 | 383 |
383 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); | 384 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
384 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); | 385 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); |
385 }; | 386 }; |
386 | 387 |
387 } // namespace internal | 388 } // namespace internal |
388 } // namespace v8 | 389 } // namespace v8 |
389 | 390 |
390 #endif // V8_ARM64_CODE_STUBS_ARM64_H_ | 391 #endif // V8_ARM64_CODE_STUBS_ARM64_H_ |
OLD | NEW |