Commit ecdde64c authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

PPC/s390: [heap] Improve verification for code write barrier

Port dc2d69d8

Original Commit Message:

    Pass WriteBarrierMode to the code object write barrier and DCHECK WriteBarrier::IsRequired when using SKIP_WRITE_BARRIER.

R=dinfuehr@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I356379e0d682e855d1c43f35a7a0d06734f8408b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3812036
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: 's avatarJoran Siu <joransiu@ca.ibm.com>
Cr-Commit-Position: refs/heads/main@{#82209}
parent f2069867
......@@ -195,9 +195,8 @@ void RelocInfo::set_target_object(Heap* heap, HeapObject target,
Assembler::set_target_address_at(pc_, constant_pool_, target.ptr(),
icache_flush_mode);
}
if (write_barrier_mode == UPDATE_WRITE_BARRIER && !host().is_null() &&
!FLAG_disable_write_barriers) {
WriteBarrierForCode(host(), this, target);
if (!host().is_null() && !FLAG_disable_write_barriers) {
WriteBarrierForCode(host(), this, target, write_barrier_mode);
}
}
......
......@@ -189,9 +189,8 @@ void RelocInfo::set_target_object(Heap* heap, HeapObject target,
Assembler::set_target_address_at(pc_, constant_pool_, target.ptr(),
icache_flush_mode);
}
if (write_barrier_mode == UPDATE_WRITE_BARRIER && !host().is_null() &&
!FLAG_disable_write_barriers) {
WriteBarrierForCode(host(), this, target);
if (!host().is_null() && !FLAG_disable_write_barriers) {
WriteBarrierForCode(host(), this, target, write_barrier_mode);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment