Commit 1e4bb087 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[codegen][arm] Better load of receiver in CheckDebugHook

x64 code path is different and we can't do this optimization.

Bug: v8:9771
Change-Id: I1639e53b4397873e70895ec2919ac2769b0bbc72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1826728Reviewed-by: 's avatarDan Elphick <delphick@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64022}
parent ea6844a6
......@@ -1617,11 +1617,10 @@ void MacroAssembler::CheckDebugHook(Register fun, Register new_target,
{
// Load receiver to pass it later to DebugOnFunctionCall hook.
if (actual.is_reg()) {
mov(r4, actual.reg());
ldr(r4, MemOperand(sp, actual.reg(), LSL, kPointerSizeLog2));
} else {
mov(r4, Operand(actual.immediate()));
ldr(r4, MemOperand(sp, actual.immediate() << kPointerSizeLog2));
}
ldr(r4, MemOperand(sp, r4, LSL, kPointerSizeLog2));
FrameScope frame(this,
has_frame() ? StackFrame::NONE : StackFrame::INTERNAL);
if (expected.is_reg()) {
......
......@@ -2222,10 +2222,11 @@ void MacroAssembler::CheckDebugHook(Register fun, Register new_target,
{
// Load receiver to pass it later to DebugOnFunctionCall hook.
Operand actual_op = actual.is_immediate() ? Operand(actual.immediate())
: Operand(actual.reg());
Mov(x4, actual_op);
Ldr(x4, MemOperand(sp, x4, LSL, kSystemPointerSizeLog2));
if (actual.is_reg()) {
Ldr(x4, MemOperand(sp, actual.reg(), LSL, kSystemPointerSizeLog2));
} else {
Ldr(x4, MemOperand(sp, actual.immediate() << kSystemPointerSizeLog2));
}
FrameScope frame(this,
has_frame() ? StackFrame::NONE : StackFrame::INTERNAL);
......
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