Chromium Code Reviews| 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(new_size > old_size); | |
| 49 DCHECK(old_base + old_size >= wasm_memory_reference()); | |
| 50 Address updated_reference = wasm_memory_reference() + (new_base - old_base); | |
| 51 DCHECK(new_base + new_size >= updated_reference); | |
| 52 Assembler::set_target_address_at(isolate_, pc_, host_, updated_reference, | |
|
Yang
2016/03/08 05:41:50
There doesn't seem to be anything platform depende
gdeepti1
2016/03/09 04:01:43
Added it in platform specific headers because that
gdeepti1
2016/03/11 03:55:51
Update from previous comment - the bounds checking
| |
| 53 icache_flush_mode); | |
| 54 } | |
| 44 | 55 |
| 45 inline int CPURegister::code() const { | 56 inline int CPURegister::code() const { |
| 46 DCHECK(IsValid()); | 57 DCHECK(IsValid()); |
| 47 return reg_code; | 58 return reg_code; |
| 48 } | 59 } |
| 49 | 60 |
| 50 | 61 |
| 51 inline CPURegister::RegisterType CPURegister::type() const { | 62 inline CPURegister::RegisterType CPURegister::type() const { |
| 52 DCHECK(IsValidOrNone()); | 63 DCHECK(IsValidOrNone()); |
| 53 return reg_type; | 64 return reg_type; |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 686 int RelocInfo::target_address_size() { | 697 int RelocInfo::target_address_size() { |
| 687 return kPointerSize; | 698 return kPointerSize; |
| 688 } | 699 } |
| 689 | 700 |
| 690 | 701 |
| 691 Address RelocInfo::target_address() { | 702 Address RelocInfo::target_address() { |
| 692 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); | 703 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); |
| 693 return Assembler::target_address_at(pc_, host_); | 704 return Assembler::target_address_at(pc_, host_); |
| 694 } | 705 } |
| 695 | 706 |
| 707 Address RelocInfo::wasm_memory_reference() { | |
| 708 DCHECK(IsWasmMemoryReference(rmode_)); | |
| 709 return Assembler::target_address_at(pc_, host_); | |
| 710 } | |
| 696 | 711 |
| 697 Address RelocInfo::target_address_address() { | 712 Address RelocInfo::target_address_address() { |
| 698 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) | 713 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) |
| 699 || rmode_ == EMBEDDED_OBJECT | 714 || rmode_ == EMBEDDED_OBJECT |
| 700 || rmode_ == EXTERNAL_REFERENCE); | 715 || rmode_ == EXTERNAL_REFERENCE); |
| 701 return Assembler::target_pointer_address_at(pc_); | 716 return Assembler::target_pointer_address_at(pc_); |
| 702 } | 717 } |
| 703 | 718 |
| 704 | 719 |
| 705 Address RelocInfo::constant_pool_entry_address() { | 720 Address RelocInfo::constant_pool_entry_address() { |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1238 | 1253 |
| 1239 void Assembler::ClearRecordedAstId() { | 1254 void Assembler::ClearRecordedAstId() { |
| 1240 recorded_ast_id_ = TypeFeedbackId::None(); | 1255 recorded_ast_id_ = TypeFeedbackId::None(); |
| 1241 } | 1256 } |
| 1242 | 1257 |
| 1243 | 1258 |
| 1244 } // namespace internal | 1259 } // namespace internal |
| 1245 } // namespace v8 | 1260 } // namespace v8 |
| 1246 | 1261 |
| 1247 #endif // V8_ARM64_ASSEMBLER_ARM64_INL_H_ | 1262 #endif // V8_ARM64_ASSEMBLER_ARM64_INL_H_ |
| OLD | NEW |