2014-05-23 Yvan Roux <yvan.roux@linaro.org>
authoryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 12 Jun 2014 11:05:18 +0000 (11:05 +0000)
committeryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 12 Jun 2014 11:05:18 +0000 (11:05 +0000)
       Backport from trunk r209627, 209636.
       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):
       Fix indentation.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/linaro/gcc-4_9-branch@211512 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog.linaro
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/aarch64.h

index 5ed85f6..c8cb107 100644 (file)
@@ -1,5 +1,20 @@
 2014-05-23  Yvan Roux  <yvan.roux@linaro.org>
 
+       Backport from trunk r209627, 209636.
+       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):
+       Fix indentation.
+
+2014-05-23  Yvan Roux  <yvan.roux@linaro.org>
+
        Backport from trunk r209618.
        2014-04-22  Renlin Li  <Renlin.Li@arm.com>
 
index 10793dd..51a8a7d 100644 (file)
@@ -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 =
@@ -4147,32 +4143,31 @@ aarch64_initial_elimination_offset (unsigned from, unsigned to)
                + crtl->outgoing_args_size
                + cfun->machine->saved_varargs_size);
 
-   frame_size = AARCH64_ROUND_UP (frame_size, STACK_BOUNDARY / BITS_PER_UNIT);
-   offset = frame_size;
+  frame_size = AARCH64_ROUND_UP (frame_size, STACK_BOUNDARY / BITS_PER_UNIT);
+  offset = frame_size;
 
-   if (to == HARD_FRAME_POINTER_REGNUM)
-     {
-       if (from == ARG_POINTER_REGNUM)
-        return offset - crtl->outgoing_args_size;
+  if (to == HARD_FRAME_POINTER_REGNUM)
+    {
+      if (from == ARG_POINTER_REGNUM)
+       return offset - crtl->outgoing_args_size;
 
-       if (from == FRAME_POINTER_REGNUM)
-        return cfun->machine->frame.saved_regs_size + get_frame_size ();
-     }
+      if (from == FRAME_POINTER_REGNUM)
+       return cfun->machine->frame.saved_regs_size + get_frame_size ();
+    }
 
-   if (to == STACK_POINTER_REGNUM)
-     {
-       if (from == FRAME_POINTER_REGNUM)
-         {
-           HOST_WIDE_INT elim = crtl->outgoing_args_size
-                              + cfun->machine->frame.saved_regs_size
-                              + get_frame_size ()
-                              - cfun->machine->frame.fp_lr_offset;
-           elim = AARCH64_ROUND_UP (elim, STACK_BOUNDARY / BITS_PER_UNIT);
-           return elim;
-         }
-     }
+  if (to == STACK_POINTER_REGNUM)
+    {
+      if (from == FRAME_POINTER_REGNUM)
+       {
+         HOST_WIDE_INT elim = crtl->outgoing_args_size
+           + cfun->machine->frame.saved_regs_size
+           + get_frame_size ();
+         elim = AARCH64_ROUND_UP (elim, STACK_BOUNDARY / BITS_PER_UNIT);
+         return elim;
+       }
+    }
 
-   return offset;
+  return offset;
 }
 
 
index 2fd6df4..e2b6c8e 100644 (file)
@@ -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;
 };