powerpc patch 5 of 9

Dale Johannesen dalej@apple.com
Wed Feb 20 11:25:00 GMT 2002


I think using R11 instead of R12 is likely to break Darwin.  Please
conditionalize this out, or verify that it doesn't really break.

Ppc people, what do you think of splitting the prologue and epilogue
code into separate functions for each of the live ABIs (there are 3,
right?)  There would be some duplicated code, but I think it would
still be easier to maintain than the current spaghetti.

On Wednesday, February 20, 2002, at 03:01 AM, Alan Modra wrote:
>
> This patch allows use of _savef* and _restf* for ABI_V4, and fixes
> a bug in the vrsave code which could have trashed frame_reg_rtx.  Now
> that r11 is being used (to match the ABI for _savef*), we sidestep
> that particular problem.
>
> 	* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Copy to
> 	r11 instead of r12.
> 	(rs6000_emit_prologue): Use r11 for frame_ptr_rtx, and always
> 	use frame_ptr_rtx if ABI_V4 and !saving_FPRs_inline.  Emit a USE
> 	for frame_reg_rtx when !saving_FPRs_inline.
> 	(rs6000_emit_epilogue): If ABI_V4 and !saving_FPRs_inline, set up
> 	r11 for _restf, delay loading lr, and set up the call to _restf
> 	before adjusting the stack.
> 	* config/rs6000/rs6000.md (save_fpregs_si, save_fpregs_di): Tweak
> 	for extra USE.
> 	(rest_fpregs_si, rest_fpregs_di): New.



More information about the Gcc-patches mailing list