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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 WriteBarrierMode write_barrier_mode, | 449 WriteBarrierMode write_barrier_mode, |
450 ICacheFlushMode icache_flush_mode) { | 450 ICacheFlushMode icache_flush_mode) { |
451 DCHECK(rmode_ == RelocInfo::CELL); | 451 DCHECK(rmode_ == RelocInfo::CELL); |
452 Address address = cell->address() + Cell::kValueOffset; | 452 Address address = cell->address() + Cell::kValueOffset; |
453 Memory::Address_at(pc_) = address; | 453 Memory::Address_at(pc_) = address; |
454 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { | 454 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |
455 Assembler::FlushICache(isolate_, pc_, sizeof(Address)); | 455 Assembler::FlushICache(isolate_, pc_, sizeof(Address)); |
456 } | 456 } |
457 if (write_barrier_mode == UPDATE_WRITE_BARRIER && | 457 if (write_barrier_mode == UPDATE_WRITE_BARRIER && |
458 host() != NULL) { | 458 host() != NULL) { |
459 // TODO(1550) We are passing NULL as a slot because cell can never be on | 459 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this, |
460 // evacuation candidate. | 460 cell); |
461 host()->GetHeap()->incremental_marking()->RecordWrite( | |
462 host(), NULL, cell); | |
463 } | 461 } |
464 } | 462 } |
465 | 463 |
466 | 464 |
467 void RelocInfo::WipeOut() { | 465 void RelocInfo::WipeOut() { |
468 if (IsEmbeddedObject(rmode_) || IsExternalReference(rmode_) || | 466 if (IsEmbeddedObject(rmode_) || IsExternalReference(rmode_) || |
469 IsInternalReference(rmode_)) { | 467 IsInternalReference(rmode_)) { |
470 Memory::Address_at(pc_) = NULL; | 468 Memory::Address_at(pc_) = NULL; |
471 } else if (IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)) { | 469 } else if (IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)) { |
472 // Effectively write zero into the relocation. | 470 // Effectively write zero into the relocation. |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 void Operand::set_disp64(int64_t disp) { | 627 void Operand::set_disp64(int64_t disp) { |
630 DCHECK_EQ(1, len_); | 628 DCHECK_EQ(1, len_); |
631 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]); | 629 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]); |
632 *p = disp; | 630 *p = disp; |
633 len_ += sizeof(disp); | 631 len_ += sizeof(disp); |
634 } | 632 } |
635 } // namespace internal | 633 } // namespace internal |
636 } // namespace v8 | 634 } // namespace v8 |
637 | 635 |
638 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 636 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
OLD | NEW |