diff options
author | John David Anglin <dave.anglin@nrc-cnrc.gc.ca> | 2003-02-26 16:29:22 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2003-02-26 16:29:22 +0000 |
commit | b0d7ef9afda5f6ddc09446e6387301ebe761616f (patch) | |
tree | 44ee2dcc6d4ebf92d24d74f9b7200f677d545c7e /gcc | |
parent | a29c7ea6283b45f58d640c8747ee570a1b50bff7 (diff) | |
download | gcc-b0d7ef9afda5f6ddc09446e6387301ebe761616f.zip gcc-b0d7ef9afda5f6ddc09446e6387301ebe761616f.tar.gz gcc-b0d7ef9afda5f6ddc09446e6387301ebe761616f.tar.bz2 |
pa.c (compute_frame_size): Don't assume PREFERRED_STACK_BOUNDARY is 8 * STACK_BOUNDARY.
* 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
Diffstat (limited to 'gcc')
-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 d387dea..2aebbd0 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 ea6df05..27b218c 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 e03c1b8..0b055e9 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 |