[libunwind][AArch64] Avoid assuming 16-byte frame in RA_SIGN_STATE test (#230518)
Disabling the GlobalISel Localizer pass at -O0 (#177359) moves the
materialization of -1 constant argument of _Exit before the call to bar.
The value spills across the call, increasing the frame size of foo from
16 to 32 bytes.
The inline asm adds 16 to the current SP before signing LR. With the
larger frame it signs with the wrong SP and overwrites the spill instead
of the saved LR. Use the frame address to recover the entry SP in the
generated prologue and preserve the current SP in x16.
Assisted-by: codex
GitOrigin-RevId: 6a3af6ddf3ea39f034ae325582036e4c2f66f6e4
1 file changed