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_ASSEMBLER_ARM64_INL_H_ | 5 #ifndef V8_ARM64_ASSEMBLER_ARM64_INL_H_ |
6 #define V8_ARM64_ASSEMBLER_ARM64_INL_H_ | 6 #define V8_ARM64_ASSEMBLER_ARM64_INL_H_ |
7 | 7 |
8 #include "src/arm64/assembler-arm64.h" | 8 #include "src/arm64/assembler-arm64.h" |
9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
10 #include "src/debug/debug.h" | 10 #include "src/debug/debug.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 Assembler::set_target_address_at(isolate_, pc_, host_, target, | 34 Assembler::set_target_address_at(isolate_, pc_, host_, target, |
35 icache_flush_mode); | 35 icache_flush_mode); |
36 if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL && | 36 if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL && |
37 IsCodeTarget(rmode_)) { | 37 IsCodeTarget(rmode_)) { |
38 Object* target_code = Code::GetCodeFromTargetAddress(target); | 38 Object* target_code = Code::GetCodeFromTargetAddress(target); |
39 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( | 39 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( |
40 host(), this, HeapObject::cast(target_code)); | 40 host(), this, HeapObject::cast(target_code)); |
41 } | 41 } |
42 } | 42 } |
43 | 43 |
44 void RelocInfo::update_wasm_memory_reference( | |
45 Address old_base, Address new_base, size_t old_size, size_t new_size, | |
46 ICacheFlushMode icache_flush_mode) { | |
47 DCHECK(IsWasmMemoryReference(rmode_)); | |
48 DCHECK(old_base <= wasm_memory_reference() && | |
49 wasm_memory_reference() < old_base + old_size); | |
50 Address updated_reference = new_base + (wasm_memory_reference() - old_base); | |
51 DCHECK(new_base <= updated_reference && | |
52 updated_reference < new_base + new_size); | |
53 Assembler::set_target_address_at(isolate_, pc_, host_, updated_reference, | |
54 icache_flush_mode); | |
55 } | |
56 | |
57 inline int CPURegister::code() const { | 44 inline int CPURegister::code() const { |
58 DCHECK(IsValid()); | 45 DCHECK(IsValid()); |
59 return reg_code; | 46 return reg_code; |
60 } | 47 } |
61 | 48 |
62 | 49 |
63 inline CPURegister::RegisterType CPURegister::type() const { | 50 inline CPURegister::RegisterType CPURegister::type() const { |
64 DCHECK(IsValidOrNone()); | 51 DCHECK(IsValidOrNone()); |
65 return reg_type; | 52 return reg_type; |
66 } | 53 } |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 int RelocInfo::target_address_size() { | 685 int RelocInfo::target_address_size() { |
699 return kPointerSize; | 686 return kPointerSize; |
700 } | 687 } |
701 | 688 |
702 | 689 |
703 Address RelocInfo::target_address() { | 690 Address RelocInfo::target_address() { |
704 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); | 691 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); |
705 return Assembler::target_address_at(pc_, host_); | 692 return Assembler::target_address_at(pc_, host_); |
706 } | 693 } |
707 | 694 |
708 Address RelocInfo::wasm_memory_reference() { | |
709 DCHECK(IsWasmMemoryReference(rmode_)); | |
710 return Assembler::target_address_at(pc_, host_); | |
711 } | |
712 | |
713 Address RelocInfo::target_address_address() { | 695 Address RelocInfo::target_address_address() { |
714 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) | 696 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) |
715 || rmode_ == EMBEDDED_OBJECT | 697 || rmode_ == EMBEDDED_OBJECT |
716 || rmode_ == EXTERNAL_REFERENCE); | 698 || rmode_ == EXTERNAL_REFERENCE); |
717 return Assembler::target_pointer_address_at(pc_); | 699 return Assembler::target_pointer_address_at(pc_); |
718 } | 700 } |
719 | 701 |
720 | 702 |
721 Address RelocInfo::constant_pool_entry_address() { | 703 Address RelocInfo::constant_pool_entry_address() { |
722 DCHECK(IsInConstantPool()); | 704 DCHECK(IsInConstantPool()); |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1254 | 1236 |
1255 void Assembler::ClearRecordedAstId() { | 1237 void Assembler::ClearRecordedAstId() { |
1256 recorded_ast_id_ = TypeFeedbackId::None(); | 1238 recorded_ast_id_ = TypeFeedbackId::None(); |
1257 } | 1239 } |
1258 | 1240 |
1259 | 1241 |
1260 } // namespace internal | 1242 } // namespace internal |
1261 } // namespace v8 | 1243 } // namespace v8 |
1262 | 1244 |
1263 #endif // V8_ARM64_ASSEMBLER_ARM64_INL_H_ | 1245 #endif // V8_ARM64_ASSEMBLER_ARM64_INL_H_ |
OLD | NEW |