]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pa.c (compute_frame_size): Don't assume PREFERRED_STACK_BOUNDARY is 8 * STACK_BOUNDARY.
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Wed, 26 Feb 2003 16:29:22 +0000 (16:29 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Wed, 26 Feb 2003 16:29:22 +0000 (16:29 +0000)
* pa.c (compute_frame_size): Don't assume PREFERRED_STACK_BOUNDARY
is 8 * STACK_BOUNDARY.
* pa.h (PREFERRED_STACK_BOUNDARY): Change to 128 on 64-bit port.

From-SVN: r63473

gcc/ChangeLog
gcc/config/pa/pa.c
gcc/config/pa/pa.h

index d387dea047af189fecb1e5b932c2a94ae94a8600..2aebbd015673f2236af7b19f7fd8dd93736dd177 100644 (file)
@@ -1,3 +1,9 @@
+2003-02-26  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       * pa.c (compute_frame_size): Don't assume PREFERRED_STACK_BOUNDARY
+       is 8 * STACK_BOUNDARY.
+       * pa.h (PREFERRED_STACK_BOUNDARY): Change to 128 on 64-bit port.
+
 2003-02-26  Michael Matz  <matz@suse.de>
 
        * ra-colorize.c (merge_moves): Fix list handling.
index ea6df059104a06d94d4ed0453038949235d7a93d..27b218c72e0137586bad0e870e0367017d79e800 100644 (file)
@@ -3247,7 +3247,8 @@ compute_frame_size (size, fregs_live)
   if (!current_function_is_leaf || fsize)
     fsize += TARGET_64BIT ? 16 : 32;
 
-  return (fsize + STACK_BOUNDARY - 1) & ~(STACK_BOUNDARY - 1);
+  return ((fsize + PREFERRED_STACK_BOUNDARY / 8 - 1)
+         & ~(PREFERRED_STACK_BOUNDARY / 8 - 1));
 }
 
 /* Generate the assembly code for function entry.  FILE is a stdio
index e03c1b80251a0a65433961c80473847bbceb074e..0b055e9b16b649e1c02b1111a5d1b71674b2a411 100644 (file)
@@ -461,11 +461,12 @@ do {                                                              \
 /* Boundary (in *bits*) on which stack pointer is always aligned;
    certain optimizations in combine depend on this.
 
-   GCC for the PA always rounds its stacks to a 8 * STACK_BOUNDARY
-   boundary, but that happens late in the compilation process.  */
+   The HP-UX runtime documents mandate 64-byte and 16-byte alignment for
+   the stack on the 32 and 64-bit ports, respectively.  However, we
+   are only guaranteed that the stack is aligned to BIGGEST_ALIGNMENT
+   in main.  Thus, we treat the former as the preferred alignment.  */
 #define STACK_BOUNDARY BIGGEST_ALIGNMENT
-
-#define PREFERRED_STACK_BOUNDARY (8 * STACK_BOUNDARY)
+#define PREFERRED_STACK_BOUNDARY (TARGET_64BIT ? 128 : 512)
 
 /* Allocation boundary (in *bits*) for the code of a function.  */
 #define FUNCTION_BOUNDARY BITS_PER_WORD