diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2025-04-24 14:31:49 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2025-04-24 14:31:49 +0100 |
commit | fa61afef18a8566d1907a5ae0e7754e1eac207d9 (patch) | |
tree | 6bd0b18bca336f8ac8a100cb403a13fc2e38ea98 /libgomp/testsuite/libgomp.oacc-c-c++-common/lib-91.c | |
parent | 4c8c400ddf0d6de54b0ee557836a934b4025d21f (diff) | |
download | gcc-master.zip gcc-master.tar.gz gcc-master.tar.bz2 |
PR119610 is about incorrect CFI output for a stack probe when that
probe is not the initial allocation. The main aarch64 stack probe
function, aarch64_allocate_and_probe_stack_space, implicitly assumed
that the incoming stack pointer pointed to the top of the frame,
and thus held the CFA.
aarch64_save_callee_saves and aarch64_restore_callee_saves use a
parameter called bytes_below_sp to track how far the stack pointer
is above the base of the static frame. This patch does the same
thing for aarch64_allocate_and_probe_stack_space.
Also, I noticed that the SVE path was attaching the first CFA note
to the wrong instruction: it was attaching the note to the calculation
of the stack size, rather than to the r11<-sp copy.
gcc/
PR target/119610
* config/aarch64/aarch64.cc (aarch64_allocate_and_probe_stack_space):
Add a bytes_below_sp parameter and use it to calculate the CFA
offsets. Attach the first SVE CFA note to the move into the
associated temporary register.
(aarch64_allocate_and_probe_stack_space): Update calls accordingly.
Start out with bytes_per_sp set to the frame size and decrement
it after each allocation.
gcc/testsuite/
PR target/119610
* g++.dg/torture/pr119610.C: New test.
* g++.target/aarch64/sve/pr119610-sve.C: Likewise.
Diffstat (limited to 'libgomp/testsuite/libgomp.oacc-c-c++-common/lib-91.c')
0 files changed, 0 insertions, 0 deletions