Fix PR target/21412 on SPARC
Eric Botcazou
ebotcazou@libertysurf.fr
Mon May 23 09:03:00 GMT 2005
The compiler ICEs on TLS addresses with constant offsets. The fix was
shamelessly borrowed from the PPC variant, so I presume it is valid for all
TLS models but a second option would be welcome. :-)
Tested on sparc-sun-solaris2.10, it fixes:
FAIL: gcc.dg/tls/opt-8.c (test for excess errors)
FAIL: gcc.dg/tls/opt-9.c (test for excess errors)
on mainline. I don't intend to backport it to the 4.0 branch since the
problem is not a regression.
2005-05-23 Eric Botcazou <ebotcazou@libertysurf.fr>
PR target/21412
* config/sparc/sparc.h (SPARC_SYMBOL_REF_TLS_P): New macro
* config/sparc/sparc-protos.h (tls_symbolic_operand): Delete.
(sparc_tls_referenced_p): New prototype.
* config/sparc/sparc.c (tls_symbolic_operand): Delete.
(sparc_expand_move): Look for TLS addresses with constant offsets.
(legitimate_constant_p): Use SPARC_SYMBOL_REF_TLS_P instead of
tls_symbolic_operand.
(legitimate_pic_operand_p): Likewise.
(legitimate_address_p): Likewise.
(legitimize_address): Likewise.
(sparc_tls_symbol_ref_1): New function.
(sparc_tls_referenced_p): New function.
* config/sparc/predicates.md (tgd_symbolic_operand): Use
SYMBOL_REF_TLS_MODEL instead of tls_symbolic_operand.
(tld_symbolic_operand): Likewise.
(tie_symbolic_operand): Likewise.
(tle_symbolic_operand): Likewise.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr21412.diff
Type: text/x-diff
Size: 7836 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050523/5b0ba8a4/attachment.bin>
More information about the Gcc-patches
mailing list