Commit 9fcb9693 authored by Georgia Kouveli's avatar Georgia Kouveli Committed by V8 LUCI CQ

[arm64] Add missing scope around UseScratchRegisterScope.

`UseScratchRegisterScope` should be used in a block scope, to avoid keeping the
scratch register in use for longer than it's needed. Spotted when experimenting
with the `v8_enable_heap_sandbox` and `v8_enable_external_code_space` flags.

Change-Id: I34330f3e4dbd114aa75efb0ebdcf557f0bd45f11
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3256997Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/main@{#77679}
parent 7119b053
......@@ -1891,10 +1891,12 @@ static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) {
__ Ldr(kJavaScriptCallCodeStartRegister,
MemOperand(kInterpreterDispatchTableRegister, x1));
UseScratchRegisterScope temps(masm);
temps.Exclude(x17);
__ Mov(x17, kJavaScriptCallCodeStartRegister);
__ Jump(x17);
{
UseScratchRegisterScope temps(masm);
temps.Exclude(x17);
__ Mov(x17, kJavaScriptCallCodeStartRegister);
__ Jump(x17);
}
__ Bind(&return_from_bytecode_dispatch);
......@@ -1932,8 +1934,12 @@ static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) {
__ Bind(&trampoline_loaded);
__ Add(x17, x1, Operand(interpreter_entry_return_pc_offset.value()));
__ Br(x17);
{
UseScratchRegisterScope temps(masm);
temps.Exclude(x17);
__ Add(x17, x1, Operand(interpreter_entry_return_pc_offset.value()));
__ Br(x17);
}
}
void Builtins::Generate_InterpreterEnterAtNextBytecode(MacroAssembler* masm) {
......
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