diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2023-09-12 16:05:07 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2023-09-12 16:05:07 +0100 |
commit | aa8b57ee0206e8e5ac7078692ee67fb6ead05645 (patch) | |
tree | 58e3f7c02e67b015d6ae04f06a087bf0fd31e6bf /gcc/config/aarch64/aarch64.cc | |
parent | 38698967268c44991e02aa1e5a2ce9382d6de9db (diff) | |
download | gcc-aa8b57ee0206e8e5ac7078692ee67fb6ead05645.zip gcc-aa8b57ee0206e8e5ac7078692ee67fb6ead05645.tar.gz gcc-aa8b57ee0206e8e5ac7078692ee67fb6ead05645.tar.bz2 |
aarch64: Only calculate chain_offset if there is a chain
After previous patches, it is no longer necessary to calculate
a chain_offset in cases where there is no chain record.
gcc/
* config/aarch64/aarch64.cc (aarch64_expand_prologue): Move the
calculation of chain_offset into the emit_frame_chain block.
Diffstat (limited to 'gcc/config/aarch64/aarch64.cc')
-rw-r--r-- | gcc/config/aarch64/aarch64.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 2c218c9..25b5fb2 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -10111,16 +10111,16 @@ aarch64_expand_prologue (void) if (callee_adjust != 0) aarch64_push_regs (reg1, reg2, callee_adjust); - /* The offset of the frame chain record (if any) from the current SP. */ - poly_int64 chain_offset = (initial_adjust + callee_adjust - - frame.hard_fp_offset); - gcc_assert (known_ge (chain_offset, 0)); - /* The offset of the current SP from the bottom of the static frame. */ poly_int64 bytes_below_sp = frame_size - initial_adjust - callee_adjust; if (emit_frame_chain) { + /* The offset of the frame chain record (if any) from the current SP. */ + poly_int64 chain_offset = (initial_adjust + callee_adjust + - frame.hard_fp_offset); + gcc_assert (known_ge (chain_offset, 0)); + if (callee_adjust == 0) { reg1 = R29_REGNUM; |