Commit e8cfae5c by Jeff Law

pa.c (output_function_prologue): Pass the highest register number saved for…

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
parent 0d69ab6f
...@@ -2023,8 +2023,18 @@ output_function_prologue (file, size) ...@@ -2023,8 +2023,18 @@ output_function_prologue (file, size)
fprintf (file, ",SAVE_SP"); fprintf (file, ",SAVE_SP");
/* Pass on information about the number of callee register saves /* Pass on information about the number of callee register saves
performed in the prologue. */ performed in the prologue.
fprintf (file, ",ENTRY_GR=%d,ENTRY_FR=%d", gr_saved, fr_saved);
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"); fprintf (file, "\n\t.ENTRY\n");
...@@ -2179,6 +2189,8 @@ hppa_expand_prologue() ...@@ -2179,6 +2189,8 @@ hppa_expand_prologue()
offset += 4; offset += 4;
gr_saved++; gr_saved++;
} }
/* Account for %r4 which is saved in a special place. */
gr_saved++;
} }
/* No frame pointer needed. */ /* No frame pointer needed. */
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment