diff options
author | danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-26 16:29:22 +0000 |
---|---|---|
committer | danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-26 16:29:22 +0000 |
commit | 81d1e3152e8a231fd349d3258e375ceeb1ea7b37 (patch) | |
tree | 44ee2dcc6d4ebf92d24d74f9b7200f677d545c7e | |
parent | ad5201d046fced6c8229893e48355dd4abdd37b7 (diff) | |
download | ppe42-gcc-81d1e3152e8a231fd349d3258e375ceeb1ea7b37.tar.gz ppe42-gcc-81d1e3152e8a231fd349d3258e375ceeb1ea7b37.zip |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63473 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/pa/pa.c | 3 | ||||
-rw-r--r-- | gcc/config/pa/pa.h | 9 |
3 files changed, 13 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d387dea047a..2aebbd01567 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index ea6df059104..27b218c72e0 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -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 diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index e03c1b80251..0b055e9b16b 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -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 |