]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Explicitly handle frames with no saved registers
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 12 Sep 2023 15:08:49 +0000 (16:08 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Tue, 12 Sep 2023 15:08:49 +0000 (16:08 +0100)
commit03d5e89e7f3be53fd7142556e8e0a2774c653dca
treea143cdf189b45ac9adc4e949e2fea5e507d9e124
parent12a8889de169f892d2e927584c00d20b8b7e456f
aarch64: Explicitly handle frames with no saved registers

If a frame has no saved registers, it can be allocated in one go.
There is no need to treat the areas below and above the saved
registers as separate.

And if we allocate the frame in one go, it should be allocated
as the initial_adjust rather than the final_adjust.  This allows the
frame size to grow to guard_size - guard_used_by_caller before a stack
probe is needed.  (A frame with no register saves is necessarily a
leaf frame.)

This is a no-op as thing stand, since a leaf function will have
no outgoing arguments, and so all the frame will be above where
the saved registers normally go.

gcc/
* config/aarch64/aarch64.cc (aarch64_layout_frame): Explicitly
allocate the frame in one go if there are no saved registers.
gcc/config/aarch64/aarch64.cc