diff options
author | Jeff Law <law@gcc.gnu.org> | 1993-10-10 20:32:35 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1993-10-10 20:32:35 -0600 |
commit | e8cfae5c8e22f52a49c37814b119185bc348bcf0 (patch) | |
tree | 5ce9377f91053c5fca833a69c5345deb6cfddd48 /gcc | |
parent | 0d69ab6fee5d77a22538c637e5b1d08bd8e08e88 (diff) | |
download | gcc-e8cfae5c8e22f52a49c37814b119185bc348bcf0.zip gcc-e8cfae5c8e22f52a49c37814b119185bc348bcf0.tar.gz gcc-e8cfae5c8e22f52a49c37814b119185bc348bcf0.tar.bz2 |
pa.c (output_function_prologue): Pass the highest register number saved for ENTRY_GR and ENTRY_FR directives...
* pa.c (output_function_prologue): Pass the highest register
number saved for ENTRY_GR and ENTRY_FR directives rather
than the number of registers saved.
(hppa_expand_prologue): Account for %r4 when it's being
used as a frame pointer.
From-SVN: r5718
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/pa/pa.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 215cfc1..a75814a 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -2023,8 +2023,18 @@ output_function_prologue (file, size) fprintf (file, ",SAVE_SP"); /* Pass on information about the number of callee register saves - performed in the prologue. */ - fprintf (file, ",ENTRY_GR=%d,ENTRY_FR=%d", gr_saved, fr_saved); + performed in the prologue. + + The compiler is supposed to pass the highest register number + saved, the assembler then has to adjust that number before + entering it into the unwind descriptor (to account for any + caller saved registers with lower register numbers than the + first callee saved register). */ + if (gr_saved) + fprintf (file, ",ENTRY_GR=%d", gr_saved + 2); + + if (fr_saved) + fprintf (file, ",ENTRY_FR=%d", fr_saved + 11); fprintf (file, "\n\t.ENTRY\n"); @@ -2179,6 +2189,8 @@ hppa_expand_prologue() offset += 4; gr_saved++; } + /* Account for %r4 which is saved in a special place. */ + gr_saved++; } /* No frame pointer needed. */ else |