[RFC] Fix unwind info for sparc -mflat

Eric Botcazou ebotcazou@adacore.com
Sun Jun 26 12:09:00 GMT 2011


> I tried to figure out why things had been done in this
> slightly convoluted manner and failed.  It seems to me that
> this is easily represented with the individual instructions.
> A comment indicated that there had been problems with the
> copy to %o7 being deleted.  Elsewhere we have successfully
> used a naked USE pattern to keep such things from being
> deleted.

I have 4 regressions in the C testsuite with -mflat on SPARC/Solaris:

FAIL: gcc.c-torture/execute/builtins/stpcpy-chk.c execution,  -O2 -flto
FAIL: gcc.c-torture/execute/nestfunc-4.c execution,  -Os
FAIL: gcc.c-torture/execute/pr19005.c execution,  -O2
FAIL: gcc.c-torture/execute/strncmp-1.c execution,  -O2 -flt

The problem is that the blockage isn't emitted if the frame pointer isn't used.
I have also fixed the swapping %o7/%i7 (despite the name, %o7 is the incoming 
return address register from GCC's viewpoint, and %i7 the register where you 
save the return address for the rest of the function).

Tested on SPARC/Solaris, applied on the mainline.


2011-06-26  Eric Botcazou  <ebotcazou@adacore.com>

	* config/sparc/sparc.c (save_local_or_in_reg_p): Adjust comment.
	(emit_save_register_window): Likewise.
	(sparc_expand_prologue): Use SIZE_INT_RTX and SIZE_RTX variables.
	(sparc_flat_expand_prologue): Add comment.  Always emit blockage.
	Swap back %o7/%i7 in register naming.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 4584 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110626/3b298672/attachment.bin>


More information about the Gcc-patches mailing list