aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMarcus Shawcroft <marcus.shawcroft@arm.com>2014-06-05 12:57:01 +0000
committerMarcus Shawcroft <mshawcroft@gcc.gnu.org>2014-06-05 12:57:01 +0000
commit2e1cdae5dbcb268dc3fc451fa4179a5c8ee0b0f4 (patch)
treea4c13d2f4f867dd49bda90478a85c7b95bf15914 /gcc
parent5ae98e828d779eaada3d1a8a3ee2f17ecac401de (diff)
downloadgcc-2e1cdae5dbcb268dc3fc451fa4179a5c8ee0b0f4.zip
gcc-2e1cdae5dbcb268dc3fc451fa4179a5c8ee0b0f4.tar.gz
gcc-2e1cdae5dbcb268dc3fc451fa4179a5c8ee0b0f4.tar.bz2
[AArch64] Unify callee save slot allocation for X29 and X30.
Co-Authored-By: Jiong Wang <jiong.wang@arm.com> From-SVN: r211273
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/aarch64/aarch64.c18
2 files changed, 11 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 777eb25..525ef8f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,6 +1,13 @@
2014-06-05 Marcus Shawcroft <marcus.shawcroft@arm.com>
Jiong Wang <jiong.wang@arm.com>
+ * config/aarch64/aarch64.c (aarch64_layout_frame): Correct
+ initialization of R30 offset. Update offset. Iterate core
+ regisers upto X30. Remove X29, X30 specific code.
+
+2014-06-05 Marcus Shawcroft <marcus.shawcroft@arm.com>
+ Jiong Wang <jiong.wang@arm.com>
+
* config/aarch64/aarch64.c (SLOT_NOT_REQUIRED, SLOT_REQUIRED): Define.
(aarch64_layout_frame): Use SLOT_NOT_REQUIRED and SLOT_REQUIRED.
(aarch64_register_saved_on_entry): Adjust test.
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index a58d93f..1aa951c 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -1841,13 +1841,15 @@ aarch64_layout_frame (void)
if (frame_pointer_needed)
{
- cfun->machine->frame.reg_offset[R30_REGNUM] = 0;
+ /* FP and LR are placed in the linkage record. */
cfun->machine->frame.reg_offset[R29_REGNUM] = 0;
+ cfun->machine->frame.reg_offset[R30_REGNUM] = UNITS_PER_WORD;
cfun->machine->frame.hardfp_offset = 2 * UNITS_PER_WORD;
+ offset += 2 * UNITS_PER_WORD;
}
/* Now assign stack slots for them. */
- for (regno = R0_REGNUM; regno <= R28_REGNUM; regno++)
+ for (regno = R0_REGNUM; regno <= R30_REGNUM; regno++)
if (cfun->machine->frame.reg_offset[regno] == SLOT_REQUIRED)
{
cfun->machine->frame.reg_offset[regno] = offset;
@@ -1861,18 +1863,6 @@ aarch64_layout_frame (void)
offset += UNITS_PER_WORD;
}
- if (frame_pointer_needed)
- {
- cfun->machine->frame.reg_offset[R29_REGNUM] = offset;
- offset += UNITS_PER_WORD;
- }
-
- if (cfun->machine->frame.reg_offset[R30_REGNUM] == SLOT_REQUIRED)
- {
- cfun->machine->frame.reg_offset[R30_REGNUM] = offset;
- offset += UNITS_PER_WORD;
- }
-
cfun->machine->frame.padding0 =
(AARCH64_ROUND_UP (offset, STACK_BOUNDARY / BITS_PER_UNIT) - offset);
offset = AARCH64_ROUND_UP (offset, STACK_BOUNDARY / BITS_PER_UNIT);