Fix PR target/46685

Eric Botcazou ebotcazou@adacore.com
Thu Dec 2 22:34:00 GMT 2010


This fixes the recently introduced stack alignment failures with -fpic, on the 
SPARC side only.  The PA side will need another fix.  This is mostly Jakub's 
work, with an additional patchlet for sparc_file_end.

Tested on SPARC/Solaris and SPARC/Linux, applied on the mainline.


2010-11-02  Eric Botcazou  <ebotcazou@adacore.com>

	PR target/46685
	* config/sparc/sparc.c (can_use_mov_pic_label_ref): New predicate.
	(sparc_expand_move): Call it to decide whether to emit the special
	mov{si,di}_pic_label_ref patterns.
	(sparc_legitimize_pic_address): Call it to decide whether to emit
	the regular PIC sequence for labels.  Fix long line.
	(sparc_file_end): Set is_thunk for the PIC helper.


2010-11-02  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc.dg/pr46685.c: New test.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr46685.diff
Type: text/x-diff
Size: 4094 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20101202/f39131f2/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr46685.c
Type: text/x-csrc
Size: 689 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20101202/f39131f2/attachment-0001.bin>


More information about the Gcc-patches mailing list