diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2023-09-12 16:05:04 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2023-09-12 16:05:04 +0100 |
commit | f9ab771fa8cd747f34786c6f33deea32c2eb828b (patch) | |
tree | 02d8317ad3a7c604fdc25dc34da5ffbd5f931926 /gcc/go | |
parent | 76d89da25af3064e80c9b7b584c678ff72b1f0bd (diff) | |
download | gcc-f9ab771fa8cd747f34786c6f33deea32c2eb828b.zip gcc-f9ab771fa8cd747f34786c6f33deea32c2eb828b.tar.gz gcc-f9ab771fa8cd747f34786c6f33deea32c2eb828b.tar.bz2 |
aarch64: Avoid a use of callee_offset
When we emit the frame chain, i.e. when we reach Here in this statement
of aarch64_expand_prologue:
if (emit_frame_chain)
{
// Here
...
}
the stack is in one of two states:
- We've allocated up to the frame chain, but no more.
- We've allocated the whole frame, and the frame chain is within easy
reach of the new SP.
The offset of the frame chain from the current SP is available
in aarch64_frame as callee_offset. It is also available as the
chain_offset local variable, where the latter is calculated from other
data. (However, chain_offset is not always equal to callee_offset when
!emit_frame_chain, so chain_offset isn't redundant.)
In c600df9a4060da3c6121ff4d0b93f179eafd69d1 I switched to using
chain_offset for the initialisation of the hard frame pointer:
aarch64_add_offset (Pmode, hard_frame_pointer_rtx,
- stack_pointer_rtx, callee_offset,
+ stack_pointer_rtx, chain_offset,
tmp1_rtx, tmp0_rtx, frame_pointer_needed);
But the later REG_CFA_ADJUST_CFA handling still used callee_offset.
I think the difference is harmless, but it's more logical for the
CFA note to be in sync, and it's more convenient for later patches
if it uses chain_offset.
gcc/
* config/aarch64/aarch64.cc (aarch64_expand_prologue): Use
chain_offset rather than callee_offset.
Diffstat (limited to 'gcc/go')
0 files changed, 0 insertions, 0 deletions