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

PPC/s390: [heap] Remove write barrier builtin for incremental marking

Port e50d19cb

Original Commit Message:

    https://crrev.com/c/3471854 already disabled the RecordWrite builtin
    specifically for incremental marking. Since this didn't regress performance as expected, we can now remove those versions of the
    builtin.

    This will simplify the barrier implementation a bit, but is also
    required for the shared heap write barrier. Unlike the generational barrier, the shared heap barrier can't be elided for map values.

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

Change-Id: Ic1a31fad3faaafeab077590d71d6d998eaddcc6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3691128Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80979}
parent 7fd79963
...@@ -1121,7 +1121,7 @@ static void ReplaceClosureCodeWithOptimizedCode(MacroAssembler* masm, ...@@ -1121,7 +1121,7 @@ static void ReplaceClosureCodeWithOptimizedCode(MacroAssembler* masm,
__ RecordWriteField(closure, JSFunction::kCodeOffset, value, slot_address, __ RecordWriteField(closure, JSFunction::kCodeOffset, value, slot_address,
kLRHasNotBeenSaved, SaveFPRegsMode::kIgnore, kLRHasNotBeenSaved, SaveFPRegsMode::kIgnore,
RememberedSetAction::kOmit, SmiCheck::kOmit); SmiCheck::kOmit);
} }
static void LeaveInterpreterFrame(MacroAssembler* masm, Register scratch1, static void LeaveInterpreterFrame(MacroAssembler* masm, Register scratch1,
......
...@@ -1160,7 +1160,7 @@ static void ReplaceClosureCodeWithOptimizedCode(MacroAssembler* masm, ...@@ -1160,7 +1160,7 @@ static void ReplaceClosureCodeWithOptimizedCode(MacroAssembler* masm,
__ RecordWriteField(closure, JSFunction::kCodeOffset, value, slot_address, __ RecordWriteField(closure, JSFunction::kCodeOffset, value, slot_address,
kLRHasNotBeenSaved, SaveFPRegsMode::kIgnore, kLRHasNotBeenSaved, SaveFPRegsMode::kIgnore,
RememberedSetAction::kOmit, SmiCheck::kOmit); SmiCheck::kOmit);
} }
static void LeaveInterpreterFrame(MacroAssembler* masm, Register scratch1, static void LeaveInterpreterFrame(MacroAssembler* masm, Register scratch1,
......
...@@ -667,7 +667,6 @@ void MacroAssembler::RecordWriteField(Register object, int offset, ...@@ -667,7 +667,6 @@ void MacroAssembler::RecordWriteField(Register object, int offset,
Register value, Register slot_address, Register value, Register slot_address,
LinkRegisterStatus lr_status, LinkRegisterStatus lr_status,
SaveFPRegsMode save_fp, SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action,
SmiCheck smi_check) { SmiCheck smi_check) {
// First, check if a write barrier is even needed. The tests below // First, check if a write barrier is even needed. The tests below
// catch stores of Smis. // catch stores of Smis.
...@@ -691,8 +690,7 @@ void MacroAssembler::RecordWriteField(Register object, int offset, ...@@ -691,8 +690,7 @@ void MacroAssembler::RecordWriteField(Register object, int offset,
bind(&ok); bind(&ok);
} }
RecordWrite(object, slot_address, value, lr_status, save_fp, RecordWrite(object, slot_address, value, lr_status, save_fp, SmiCheck::kOmit);
remembered_set_action, SmiCheck::kOmit);
bind(&done); bind(&done);
...@@ -737,10 +735,10 @@ void TurboAssembler::CallEphemeronKeyBarrier(Register object, ...@@ -737,10 +735,10 @@ void TurboAssembler::CallEphemeronKeyBarrier(Register object,
MaybeRestoreRegisters(registers); MaybeRestoreRegisters(registers);
} }
void TurboAssembler::CallRecordWriteStubSaveRegisters( void TurboAssembler::CallRecordWriteStubSaveRegisters(Register object,
Register object, Register slot_address, Register slot_address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode, SaveFPRegsMode fp_mode,
StubCallMode mode) { StubCallMode mode) {
DCHECK(!AreAliased(object, slot_address)); DCHECK(!AreAliased(object, slot_address));
RegList registers = RegList registers =
WriteBarrierDescriptor::ComputeSavedRegisters(object, slot_address); WriteBarrierDescriptor::ComputeSavedRegisters(object, slot_address);
...@@ -755,16 +753,14 @@ void TurboAssembler::CallRecordWriteStubSaveRegisters( ...@@ -755,16 +753,14 @@ void TurboAssembler::CallRecordWriteStubSaveRegisters(
pop(slot_address_parameter); pop(slot_address_parameter);
pop(object_parameter); pop(object_parameter);
CallRecordWriteStub(object_parameter, slot_address_parameter, CallRecordWriteStub(object_parameter, slot_address_parameter, fp_mode, mode);
remembered_set_action, fp_mode, mode);
MaybeRestoreRegisters(registers); MaybeRestoreRegisters(registers);
} }
void TurboAssembler::CallRecordWriteStub( void TurboAssembler::CallRecordWriteStub(Register object, Register slot_address,
Register object, Register slot_address, SaveFPRegsMode fp_mode,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode, StubCallMode mode) {
StubCallMode mode) {
// Use CallRecordWriteStubSaveRegisters if the object and slot registers // Use CallRecordWriteStubSaveRegisters if the object and slot registers
// need to be caller saved. // need to be caller saved.
DCHECK_EQ(WriteBarrierDescriptor::ObjectRegister(), object); DCHECK_EQ(WriteBarrierDescriptor::ObjectRegister(), object);
...@@ -772,15 +768,13 @@ void TurboAssembler::CallRecordWriteStub( ...@@ -772,15 +768,13 @@ void TurboAssembler::CallRecordWriteStub(
#if V8_ENABLE_WEBASSEMBLY #if V8_ENABLE_WEBASSEMBLY
if (mode == StubCallMode::kCallWasmRuntimeStub) { if (mode == StubCallMode::kCallWasmRuntimeStub) {
// Use {near_call} for direct Wasm call within a module. // Use {near_call} for direct Wasm call within a module.
auto wasm_target = auto wasm_target = wasm::WasmCode::GetRecordWriteStub(fp_mode);
wasm::WasmCode::GetRecordWriteStub(remembered_set_action, fp_mode);
Call(wasm_target, RelocInfo::WASM_STUB_CALL); Call(wasm_target, RelocInfo::WASM_STUB_CALL);
#else #else
if (false) { if (false) {
#endif #endif
} else { } else {
auto builtin_index = auto builtin_index = Builtins::GetRecordWriteStub(fp_mode);
Builtins::GetRecordWriteStub(remembered_set_action, fp_mode);
if (options().inline_offheap_trampolines) { if (options().inline_offheap_trampolines) {
RecordCommentForOffHeapTrampoline(builtin_index); RecordCommentForOffHeapTrampoline(builtin_index);
// Use ip directly instead of using UseScratchRegisterScope, as we do // Use ip directly instead of using UseScratchRegisterScope, as we do
...@@ -800,9 +794,7 @@ void TurboAssembler::CallRecordWriteStub( ...@@ -800,9 +794,7 @@ void TurboAssembler::CallRecordWriteStub(
// tag is shifted away. // tag is shifted away.
void MacroAssembler::RecordWrite(Register object, Register slot_address, void MacroAssembler::RecordWrite(Register object, Register slot_address,
Register value, LinkRegisterStatus lr_status, Register value, LinkRegisterStatus lr_status,
SaveFPRegsMode fp_mode, SaveFPRegsMode fp_mode, SmiCheck smi_check) {
RememberedSetAction remembered_set_action,
SmiCheck smi_check) {
DCHECK(!AreAliased(object, value, slot_address)); DCHECK(!AreAliased(object, value, slot_address));
if (FLAG_debug_code) { if (FLAG_debug_code) {
LoadTaggedPointerField(r0, MemOperand(slot_address)); LoadTaggedPointerField(r0, MemOperand(slot_address));
...@@ -810,9 +802,7 @@ void MacroAssembler::RecordWrite(Register object, Register slot_address, ...@@ -810,9 +802,7 @@ void MacroAssembler::RecordWrite(Register object, Register slot_address,
Check(eq, AbortReason::kWrongAddressOrValuePassedToRecordWrite); Check(eq, AbortReason::kWrongAddressOrValuePassedToRecordWrite);
} }
if ((remembered_set_action == RememberedSetAction::kOmit && if (FLAG_disable_write_barriers) {
!FLAG_incremental_marking) ||
FLAG_disable_write_barriers) {
return; return;
} }
...@@ -836,8 +826,7 @@ void MacroAssembler::RecordWrite(Register object, Register slot_address, ...@@ -836,8 +826,7 @@ void MacroAssembler::RecordWrite(Register object, Register slot_address,
mflr(r0); mflr(r0);
push(r0); push(r0);
} }
CallRecordWriteStubSaveRegisters(object, slot_address, remembered_set_action, CallRecordWriteStubSaveRegisters(object, slot_address, fp_mode);
fp_mode);
if (lr_status == kLRHasNotBeenSaved) { if (lr_status == kLRHasNotBeenSaved) {
pop(r0); pop(r0);
mtlr(r0); mtlr(r0);
......
...@@ -547,12 +547,10 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase { ...@@ -547,12 +547,10 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
SaveFPRegsMode fp_mode); SaveFPRegsMode fp_mode);
void CallRecordWriteStubSaveRegisters( void CallRecordWriteStubSaveRegisters(
Register object, Register slot_address, Register object, Register slot_address, SaveFPRegsMode fp_mode,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
StubCallMode mode = StubCallMode::kCallBuiltinPointer); StubCallMode mode = StubCallMode::kCallBuiltinPointer);
void CallRecordWriteStub( void CallRecordWriteStub(
Register object, Register slot_address, Register object, Register slot_address, SaveFPRegsMode fp_mode,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
StubCallMode mode = StubCallMode::kCallBuiltinPointer); StubCallMode mode = StubCallMode::kCallBuiltinPointer);
void MultiPush(RegList regs, Register location = sp); void MultiPush(RegList regs, Register location = sp);
...@@ -1097,20 +1095,17 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler { ...@@ -1097,20 +1095,17 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
// stored. value and scratch registers are clobbered by the operation. // stored. value and scratch registers are clobbered by the operation.
// The offset is the offset from the start of the object, not the offset from // The offset is the offset from the start of the object, not the offset from
// the tagged HeapObject pointer. For use with FieldMemOperand(reg, off). // the tagged HeapObject pointer. For use with FieldMemOperand(reg, off).
void RecordWriteField( void RecordWriteField(Register object, int offset, Register value,
Register object, int offset, Register value, Register slot_address, Register slot_address, LinkRegisterStatus lr_status,
LinkRegisterStatus lr_status, SaveFPRegsMode save_fp, SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action = RememberedSetAction::kEmit, SmiCheck smi_check = SmiCheck::kInline);
SmiCheck smi_check = SmiCheck::kInline);
// For a given |object| notify the garbage collector that the slot |address| // For a given |object| notify the garbage collector that the slot |address|
// has been written. |value| is the object being stored. The value and // has been written. |value| is the object being stored. The value and
// address registers are clobbered by the operation. // address registers are clobbered by the operation.
void RecordWrite( void RecordWrite(Register object, Register slot_address, Register value,
Register object, Register slot_address, Register value, LinkRegisterStatus lr_status, SaveFPRegsMode save_fp,
LinkRegisterStatus lr_status, SaveFPRegsMode save_fp, SmiCheck smi_check = SmiCheck::kInline);
RememberedSetAction remembered_set_action = RememberedSetAction::kEmit,
SmiCheck smi_check = SmiCheck::kInline);
// Enter exit frame. // Enter exit frame.
// stack_space - extra stack space, used for parameters before call to C. // stack_space - extra stack space, used for parameters before call to C.
......
...@@ -901,7 +901,6 @@ void MacroAssembler::RecordWriteField(Register object, int offset, ...@@ -901,7 +901,6 @@ void MacroAssembler::RecordWriteField(Register object, int offset,
Register value, Register slot_address, Register value, Register slot_address,
LinkRegisterStatus lr_status, LinkRegisterStatus lr_status,
SaveFPRegsMode save_fp, SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action,
SmiCheck smi_check) { SmiCheck smi_check) {
// First, check if a write barrier is even needed. The tests below // First, check if a write barrier is even needed. The tests below
// catch stores of Smis. // catch stores of Smis.
...@@ -925,8 +924,7 @@ void MacroAssembler::RecordWriteField(Register object, int offset, ...@@ -925,8 +924,7 @@ void MacroAssembler::RecordWriteField(Register object, int offset,
bind(&ok); bind(&ok);
} }
RecordWrite(object, slot_address, value, lr_status, save_fp, RecordWrite(object, slot_address, value, lr_status, save_fp, SmiCheck::kOmit);
remembered_set_action, SmiCheck::kOmit);
bind(&done); bind(&done);
...@@ -971,10 +969,10 @@ void TurboAssembler::CallEphemeronKeyBarrier(Register object, ...@@ -971,10 +969,10 @@ void TurboAssembler::CallEphemeronKeyBarrier(Register object,
MaybeRestoreRegisters(registers); MaybeRestoreRegisters(registers);
} }
void TurboAssembler::CallRecordWriteStubSaveRegisters( void TurboAssembler::CallRecordWriteStubSaveRegisters(Register object,
Register object, Register slot_address, Register slot_address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode, SaveFPRegsMode fp_mode,
StubCallMode mode) { StubCallMode mode) {
DCHECK(!AreAliased(object, slot_address)); DCHECK(!AreAliased(object, slot_address));
RegList registers = RegList registers =
WriteBarrierDescriptor::ComputeSavedRegisters(object, slot_address); WriteBarrierDescriptor::ComputeSavedRegisters(object, slot_address);
...@@ -989,31 +987,27 @@ void TurboAssembler::CallRecordWriteStubSaveRegisters( ...@@ -989,31 +987,27 @@ void TurboAssembler::CallRecordWriteStubSaveRegisters(
Pop(slot_address_parameter); Pop(slot_address_parameter);
Pop(object_parameter); Pop(object_parameter);
CallRecordWriteStub(object_parameter, slot_address_parameter, CallRecordWriteStub(object_parameter, slot_address_parameter, fp_mode, mode);
remembered_set_action, fp_mode, mode);
MaybeRestoreRegisters(registers); MaybeRestoreRegisters(registers);
} }
void TurboAssembler::CallRecordWriteStub( void TurboAssembler::CallRecordWriteStub(Register object, Register slot_address,
Register object, Register slot_address, SaveFPRegsMode fp_mode,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode, StubCallMode mode) {
StubCallMode mode) {
// Use CallRecordWriteStubSaveRegisters if the object and slot registers // Use CallRecordWriteStubSaveRegisters if the object and slot registers
// need to be caller saved. // need to be caller saved.
DCHECK_EQ(WriteBarrierDescriptor::ObjectRegister(), object); DCHECK_EQ(WriteBarrierDescriptor::ObjectRegister(), object);
DCHECK_EQ(WriteBarrierDescriptor::SlotAddressRegister(), slot_address); DCHECK_EQ(WriteBarrierDescriptor::SlotAddressRegister(), slot_address);
#if V8_ENABLE_WEBASSEMBLY #if V8_ENABLE_WEBASSEMBLY
if (mode == StubCallMode::kCallWasmRuntimeStub) { if (mode == StubCallMode::kCallWasmRuntimeStub) {
auto wasm_target = auto wasm_target = wasm::WasmCode::GetRecordWriteStub(fp_mode);
wasm::WasmCode::GetRecordWriteStub(remembered_set_action, fp_mode);
Call(wasm_target, RelocInfo::WASM_STUB_CALL); Call(wasm_target, RelocInfo::WASM_STUB_CALL);
#else #else
if (false) { if (false) {
#endif #endif
} else { } else {
auto builtin_index = auto builtin_index = Builtins::GetRecordWriteStub(fp_mode);
Builtins::GetRecordWriteStub(remembered_set_action, fp_mode);
if (options().inline_offheap_trampolines) { if (options().inline_offheap_trampolines) {
RecordCommentForOffHeapTrampoline(builtin_index); RecordCommentForOffHeapTrampoline(builtin_index);
mov(ip, Operand(BuiltinEntry(builtin_index), RelocInfo::OFF_HEAP_TARGET)); mov(ip, Operand(BuiltinEntry(builtin_index), RelocInfo::OFF_HEAP_TARGET));
...@@ -1031,9 +1025,7 @@ void TurboAssembler::CallRecordWriteStub( ...@@ -1031,9 +1025,7 @@ void TurboAssembler::CallRecordWriteStub(
// tag is shifted away. // tag is shifted away.
void MacroAssembler::RecordWrite(Register object, Register slot_address, void MacroAssembler::RecordWrite(Register object, Register slot_address,
Register value, LinkRegisterStatus lr_status, Register value, LinkRegisterStatus lr_status,
SaveFPRegsMode fp_mode, SaveFPRegsMode fp_mode, SmiCheck smi_check) {
RememberedSetAction remembered_set_action,
SmiCheck smi_check) {
DCHECK(!AreAliased(object, slot_address, value)); DCHECK(!AreAliased(object, slot_address, value));
if (FLAG_debug_code) { if (FLAG_debug_code) {
LoadTaggedPointerField(r0, MemOperand(slot_address)); LoadTaggedPointerField(r0, MemOperand(slot_address));
...@@ -1041,9 +1033,7 @@ void MacroAssembler::RecordWrite(Register object, Register slot_address, ...@@ -1041,9 +1033,7 @@ void MacroAssembler::RecordWrite(Register object, Register slot_address,
Check(eq, AbortReason::kWrongAddressOrValuePassedToRecordWrite); Check(eq, AbortReason::kWrongAddressOrValuePassedToRecordWrite);
} }
if ((remembered_set_action == RememberedSetAction::kOmit && if (FLAG_disable_write_barriers) {
!FLAG_incremental_marking) ||
FLAG_disable_write_barriers) {
return; return;
} }
// First, check if a write barrier is even needed. The tests below // First, check if a write barrier is even needed. The tests below
...@@ -1065,8 +1055,7 @@ void MacroAssembler::RecordWrite(Register object, Register slot_address, ...@@ -1065,8 +1055,7 @@ void MacroAssembler::RecordWrite(Register object, Register slot_address,
if (lr_status == kLRHasNotBeenSaved) { if (lr_status == kLRHasNotBeenSaved) {
push(r14); push(r14);
} }
CallRecordWriteStubSaveRegisters(object, slot_address, remembered_set_action, CallRecordWriteStubSaveRegisters(object, slot_address, fp_mode);
fp_mode);
if (lr_status == kLRHasNotBeenSaved) { if (lr_status == kLRHasNotBeenSaved) {
pop(r14); pop(r14);
} }
......
...@@ -164,12 +164,10 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase { ...@@ -164,12 +164,10 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
SaveFPRegsMode fp_mode); SaveFPRegsMode fp_mode);
void CallRecordWriteStubSaveRegisters( void CallRecordWriteStubSaveRegisters(
Register object, Register slot_address, Register object, Register slot_address, SaveFPRegsMode fp_mode,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
StubCallMode mode = StubCallMode::kCallBuiltinPointer); StubCallMode mode = StubCallMode::kCallBuiltinPointer);
void CallRecordWriteStub( void CallRecordWriteStub(
Register object, Register slot_address, Register object, Register slot_address, SaveFPRegsMode fp_mode,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
StubCallMode mode = StubCallMode::kCallBuiltinPointer); StubCallMode mode = StubCallMode::kCallBuiltinPointer);
void MultiPush(RegList regs, Register location = sp); void MultiPush(RegList regs, Register location = sp);
...@@ -1758,20 +1756,17 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler { ...@@ -1758,20 +1756,17 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
// stored. value and scratch registers are clobbered by the operation. // stored. value and scratch registers are clobbered by the operation.
// The offset is the offset from the start of the object, not the offset from // The offset is the offset from the start of the object, not the offset from
// the tagged HeapObject pointer. For use with FieldMemOperand(reg, off). // the tagged HeapObject pointer. For use with FieldMemOperand(reg, off).
void RecordWriteField( void RecordWriteField(Register object, int offset, Register value,
Register object, int offset, Register value, Register slot_address, Register slot_address, LinkRegisterStatus lr_status,
LinkRegisterStatus lr_status, SaveFPRegsMode save_fp, SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action = RememberedSetAction::kEmit, SmiCheck smi_check = SmiCheck::kInline);
SmiCheck smi_check = SmiCheck::kInline);
// For a given |object| notify the garbage collector that the slot |address| // For a given |object| notify the garbage collector that the slot |address|
// has been written. |value| is the object being stored. The value and // has been written. |value| is the object being stored. The value and
// address registers are clobbered by the operation. // address registers are clobbered by the operation.
void RecordWrite( void RecordWrite(Register object, Register slot_address, Register value,
Register object, Register slot_address, Register value, LinkRegisterStatus lr_status, SaveFPRegsMode save_fp,
LinkRegisterStatus lr_status, SaveFPRegsMode save_fp, SmiCheck smi_check = SmiCheck::kInline);
RememberedSetAction remembered_set_action = RememberedSetAction::kEmit,
SmiCheck smi_check = SmiCheck::kInline);
void TestCodeTIsMarkedForDeoptimization(Register codet, Register scratch); void TestCodeTIsMarkedForDeoptimization(Register codet, Register scratch);
Operand ClearedValue() const; Operand ClearedValue() const;
......
...@@ -186,11 +186,6 @@ class OutOfLineRecordWrite final : public OutOfLineCode { ...@@ -186,11 +186,6 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
DCHECK_EQ(0, offset_immediate_); DCHECK_EQ(0, offset_immediate_);
__ add(scratch1_, object_, offset_); __ add(scratch1_, object_, offset_);
} }
RememberedSetAction const remembered_set_action =
mode_ > RecordWriteMode::kValueIsMap ||
FLAG_use_full_record_write_builtin
? RememberedSetAction::kEmit
: RememberedSetAction::kOmit;
SaveFPRegsMode const save_fp_mode = frame()->DidAllocateDoubleRegisters() SaveFPRegsMode const save_fp_mode = frame()->DidAllocateDoubleRegisters()
? SaveFPRegsMode::kSave ? SaveFPRegsMode::kSave
: SaveFPRegsMode::kIgnore; : SaveFPRegsMode::kIgnore;
...@@ -204,13 +199,11 @@ class OutOfLineRecordWrite final : public OutOfLineCode { ...@@ -204,13 +199,11 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
__ CallEphemeronKeyBarrier(object_, scratch1_, save_fp_mode); __ CallEphemeronKeyBarrier(object_, scratch1_, save_fp_mode);
#if V8_ENABLE_WEBASSEMBLY #if V8_ENABLE_WEBASSEMBLY
} else if (stub_mode_ == StubCallMode::kCallWasmRuntimeStub) { } else if (stub_mode_ == StubCallMode::kCallWasmRuntimeStub) {
__ CallRecordWriteStubSaveRegisters(object_, scratch1_, __ CallRecordWriteStubSaveRegisters(object_, scratch1_, save_fp_mode,
remembered_set_action, save_fp_mode,
StubCallMode::kCallWasmRuntimeStub); StubCallMode::kCallWasmRuntimeStub);
#endif // V8_ENABLE_WEBASSEMBLY #endif // V8_ENABLE_WEBASSEMBLY
} else { } else {
__ CallRecordWriteStubSaveRegisters(object_, scratch1_, __ CallRecordWriteStubSaveRegisters(object_, scratch1_, save_fp_mode);
remembered_set_action, save_fp_mode);
} }
if (must_save_lr_) { if (must_save_lr_) {
// We need to save and restore lr if the frame was elided. // We need to save and restore lr if the frame was elided.
......
...@@ -223,11 +223,6 @@ class OutOfLineRecordWrite final : public OutOfLineCode { ...@@ -223,11 +223,6 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
DCHECK_EQ(0, offset_immediate_); DCHECK_EQ(0, offset_immediate_);
__ AddS64(scratch1_, object_, offset_); __ AddS64(scratch1_, object_, offset_);
} }
RememberedSetAction const remembered_set_action =
mode_ > RecordWriteMode::kValueIsMap ||
FLAG_use_full_record_write_builtin
? RememberedSetAction::kEmit
: RememberedSetAction::kOmit;
SaveFPRegsMode const save_fp_mode = frame()->DidAllocateDoubleRegisters() SaveFPRegsMode const save_fp_mode = frame()->DidAllocateDoubleRegisters()
? SaveFPRegsMode::kSave ? SaveFPRegsMode::kSave
: SaveFPRegsMode::kIgnore; : SaveFPRegsMode::kIgnore;
...@@ -240,13 +235,11 @@ class OutOfLineRecordWrite final : public OutOfLineCode { ...@@ -240,13 +235,11 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
__ CallEphemeronKeyBarrier(object_, scratch1_, save_fp_mode); __ CallEphemeronKeyBarrier(object_, scratch1_, save_fp_mode);
#if V8_ENABLE_WEBASSEMBLY #if V8_ENABLE_WEBASSEMBLY
} else if (stub_mode_ == StubCallMode::kCallWasmRuntimeStub) { } else if (stub_mode_ == StubCallMode::kCallWasmRuntimeStub) {
__ CallRecordWriteStubSaveRegisters(object_, scratch1_, __ CallRecordWriteStubSaveRegisters(object_, scratch1_, save_fp_mode,
remembered_set_action, save_fp_mode,
StubCallMode::kCallWasmRuntimeStub); StubCallMode::kCallWasmRuntimeStub);
#endif // V8_ENABLE_WEBASSEMBLY #endif // V8_ENABLE_WEBASSEMBLY
} else { } else {
__ CallRecordWriteStubSaveRegisters(object_, scratch1_, __ CallRecordWriteStubSaveRegisters(object_, scratch1_, save_fp_mode);
remembered_set_action, save_fp_mode);
} }
if (must_save_lr_) { if (must_save_lr_) {
// We need to save and restore r14 if the frame was elided. // We need to save and restore r14 if the frame was elided.
......
...@@ -340,8 +340,7 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr, ...@@ -340,8 +340,7 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
if (offset_reg != no_reg) { if (offset_reg != no_reg) {
add(ip, ip, offset_reg); add(ip, ip, offset_reg);
} }
CallRecordWriteStubSaveRegisters(dst_addr, ip, RememberedSetAction::kEmit, CallRecordWriteStubSaveRegisters(dst_addr, ip, SaveFPRegsMode::kSave,
SaveFPRegsMode::kSave,
StubCallMode::kCallWasmRuntimeStub); StubCallMode::kCallWasmRuntimeStub);
bind(&exit); bind(&exit);
} }
......
...@@ -318,8 +318,7 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr, ...@@ -318,8 +318,7 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
CheckPageFlag(src.gp(), r1, MemoryChunk::kPointersToHereAreInterestingMask, CheckPageFlag(src.gp(), r1, MemoryChunk::kPointersToHereAreInterestingMask,
eq, &exit); eq, &exit);
lay(r1, dst_op); lay(r1, dst_op);
CallRecordWriteStubSaveRegisters(dst_addr, r1, RememberedSetAction::kEmit, CallRecordWriteStubSaveRegisters(dst_addr, r1, SaveFPRegsMode::kSave,
SaveFPRegsMode::kSave,
StubCallMode::kCallWasmRuntimeStub); StubCallMode::kCallWasmRuntimeStub);
bind(&exit); bind(&exit);
} }
......
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