| Index: src/arm64/assembler-arm64-inl.h
|
| diff --git a/src/arm64/assembler-arm64-inl.h b/src/arm64/assembler-arm64-inl.h
|
| index 98d8c1d01bb907ba1e768163f5ad87b7ba05b249..d7ebc0f5a757e028ee8d4b1a5b81868678f4d99d 100644
|
| --- a/src/arm64/assembler-arm64-inl.h
|
| +++ b/src/arm64/assembler-arm64-inl.h
|
| @@ -17,15 +17,18 @@ namespace internal {
|
| bool CpuFeatures::SupportsCrankshaft() { return true; }
|
|
|
|
|
| -void RelocInfo::apply(intptr_t delta) {
|
| +void RelocInfo::apply(intptr_t delta, ICacheFlushMode icache_flush_mode) {
|
| UNIMPLEMENTED();
|
| }
|
|
|
|
|
| -void RelocInfo::set_target_address(Address target, WriteBarrierMode mode) {
|
| +void RelocInfo::set_target_address(Address target,
|
| + WriteBarrierMode write_barrier_mode,
|
| + ICacheFlushMode icache_flush_mode) {
|
| ASSERT(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_));
|
| - Assembler::set_target_address_at(pc_, host_, target);
|
| - if (mode == UPDATE_WRITE_BARRIER && host() != NULL && IsCodeTarget(rmode_)) {
|
| + Assembler::set_target_address_at(pc_, host_, target, icache_flush_mode);
|
| + if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL &&
|
| + IsCodeTarget(rmode_)) {
|
| Object* target_code = Code::GetCodeFromTargetAddress(target);
|
| host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(
|
| host(), this, HeapObject::cast(target_code));
|
| @@ -625,7 +628,8 @@ void Assembler::deserialization_set_special_target_at(
|
|
|
| void Assembler::set_target_address_at(Address pc,
|
| ConstantPoolArray* constant_pool,
|
| - Address target) {
|
| + Address target,
|
| + ICacheFlushMode icache_flush_mode) {
|
| Memory::Address_at(target_pointer_address_at(pc)) = target;
|
| // Intuitively, we would think it is necessary to always flush the
|
| // instruction cache after patching a target address in the code as follows:
|
| @@ -640,9 +644,10 @@ void Assembler::set_target_address_at(Address pc,
|
|
|
| void Assembler::set_target_address_at(Address pc,
|
| Code* code,
|
| - Address target) {
|
| + Address target,
|
| + ICacheFlushMode icache_flush_mode) {
|
| ConstantPoolArray* constant_pool = code ? code->constant_pool() : NULL;
|
| - set_target_address_at(pc, constant_pool, target);
|
| + set_target_address_at(pc, constant_pool, target, icache_flush_mode);
|
| }
|
|
|
|
|
| @@ -684,12 +689,15 @@ Handle<Object> RelocInfo::target_object_handle(Assembler* origin) {
|
| }
|
|
|
|
|
| -void RelocInfo::set_target_object(Object* target, WriteBarrierMode mode) {
|
| +void RelocInfo::set_target_object(Object* target,
|
| + WriteBarrierMode write_barrier_mode,
|
| + ICacheFlushMode icache_flush_mode) {
|
| ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
|
| ASSERT(!target->IsConsString());
|
| Assembler::set_target_address_at(pc_, host_,
|
| - reinterpret_cast<Address>(target));
|
| - if (mode == UPDATE_WRITE_BARRIER &&
|
| + reinterpret_cast<Address>(target),
|
| + icache_flush_mode);
|
| + if (write_barrier_mode == UPDATE_WRITE_BARRIER &&
|
| host() != NULL &&
|
| target->IsHeapObject()) {
|
| host()->GetHeap()->incremental_marking()->RecordWrite(
|
| @@ -711,9 +719,12 @@ Address RelocInfo::target_runtime_entry(Assembler* origin) {
|
|
|
|
|
| void RelocInfo::set_target_runtime_entry(Address target,
|
| - WriteBarrierMode mode) {
|
| + WriteBarrierMode write_barrier_mode,
|
| + ICacheFlushMode icache_flush_mode) {
|
| ASSERT(IsRuntimeEntry(rmode_));
|
| - if (target_address() != target) set_target_address(target, mode);
|
| + if (target_address() != target) {
|
| + set_target_address(target, write_barrier_mode, icache_flush_mode);
|
| + }
|
| }
|
|
|
|
|
| @@ -730,7 +741,9 @@ Cell* RelocInfo::target_cell() {
|
| }
|
|
|
|
|
| -void RelocInfo::set_target_cell(Cell* cell, WriteBarrierMode mode) {
|
| +void RelocInfo::set_target_cell(Cell* cell,
|
| + WriteBarrierMode write_barrier_mode,
|
| + ICacheFlushMode icache_flush_mode) {
|
| UNIMPLEMENTED();
|
| }
|
|
|
| @@ -753,7 +766,8 @@ Code* RelocInfo::code_age_stub() {
|
| }
|
|
|
|
|
| -void RelocInfo::set_code_age_stub(Code* stub) {
|
| +void RelocInfo::set_code_age_stub(Code* stub,
|
| + ICacheFlushMode icache_flush_mode) {
|
| ASSERT(rmode_ == RelocInfo::CODE_AGE_SEQUENCE);
|
| ASSERT(!Code::IsYoungSequence(stub->GetIsolate(), pc_));
|
| // Overwrite the stub entry point in the code age sequence. This is loaded as
|
|
|