diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-07-31 10:27:42 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-07-31 10:27:42 +0000 |
commit | 3a51bad938848fc9a96d13800b3e9a9af6ccf923 (patch) | |
tree | 0120ee57e32ca55e7fbb0d80115e69ccb7c54fd7 | |
parent | 28a38185350430c231d97e952f4ed8b88932e1d0 (diff) | |
download | gcc-3a51bad938848fc9a96d13800b3e9a9af6ccf923.tar.gz |
* pa.c (compute_frame_size): Use STARTINg_FRAME_OFFSET instead
of depending on a magic constant value. Update comments.
(hppa_expand_prologue): Similarly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28356 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/pa/pa.c | 29 |
2 files changed, 29 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b3c539523ce..4e518264c14 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ Sat Jul 31 04:10:01 1999 Jeffrey A Law (law@cygnus.com) + * pa.c (compute_frame_size): Use STARTINg_FRAME_OFFSET instead + of depending on a magic constant value. Update comments. + (hppa_expand_prologue): Similarly. + * pa.md (reload_indi, reload_outdi): Allow any register for the original reload register. diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index be9f65e3ba3..209976d473d 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -2593,10 +2593,14 @@ compute_frame_size (size, fregs_live) extern int current_function_outgoing_args_size; int i, fsize; - /* 8 is space for frame pointer + filler. If any frame is allocated - we need to add this in because of STARTING_FRAME_OFFSET. */ - fsize = size + (size || frame_pointer_needed ? 8 : 0); + /* Space for frame pointer + filler. If any frame is allocated + we need to add this in because of STARTING_FRAME_OFFSET. + Similar code also appears in hppa_expand_prologue. Change both + of them at the same time. */ + fsize = size + (size || frame_pointer_needed ? STARTING_FRAME_OFFSET : 0); + + /* Account for space used by the callee general register saves. */ for (i = 18; i >= 3; i--) if (regs_ever_live[i]) fsize += UNITS_PER_WORD; @@ -2604,16 +2608,25 @@ compute_frame_size (size, fregs_live) /* Round the stack. */ fsize = (fsize + 7) & ~7; + /* Account for space used by the callee floating point register saves. */ for (i = 66; i >= 48; i -= 2) if (regs_ever_live[i] || regs_ever_live[i + 1]) { if (fregs_live) *fregs_live = 1; + /* We always save both halves of the FP register, so always + increment the frame size by 8 bytes. */ fsize += 8; } + /* The various ABIs include space for the outgoing parameters in the + size of the current function's stack frame. */ fsize += current_function_outgoing_args_size; + + /* Allocate space for the fixed frame marker. This space must be + allocated for any function that makes calls or otherwise allocates + stack space. */ if (! leaf_function_p () || fsize) fsize += 32; return (fsize + STACK_BOUNDARY - 1) & ~(STACK_BOUNDARY - 1); @@ -2703,7 +2716,15 @@ hppa_expand_prologue() gr_saved = 0; fr_saved = 0; save_fregs = 0; - local_fsize = size + (size || frame_pointer_needed ? 8 : 0); + + /* Allocate space for frame pointer + filler. If any frame is allocated + we need to add this in because of STARTING_FRAME_OFFSET. + + Similar code also appears in compute_frame_size. Change both + of them at the same time. */ + local_fsize = size + (size || frame_pointer_needed + ? STARTING_FRAME_OFFSET : 0); + actual_fsize = compute_frame_size (size, &save_fregs); /* Compute a few things we will use often. */ |