diff options
author | Renlin Li <renlin.li@arm.com> | 2014-04-22 14:35:33 +0000 |
---|---|---|
committer | Marcus Shawcroft <mshawcroft@gcc.gnu.org> | 2014-04-22 14:35:33 +0000 |
commit | 53e5ace2e9b7a1c48d5ca0cd1d66215e89075ee8 (patch) | |
tree | 5c81b5ac3453d7973a1b293942e52f72a79f1552 | |
parent | 78c29983f2d170312a9c4543a0a04fa559e6e095 (diff) | |
download | gcc-53e5ace2e9b7a1c48d5ca0cd1d66215e89075ee8.zip gcc-53e5ace2e9b7a1c48d5ca0cd1d66215e89075ee8.tar.gz gcc-53e5ace2e9b7a1c48d5ca0cd1d66215e89075ee8.tar.bz2 |
[AArch64] Fix aarch64_initial_elimination_offset calculation.
This patch fixes the elimination offset calculation. This is a latent
bug hidden by the frame alignment calculation.
Co-Authored-By: Jiong Wang <jiong.wang@arm.com>
From-SVN: r209636
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 7 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.h | 1 |
3 files changed, 8 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 809601a..2c46cc4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-04-22 Renlin <renlin.li@arm.com> + Jiong Wang <jiong.wang@arm.com> + + * config/aarch64/aarch64.h (aarch64_frame): Delete "fp_lr_offset". + * config/aarch64/aarch64.c (aarch64_layout_frame) + (aarch64_initial_elimination_offset): Likewise. + 2014-04-22 Marcus Shawcroft <marcus.shawcroft@arm.com> * config/aarch64/aarch64.c (aarch64_initial_elimination_offset): diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index e83e721..51a8a7d 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -1713,8 +1713,6 @@ aarch64_layout_frame (void) if (reload_completed && cfun->machine->frame.laid_out) return; - cfun->machine->frame.fp_lr_offset = 0; - /* First mark all the registers that really need to be saved... */ for (regno = R0_REGNUM; regno <= R30_REGNUM; regno++) cfun->machine->frame.reg_offset[regno] = -1; @@ -1764,14 +1762,12 @@ aarch64_layout_frame (void) { cfun->machine->frame.reg_offset[R29_REGNUM] = offset; offset += UNITS_PER_WORD; - cfun->machine->frame.fp_lr_offset = UNITS_PER_WORD; } if (cfun->machine->frame.reg_offset[R30_REGNUM] != -1) { cfun->machine->frame.reg_offset[R30_REGNUM] = offset; offset += UNITS_PER_WORD; - cfun->machine->frame.fp_lr_offset += UNITS_PER_WORD; } cfun->machine->frame.padding0 = @@ -4165,8 +4161,7 @@ aarch64_initial_elimination_offset (unsigned from, unsigned to) { HOST_WIDE_INT elim = crtl->outgoing_args_size + cfun->machine->frame.saved_regs_size - + get_frame_size () - - cfun->machine->frame.fp_lr_offset; + + get_frame_size (); elim = AARCH64_ROUND_UP (elim, STACK_BOUNDARY / BITS_PER_UNIT); return elim; } diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 7962aa4..b87473b 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -520,7 +520,6 @@ struct GTY (()) aarch64_frame been saved. */ HOST_WIDE_INT padding0; HOST_WIDE_INT hardfp_offset; /* HARD_FRAME_POINTER_REGNUM */ - HOST_WIDE_INT fp_lr_offset; /* Space needed for saving fp and/or lr */ bool laid_out; }; |