[mips][builtins] Avoid reloading undefined value in InterpreterEntryTrampoline
Port: 40c0f84a38
Bug: v8:9771
Change-Id: Icbe4e3450bb6ef7242804ca9d7f46cb6f1aed40c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2539538
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#71336}
This commit is contained in:
parent
db5ede7ff8
commit
6ded810bb2
@ -1061,11 +1061,11 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
|
||||
// If ok, push undefined as the initial value for all register file entries.
|
||||
Label loop_header;
|
||||
Label loop_check;
|
||||
__ LoadRoot(t1, RootIndex::kUndefinedValue);
|
||||
__ LoadRoot(kInterpreterAccumulatorRegister, RootIndex::kUndefinedValue);
|
||||
__ Branch(&loop_check);
|
||||
__ bind(&loop_header);
|
||||
// TODO(rmcilroy): Consider doing more than one push per loop iteration.
|
||||
__ push(t1);
|
||||
__ push(kInterpreterAccumulatorRegister);
|
||||
// Continue loop if not done.
|
||||
__ bind(&loop_check);
|
||||
__ Subu(t0, t0, Operand(kPointerSize));
|
||||
@ -1091,8 +1091,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
|
||||
__ Branch(&stack_check_interrupt, lo, sp, Operand(a2));
|
||||
__ bind(&after_stack_check_interrupt);
|
||||
|
||||
// Load accumulator with undefined.
|
||||
__ LoadRoot(kInterpreterAccumulatorRegister, RootIndex::kUndefinedValue);
|
||||
// The accumulator is already loaded with undefined.
|
||||
|
||||
// Load the dispatch table into a register and dispatch to the bytecode
|
||||
// handler at the current bytecode offset.
|
||||
|
@ -1077,11 +1077,11 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
|
||||
// If ok, push undefined as the initial value for all register file entries.
|
||||
Label loop_header;
|
||||
Label loop_check;
|
||||
__ LoadRoot(a5, RootIndex::kUndefinedValue);
|
||||
__ LoadRoot(kInterpreterAccumulatorRegister, RootIndex::kUndefinedValue);
|
||||
__ Branch(&loop_check);
|
||||
__ bind(&loop_header);
|
||||
// TODO(rmcilroy): Consider doing more than one push per loop iteration.
|
||||
__ push(a5);
|
||||
__ push(kInterpreterAccumulatorRegister);
|
||||
// Continue loop if not done.
|
||||
__ bind(&loop_check);
|
||||
__ Dsubu(a4, a4, Operand(kPointerSize));
|
||||
@ -1107,8 +1107,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
|
||||
__ Branch(&stack_check_interrupt, lo, sp, Operand(a5));
|
||||
__ bind(&after_stack_check_interrupt);
|
||||
|
||||
// Load accumulator as undefined.
|
||||
__ LoadRoot(kInterpreterAccumulatorRegister, RootIndex::kUndefinedValue);
|
||||
// The accumulator is already loaded with undefined.
|
||||
|
||||
// Load the dispatch table into a register and dispatch to the bytecode
|
||||
// handler at the current bytecode offset.
|
||||
|
Loading…
Reference in New Issue
Block a user