Commit 3e2b9a31 authored by George Wort's avatar George Wort Committed by V8 LUCI CQ

[arm64] Add DCHECK for negative stack pointer offset

Negative offsets from the stack pointer are prohibited by the
simulator so add a check to catch this at compile time.

This DCHECK is currently tripped by the
v8_enable_builtins_profiling and
--turbo_force_mid_tier_regalloc flags
causing the mid-tier register allocator to be used.

Bug: chromium:1299793
Change-Id: I0d11e584178cc08a500e563fa213737a93b10bad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3483660Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
Cr-Commit-Position: refs/heads/main@{#79238}
parent bb9004f3
......@@ -255,6 +255,9 @@ class Arm64OperandConverter final : public InstructionOperandConverter {
offset = FrameOffset::FromStackPointer(from_sp);
}
}
// Access below the stack pointer is not expected in arm64 and is actively
// prevented at run time in the simulator.
DCHECK_IMPLIES(offset.from_stack_pointer(), offset.offset() >= 0);
return MemOperand(offset.from_stack_pointer() ? sp : fp, offset.offset());
}
};
......
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