Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: src/a64/assembler-a64-inl.h

Issue 153923005: A64: Synchronize with r17525. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/v8.h ('k') | src/a64/code-stubs-a64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 Address RelocInfo::target_address() { 601 Address RelocInfo::target_address() {
602 ASSERT(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); 602 ASSERT(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_));
603 return Assembler::target_address_at(pc_); 603 return Assembler::target_address_at(pc_);
604 } 604 }
605 605
606 606
607 Address RelocInfo::target_address_address() { 607 Address RelocInfo::target_address_address() {
608 ASSERT(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) 608 ASSERT(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)
609 || rmode_ == EMBEDDED_OBJECT 609 || rmode_ == EMBEDDED_OBJECT
610 || rmode_ == EXTERNAL_REFERENCE); 610 || rmode_ == EXTERNAL_REFERENCE);
611 return reinterpret_cast<Address>(Assembler::target_pointer_address_at(pc_)); 611 return Assembler::target_pointer_address_at(pc_);
612 } 612 }
613 613
614 614
615 Object* RelocInfo::target_object() { 615 Object* RelocInfo::target_object() {
616 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); 616 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
617 return reinterpret_cast<Object*>(Assembler::target_pointer_at(pc_)); 617 return reinterpret_cast<Object*>(Assembler::target_pointer_at(pc_));
618 } 618 }
619 619
620 620
621 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) { 621 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) {
622 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); 622 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
623 return Handle<Object>(reinterpret_cast<Object**>( 623 return Handle<Object>(reinterpret_cast<Object**>(
624 Assembler::target_pointer_at(pc_))); 624 Assembler::target_pointer_at(pc_)));
625 } 625 }
626 626
627 627
628 Object** RelocInfo::target_object_address() {
629 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
630 reconstructed_obj_ptr_ =
631 reinterpret_cast<Object*>(Assembler::target_pointer_at(pc_));
632 return &reconstructed_obj_ptr_;
633 }
634
635
636 void RelocInfo::set_target_object(Object* target, WriteBarrierMode mode) { 628 void RelocInfo::set_target_object(Object* target, WriteBarrierMode mode) {
637 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); 629 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
638 ASSERT(!target->IsConsString()); 630 ASSERT(!target->IsConsString());
639 Assembler::set_target_pointer_at(pc_, reinterpret_cast<Address>(target)); 631 Assembler::set_target_pointer_at(pc_, reinterpret_cast<Address>(target));
640 if (mode == UPDATE_WRITE_BARRIER && 632 if (mode == UPDATE_WRITE_BARRIER &&
641 host() != NULL && 633 host() != NULL &&
642 target->IsHeapObject()) { 634 target->IsHeapObject()) {
643 host()->GetHeap()->incremental_marking()->RecordWrite( 635 host()->GetHeap()->incremental_marking()->RecordWrite(
644 host(), &Memory::Object_at(pc_), HeapObject::cast(target)); 636 host(), &Memory::Object_at(pc_), HeapObject::cast(target));
645 } 637 }
646 } 638 }
647 639
648 640
649 Address* RelocInfo::target_reference_address() { 641 Address RelocInfo::target_reference() {
650 ASSERT(rmode_ == EXTERNAL_REFERENCE); 642 ASSERT(rmode_ == EXTERNAL_REFERENCE);
651 reconstructed_adr_ptr_ = Assembler::target_address_at(pc_); 643 return Assembler::target_address_at(pc_);
652 return &reconstructed_adr_ptr_;
653 } 644 }
654 645
655 646
656 Address RelocInfo::target_runtime_entry(Assembler* origin) { 647 Address RelocInfo::target_runtime_entry(Assembler* origin) {
657 ASSERT(IsRuntimeEntry(rmode_)); 648 ASSERT(IsRuntimeEntry(rmode_));
658 return target_address(); 649 return target_address();
659 } 650 }
660 651
661 652
662 void RelocInfo::set_target_runtime_entry(Address target, 653 void RelocInfo::set_target_runtime_entry(Address target,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); 718 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()));
728 Assembler::set_target_address_at(pc_, target); 719 Assembler::set_target_address_at(pc_, target);
729 if (host() != NULL) { 720 if (host() != NULL) {
730 Object* target_code = Code::GetCodeFromTargetAddress(target); 721 Object* target_code = Code::GetCodeFromTargetAddress(target);
731 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( 722 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(
732 host(), this, HeapObject::cast(target_code)); 723 host(), this, HeapObject::cast(target_code));
733 } 724 }
734 } 725 }
735 726
736 727
728 void RelocInfo::WipeOut() {
729 ASSERT(IsEmbeddedObject(rmode_) ||
730 IsCodeTarget(rmode_) ||
731 IsRuntimeEntry(rmode_) ||
732 IsExternalReference(rmode_));
733 Assembler::set_target_pointer_at(pc_, NULL);
734 }
735
736
737 bool RelocInfo::IsPatchedReturnSequence() { 737 bool RelocInfo::IsPatchedReturnSequence() {
738 // The sequence must be: 738 // The sequence must be:
739 // ldr ip0, [pc, #offset] 739 // ldr ip0, [pc, #offset]
740 // blr ip0 740 // blr ip0
741 // See a64/debug-a64.cc BreakLocationIterator::SetDebugBreakAtReturn(). 741 // See a64/debug-a64.cc BreakLocationIterator::SetDebugBreakAtReturn().
742 Instruction* i1 = reinterpret_cast<Instruction*>(pc_); 742 Instruction* i1 = reinterpret_cast<Instruction*>(pc_);
743 Instruction* i2 = i1->following(); 743 Instruction* i2 = i1->following();
744 return i1->IsLdrLiteralX() && (i1->Rt() == ip0.code()) && 744 return i1->IsLdrLiteralX() && (i1->Rt() == ip0.code()) &&
745 i2->IsBranchAndLinkToRegister() && (i2->Rn() == ip0.code()); 745 i2->IsBranchAndLinkToRegister() && (i2->Rn() == ip0.code());
746 } 746 }
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 1154
1155 1155
1156 void Assembler::ClearRecordedAstId() { 1156 void Assembler::ClearRecordedAstId() {
1157 recorded_ast_id_ = TypeFeedbackId::None(); 1157 recorded_ast_id_ = TypeFeedbackId::None();
1158 } 1158 }
1159 1159
1160 1160
1161 } } // namespace v8::internal 1161 } } // namespace v8::internal
1162 1162
1163 #endif // V8_A64_ASSEMBLER_A64_INL_H_ 1163 #endif // V8_A64_ASSEMBLER_A64_INL_H_
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/a64/code-stubs-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698