[builtins] Combine SmiUntag with loading a value
Combining the load with the SmiUntag let's us have better instruction selection opportunities against not doing it. Bug: v8:9771 Change-Id: I6b6391398413ee1bc808c71d48474e9336c09f2b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1826734 Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org> Reviewed-by: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#64025}
This commit is contained in:
parent
559a003454
commit
6a0c7680dd
@ -1313,9 +1313,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
|
|||||||
// Get bytecode array and bytecode offset from the stack frame.
|
// Get bytecode array and bytecode offset from the stack frame.
|
||||||
__ Ldr(kInterpreterBytecodeArrayRegister,
|
__ Ldr(kInterpreterBytecodeArrayRegister,
|
||||||
MemOperand(fp, InterpreterFrameConstants::kBytecodeArrayFromFp));
|
MemOperand(fp, InterpreterFrameConstants::kBytecodeArrayFromFp));
|
||||||
__ Ldr(kInterpreterBytecodeOffsetRegister,
|
__ SmiUntag(kInterpreterBytecodeOffsetRegister,
|
||||||
MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
|
MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
|
||||||
__ SmiUntag(kInterpreterBytecodeOffsetRegister);
|
|
||||||
|
|
||||||
// Either return, or advance to the next bytecode and dispatch.
|
// Either return, or advance to the next bytecode and dispatch.
|
||||||
Label do_return;
|
Label do_return;
|
||||||
@ -1545,9 +1544,8 @@ static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the target bytecode offset from the frame.
|
// Get the target bytecode offset from the frame.
|
||||||
__ Ldr(kInterpreterBytecodeOffsetRegister,
|
__ SmiUntag(kInterpreterBytecodeOffsetRegister,
|
||||||
MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
|
MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
|
||||||
__ SmiUntag(kInterpreterBytecodeOffsetRegister);
|
|
||||||
|
|
||||||
// Dispatch to the target bytecode.
|
// Dispatch to the target bytecode.
|
||||||
__ Ldrb(x23, MemOperand(kInterpreterBytecodeArrayRegister,
|
__ Ldrb(x23, MemOperand(kInterpreterBytecodeArrayRegister,
|
||||||
@ -1562,9 +1560,8 @@ void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
|
|||||||
// Get bytecode array and bytecode offset from the stack frame.
|
// Get bytecode array and bytecode offset from the stack frame.
|
||||||
__ ldr(kInterpreterBytecodeArrayRegister,
|
__ ldr(kInterpreterBytecodeArrayRegister,
|
||||||
MemOperand(fp, InterpreterFrameConstants::kBytecodeArrayFromFp));
|
MemOperand(fp, InterpreterFrameConstants::kBytecodeArrayFromFp));
|
||||||
__ ldr(kInterpreterBytecodeOffsetRegister,
|
__ SmiUntag(kInterpreterBytecodeOffsetRegister,
|
||||||
MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
|
MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
|
||||||
__ SmiUntag(kInterpreterBytecodeOffsetRegister);
|
|
||||||
|
|
||||||
// Load the current bytecode.
|
// Load the current bytecode.
|
||||||
__ Ldrb(x1, MemOperand(kInterpreterBytecodeArrayRegister,
|
__ Ldrb(x1, MemOperand(kInterpreterBytecodeArrayRegister,
|
||||||
|
@ -1199,9 +1199,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
|
|||||||
// Get bytecode array and bytecode offset from the stack frame.
|
// Get bytecode array and bytecode offset from the stack frame.
|
||||||
__ movq(kInterpreterBytecodeArrayRegister,
|
__ movq(kInterpreterBytecodeArrayRegister,
|
||||||
Operand(rbp, InterpreterFrameConstants::kBytecodeArrayFromFp));
|
Operand(rbp, InterpreterFrameConstants::kBytecodeArrayFromFp));
|
||||||
__ movq(kInterpreterBytecodeOffsetRegister,
|
__ SmiUntag(kInterpreterBytecodeOffsetRegister,
|
||||||
Operand(rbp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
|
Operand(rbp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
|
||||||
__ SmiUntag(kInterpreterBytecodeOffsetRegister);
|
|
||||||
|
|
||||||
// Either return, or advance to the next bytecode and dispatch.
|
// Either return, or advance to the next bytecode and dispatch.
|
||||||
Label do_return;
|
Label do_return;
|
||||||
@ -1426,9 +1425,8 @@ static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the target bytecode offset from the frame.
|
// Get the target bytecode offset from the frame.
|
||||||
__ movq(kInterpreterBytecodeOffsetRegister,
|
__ SmiUntag(kInterpreterBytecodeOffsetRegister,
|
||||||
Operand(rbp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
|
Operand(rbp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
|
||||||
__ SmiUntag(kInterpreterBytecodeOffsetRegister);
|
|
||||||
|
|
||||||
// Dispatch to the target bytecode.
|
// Dispatch to the target bytecode.
|
||||||
__ movzxbq(r11, Operand(kInterpreterBytecodeArrayRegister,
|
__ movzxbq(r11, Operand(kInterpreterBytecodeArrayRegister,
|
||||||
@ -1443,9 +1441,8 @@ void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
|
|||||||
// Get bytecode array and bytecode offset from the stack frame.
|
// Get bytecode array and bytecode offset from the stack frame.
|
||||||
__ movq(kInterpreterBytecodeArrayRegister,
|
__ movq(kInterpreterBytecodeArrayRegister,
|
||||||
Operand(rbp, InterpreterFrameConstants::kBytecodeArrayFromFp));
|
Operand(rbp, InterpreterFrameConstants::kBytecodeArrayFromFp));
|
||||||
__ movq(kInterpreterBytecodeOffsetRegister,
|
__ SmiUntag(kInterpreterBytecodeOffsetRegister,
|
||||||
Operand(rbp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
|
Operand(rbp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
|
||||||
__ SmiUntag(kInterpreterBytecodeOffsetRegister);
|
|
||||||
|
|
||||||
// Load the current bytecode.
|
// Load the current bytecode.
|
||||||
__ movzxbq(rbx, Operand(kInterpreterBytecodeArrayRegister,
|
__ movzxbq(rbx, Operand(kInterpreterBytecodeArrayRegister,
|
||||||
|
Loading…
Reference in New Issue
Block a user