Commit 7a7027f8 authored by LiuYu's avatar LiuYu Committed by Commit Bot

[mips][macro-assembler] Avoid using the isolate in

CallRecordWriteStub

Port: 6b3994e8

Bug: chromium:1146813

Change-Id: I552f49193188d91d64a1d75307cd3390138c9e7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2599426Reviewed-by: 's avatarZhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#71874}
parent 685358f2
...@@ -258,10 +258,8 @@ void TurboAssembler::CallEphemeronKeyBarrier(Register object, Register address, ...@@ -258,10 +258,8 @@ void TurboAssembler::CallEphemeronKeyBarrier(Register object, Register address,
void TurboAssembler::CallRecordWriteStub( void TurboAssembler::CallRecordWriteStub(
Register object, Register address, Register object, Register address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode) { RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode) {
CallRecordWriteStub( CallRecordWriteStub(object, address, remembered_set_action, fp_mode,
object, address, remembered_set_action, fp_mode, Builtins::kRecordWrite, kNullAddress);
isolate()->builtins()->builtin_handle(Builtins::kRecordWrite),
kNullAddress);
} }
void TurboAssembler::CallRecordWriteStub( void TurboAssembler::CallRecordWriteStub(
...@@ -269,14 +267,15 @@ void TurboAssembler::CallRecordWriteStub( ...@@ -269,14 +267,15 @@ void TurboAssembler::CallRecordWriteStub(
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode, RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
Address wasm_target) { Address wasm_target) {
CallRecordWriteStub(object, address, remembered_set_action, fp_mode, CallRecordWriteStub(object, address, remembered_set_action, fp_mode,
Handle<Code>::null(), wasm_target); Builtins::kNoBuiltinId, wasm_target);
} }
void TurboAssembler::CallRecordWriteStub( void TurboAssembler::CallRecordWriteStub(
Register object, Register address, Register object, Register address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode, RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
Handle<Code> code_target, Address wasm_target) { int builtin_index, Address wasm_target) {
DCHECK_NE(code_target.is_null(), wasm_target == kNullAddress); DCHECK_NE(builtin_index == Builtins::kNoBuiltinId,
wasm_target == kNullAddress);
// TODO(albertnetymk): For now we ignore remembered_set_action and fp_mode, // TODO(albertnetymk): For now we ignore remembered_set_action and fp_mode,
// i.e. always emit remember set and save FP registers in RecordWriteStub. If // i.e. always emit remember set and save FP registers in RecordWriteStub. If
// large performance regression is observed, we should use these values to // large performance regression is observed, we should use these values to
...@@ -303,9 +302,20 @@ void TurboAssembler::CallRecordWriteStub( ...@@ -303,9 +302,20 @@ void TurboAssembler::CallRecordWriteStub(
Move(remembered_set_parameter, Smi::FromEnum(remembered_set_action)); Move(remembered_set_parameter, Smi::FromEnum(remembered_set_action));
Move(fp_mode_parameter, Smi::FromEnum(fp_mode)); Move(fp_mode_parameter, Smi::FromEnum(fp_mode));
if (code_target.is_null()) { if (builtin_index == Builtins::kNoBuiltinId) {
Call(wasm_target, RelocInfo::WASM_STUB_CALL); Call(wasm_target, RelocInfo::WASM_STUB_CALL);
} else if (options().inline_offheap_trampolines) {
// Inline the trampoline.
DCHECK(Builtins::IsBuiltinId(builtin_index));
RecordCommentForOffHeapTrampoline(builtin_index);
CHECK_NE(builtin_index, Builtins::kNoBuiltinId);
EmbeddedData d = EmbeddedData::FromBlob();
Address entry = d.InstructionStartOfBuiltin(builtin_index);
li(t9, Operand(entry, RelocInfo::OFF_HEAP_TARGET));
Call(t9);
} else { } else {
Handle<Code> code_target =
isolate()->builtins()->builtin_handle(Builtins::kRecordWrite);
Call(code_target, RelocInfo::CODE_TARGET); Call(code_target, RelocInfo::CODE_TARGET);
} }
......
...@@ -902,7 +902,7 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase { ...@@ -902,7 +902,7 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
void CallRecordWriteStub(Register object, Register address, void CallRecordWriteStub(Register object, Register address,
RememberedSetAction remembered_set_action, RememberedSetAction remembered_set_action,
SaveFPRegsMode fp_mode, Handle<Code> code_target, SaveFPRegsMode fp_mode, int builtin_index,
Address wasm_target); Address wasm_target);
}; };
......
...@@ -256,10 +256,8 @@ void TurboAssembler::CallEphemeronKeyBarrier(Register object, Register address, ...@@ -256,10 +256,8 @@ void TurboAssembler::CallEphemeronKeyBarrier(Register object, Register address,
void TurboAssembler::CallRecordWriteStub( void TurboAssembler::CallRecordWriteStub(
Register object, Register address, Register object, Register address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode) { RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode) {
CallRecordWriteStub( CallRecordWriteStub(object, address, remembered_set_action, fp_mode,
object, address, remembered_set_action, fp_mode, Builtins::kRecordWrite, kNullAddress);
isolate()->builtins()->builtin_handle(Builtins::kRecordWrite),
kNullAddress);
} }
void TurboAssembler::CallRecordWriteStub( void TurboAssembler::CallRecordWriteStub(
...@@ -267,14 +265,15 @@ void TurboAssembler::CallRecordWriteStub( ...@@ -267,14 +265,15 @@ void TurboAssembler::CallRecordWriteStub(
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode, RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
Address wasm_target) { Address wasm_target) {
CallRecordWriteStub(object, address, remembered_set_action, fp_mode, CallRecordWriteStub(object, address, remembered_set_action, fp_mode,
Handle<Code>::null(), wasm_target); Builtins::kNoBuiltinId, wasm_target);
} }
void TurboAssembler::CallRecordWriteStub( void TurboAssembler::CallRecordWriteStub(
Register object, Register address, Register object, Register address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode, RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
Handle<Code> code_target, Address wasm_target) { int builtin_index, Address wasm_target) {
DCHECK_NE(code_target.is_null(), wasm_target == kNullAddress); DCHECK_NE(builtin_index == Builtins::kNoBuiltinId,
wasm_target == kNullAddress);
// TODO(albertnetymk): For now we ignore remembered_set_action and fp_mode, // TODO(albertnetymk): For now we ignore remembered_set_action and fp_mode,
// i.e. always emit remember set and save FP registers in RecordWriteStub. If // i.e. always emit remember set and save FP registers in RecordWriteStub. If
// large performance regression is observed, we should use these values to // large performance regression is observed, we should use these values to
...@@ -301,9 +300,20 @@ void TurboAssembler::CallRecordWriteStub( ...@@ -301,9 +300,20 @@ void TurboAssembler::CallRecordWriteStub(
Move(remembered_set_parameter, Smi::FromEnum(remembered_set_action)); Move(remembered_set_parameter, Smi::FromEnum(remembered_set_action));
Move(fp_mode_parameter, Smi::FromEnum(fp_mode)); Move(fp_mode_parameter, Smi::FromEnum(fp_mode));
if (code_target.is_null()) { if (builtin_index == Builtins::kNoBuiltinId) {
Call(wasm_target, RelocInfo::WASM_STUB_CALL); Call(wasm_target, RelocInfo::WASM_STUB_CALL);
} else if (options().inline_offheap_trampolines) {
// Inline the trampoline.
DCHECK(Builtins::IsBuiltinId(builtin_index));
RecordCommentForOffHeapTrampoline(builtin_index);
CHECK_NE(builtin_index, Builtins::kNoBuiltinId);
EmbeddedData d = EmbeddedData::FromBlob();
Address entry = d.InstructionStartOfBuiltin(builtin_index);
li(t9, Operand(entry, RelocInfo::OFF_HEAP_TARGET));
Call(t9);
} else { } else {
Handle<Code> code_target =
isolate()->builtins()->builtin_handle(Builtins::kRecordWrite);
Call(code_target, RelocInfo::CODE_TARGET); Call(code_target, RelocInfo::CODE_TARGET);
} }
......
...@@ -911,7 +911,7 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase { ...@@ -911,7 +911,7 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
void CallRecordWriteStub(Register object, Register address, void CallRecordWriteStub(Register object, Register address,
RememberedSetAction remembered_set_action, RememberedSetAction remembered_set_action,
SaveFPRegsMode fp_mode, Handle<Code> code_target, SaveFPRegsMode fp_mode, int builtin_index,
Address wasm_target); Address wasm_target);
}; };
......
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