OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_X64_ASSEMBLER_X64_INL_H_ | 5 #ifndef V8_X64_ASSEMBLER_X64_INL_H_ |
6 #define V8_X64_ASSEMBLER_X64_INL_H_ | 6 #define V8_X64_ASSEMBLER_X64_INL_H_ |
7 | 7 |
8 #include "src/x64/assembler-x64.h" | 8 #include "src/x64/assembler-x64.h" |
9 | 9 |
10 #include "src/base/cpu.h" | 10 #include "src/base/cpu.h" |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 | 507 |
508 | 508 |
509 void RelocInfo::set_debug_call_address(Address target) { | 509 void RelocInfo::set_debug_call_address(Address target) { |
510 DCHECK(IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()); | 510 DCHECK(IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()); |
511 Memory::Address_at(pc_ + Assembler::kPatchDebugBreakSlotAddressOffset) = | 511 Memory::Address_at(pc_ + Assembler::kPatchDebugBreakSlotAddressOffset) = |
512 target; | 512 target; |
513 Assembler::FlushICache(isolate_, | 513 Assembler::FlushICache(isolate_, |
514 pc_ + Assembler::kPatchDebugBreakSlotAddressOffset, | 514 pc_ + Assembler::kPatchDebugBreakSlotAddressOffset, |
515 sizeof(Address)); | 515 sizeof(Address)); |
516 if (host() != NULL) { | 516 if (host() != NULL) { |
517 Object* target_code = Code::GetCodeFromTargetAddress(target); | 517 Code* target_code = Code::GetCodeFromTargetAddress(target); |
518 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( | 518 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this, |
519 host(), this, HeapObject::cast(target_code)); | 519 target_code); |
520 } | 520 } |
521 } | 521 } |
522 | 522 |
523 template <typename ObjectVisitor> | 523 template <typename ObjectVisitor> |
524 void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) { | 524 void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) { |
525 RelocInfo::Mode mode = rmode(); | 525 RelocInfo::Mode mode = rmode(); |
526 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 526 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
527 visitor->VisitEmbeddedPointer(this); | 527 visitor->VisitEmbeddedPointer(this); |
528 Assembler::FlushICache(isolate, pc_, sizeof(Address)); | 528 Assembler::FlushICache(isolate, pc_, sizeof(Address)); |
529 } else if (RelocInfo::IsCodeTarget(mode)) { | 529 } else if (RelocInfo::IsCodeTarget(mode)) { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 void Operand::set_disp64(int64_t disp) { | 610 void Operand::set_disp64(int64_t disp) { |
611 DCHECK_EQ(1, len_); | 611 DCHECK_EQ(1, len_); |
612 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]); | 612 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]); |
613 *p = disp; | 613 *p = disp; |
614 len_ += sizeof(disp); | 614 len_ += sizeof(disp); |
615 } | 615 } |
616 } // namespace internal | 616 } // namespace internal |
617 } // namespace v8 | 617 } // namespace v8 |
618 | 618 |
619 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 619 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
OLD | NEW |