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 "arm64/assembler-arm64.h" | 8 #include "arm64/assembler-arm64.h" |
9 #include "cpu.h" | 9 #include "cpu.h" |
10 #include "debug.h" | 10 #include "debug.h" |
(...skipping 697 matching lines...) Loading... |
708 ASSERT(rmode_ == RelocInfo::CELL); | 708 ASSERT(rmode_ == RelocInfo::CELL); |
709 return Cell::FromValueAddress(Memory::Address_at(pc_)); | 709 return Cell::FromValueAddress(Memory::Address_at(pc_)); |
710 } | 710 } |
711 | 711 |
712 | 712 |
713 void RelocInfo::set_target_cell(Cell* cell, WriteBarrierMode mode) { | 713 void RelocInfo::set_target_cell(Cell* cell, WriteBarrierMode mode) { |
714 UNIMPLEMENTED(); | 714 UNIMPLEMENTED(); |
715 } | 715 } |
716 | 716 |
717 | 717 |
718 static const int kCodeAgeSequenceSize = 5 * kInstructionSize; | 718 static const int kNoCodeAgeSequenceLength = 5 * kInstructionSize; |
719 static const int kCodeAgeStubEntryOffset = 3 * kInstructionSize; | 719 static const int kCodeAgeStubEntryOffset = 3 * kInstructionSize; |
720 | 720 |
721 | 721 |
722 Handle<Object> RelocInfo::code_age_stub_handle(Assembler* origin) { | 722 Handle<Object> RelocInfo::code_age_stub_handle(Assembler* origin) { |
723 UNREACHABLE(); // This should never be reached on ARM64. | 723 UNREACHABLE(); // This should never be reached on ARM64. |
724 return Handle<Object>(); | 724 return Handle<Object>(); |
725 } | 725 } |
726 | 726 |
727 | 727 |
728 Code* RelocInfo::code_age_stub() { | 728 Code* RelocInfo::code_age_stub() { |
729 ASSERT(rmode_ == RelocInfo::CODE_AGE_SEQUENCE); | 729 ASSERT(rmode_ == RelocInfo::CODE_AGE_SEQUENCE); |
730 ASSERT(!Code::IsYoungSequence(pc_)); | |
731 // Read the stub entry point from the code age sequence. | 730 // Read the stub entry point from the code age sequence. |
732 Address stub_entry_address = pc_ + kCodeAgeStubEntryOffset; | 731 Address stub_entry_address = pc_ + kCodeAgeStubEntryOffset; |
733 return Code::GetCodeFromTargetAddress(Memory::Address_at(stub_entry_address)); | 732 return Code::GetCodeFromTargetAddress(Memory::Address_at(stub_entry_address)); |
734 } | 733 } |
735 | 734 |
736 | 735 |
737 void RelocInfo::set_code_age_stub(Code* stub) { | 736 void RelocInfo::set_code_age_stub(Code* stub) { |
738 ASSERT(rmode_ == RelocInfo::CODE_AGE_SEQUENCE); | 737 ASSERT(rmode_ == RelocInfo::CODE_AGE_SEQUENCE); |
739 ASSERT(!Code::IsYoungSequence(pc_)); | 738 ASSERT(!Code::IsYoungSequence(stub->GetIsolate(), pc_)); |
740 // Overwrite the stub entry point in the code age sequence. This is loaded as | 739 // Overwrite the stub entry point in the code age sequence. This is loaded as |
741 // a literal so there is no need to call FlushICache here. | 740 // a literal so there is no need to call FlushICache here. |
742 Address stub_entry_address = pc_ + kCodeAgeStubEntryOffset; | 741 Address stub_entry_address = pc_ + kCodeAgeStubEntryOffset; |
743 Memory::Address_at(stub_entry_address) = stub->instruction_start(); | 742 Memory::Address_at(stub_entry_address) = stub->instruction_start(); |
744 } | 743 } |
745 | 744 |
746 | 745 |
747 Address RelocInfo::call_address() { | 746 Address RelocInfo::call_address() { |
748 ASSERT((IsJSReturn(rmode()) && IsPatchedReturnSequence()) || | 747 ASSERT((IsJSReturn(rmode()) && IsPatchedReturnSequence()) || |
749 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); | 748 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); |
(...skipping 448 matching lines...) Loading... |
1198 | 1197 |
1199 | 1198 |
1200 void Assembler::ClearRecordedAstId() { | 1199 void Assembler::ClearRecordedAstId() { |
1201 recorded_ast_id_ = TypeFeedbackId::None(); | 1200 recorded_ast_id_ = TypeFeedbackId::None(); |
1202 } | 1201 } |
1203 | 1202 |
1204 | 1203 |
1205 } } // namespace v8::internal | 1204 } } // namespace v8::internal |
1206 | 1205 |
1207 #endif // V8_ARM64_ASSEMBLER_ARM64_INL_H_ | 1206 #endif // V8_ARM64_ASSEMBLER_ARM64_INL_H_ |
OLD | NEW |