]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Restore Sparc build.
authorSteven Bosscher <steven@gcc.gnu.org>
Sat, 2 Jun 2012 21:51:18 +0000 (21:51 +0000)
committerDavid S. Miller <davem@gcc.gnu.org>
Sat, 2 Jun 2012 21:51:18 +0000 (14:51 -0700)
gcc/

* config/sparc/sparc.h (INITIAL_ELIMINATION_OFFSET): Split out to
new function sparc_initial_elimination_offset.
* config/sparc/sparc.c (sparc_initial_elimination_offset): New
function.
* config/sparc/sparc-protos.h (sparc_initial_elimination_offset):
Prototype it.

From-SVN: r188142

gcc/ChangeLog
gcc/config/sparc/sparc-protos.h
gcc/config/sparc/sparc.c
gcc/config/sparc/sparc.h

index 5a43bb7a8e87b6c318d1c90087363e2aa3fedf07..2eb5720b4abd3e51766296a98451ef934bfd9a70 100644 (file)
@@ -1,3 +1,12 @@
+2012-06-02  Steven Bosscher  <steven@gcc.gnu.org>
+
+       * config/sparc/sparc.h (INITIAL_ELIMINATION_OFFSET): Split out to
+       new function sparc_initial_elimination_offset.
+       * config/sparc/sparc.c (sparc_initial_elimination_offset): New
+       function.
+       * config/sparc/sparc-protos.h (sparc_initial_elimination_offset):
+       Prototype it.
+
 2012-06-2  Kenneth Zadeck <zadeck@naturalbridge.com>
 
        * expmed.c (expand_mult, choose_multiplier): Change "2 *
index 52acc096ce3c1540371b421918e07e8726466303..b03f5cc58585748cd5027489639eeb080a536129 100644 (file)
@@ -37,6 +37,7 @@ extern enum direction function_arg_padding (enum machine_mode, const_tree);
 
 extern void order_regs_for_local_alloc (void);
 extern HOST_WIDE_INT sparc_compute_frame_size (HOST_WIDE_INT, int);
+extern int sparc_initial_elimination_offset (int);
 extern void sparc_expand_prologue (void);
 extern void sparc_flat_expand_prologue (void);
 extern void sparc_expand_epilogue (bool);
index 54fce8f6ddb20cb272769c7ccb3c57628b47f939..7b1899d661c3988b63782735d2d65075d521cd0f 100644 (file)
@@ -4551,6 +4551,23 @@ sparc_compute_frame_size (HOST_WIDE_INT size, int leaf_function)
   return frame_size;
 }
 
+/* Implement the macro INITIAL_ELIMINATION_OFFSET, return the OFFSET.  */
+
+int
+sparc_initial_elimination_offset (int to)
+{
+  int offset;
+
+  if (to == STACK_POINTER_REGNUM)
+    offset = sparc_compute_frame_size (get_frame_size (),
+                                      current_function_is_leaf);
+  else
+    offset = 0;
+
+  offset += SPARC_STACK_BIAS;
+  return offset;
+}
+
 /* Output any necessary .register pseudo-ops.  */
 
 void
index a2bf09f1c810cca59d7254c5d6c8a5ae64b84db8..234edcfd9c4a19974bda95aed83c761336a557ee 100644 (file)
@@ -1104,15 +1104,12 @@ extern char leaf_reg_remap[];
   {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
    { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM} }
 
-#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET)                   \
-  do {                                                                 \
-    if ((TO) == STACK_POINTER_REGNUM)                                  \
-      (OFFSET) = sparc_compute_frame_size (get_frame_size (),          \
-                                          current_function_is_leaf);   \
-    else                                                               \
-      (OFFSET) = 0;                                                    \
-    (OFFSET) += SPARC_STACK_BIAS;                                      \
-  } while (0)
+#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET)           \
+  do                                                           \
+    {                                                          \
+      (OFFSET) = sparc_initial_elimination_offset ((TO));      \
+    }                                                          \
+  while (0)
 
 /* Keep the stack pointer constant throughout the function.
    This is both an optimization and a necessity: longjmp