Commit e10fbf96 by Eric Botcazou Committed by Eric Botcazou

sparc.c (tls_call_delay): Fix oversight.

	* config/sparc/sparc.c (tls_call_delay): Fix oversight.

From-SVN: r110790
parent dae7ec87
2006-02-09 Eric Botcazou <ebotcazou@libertysurf.fr>
* config/sparc/sparc.c (tls_call_delay): Fix oversight.
2006-02-08 Jason Merrill <jason@redhat.com> 2006-02-08 Jason Merrill <jason@redhat.com>
PR c++/25979 PR c++/25979
......
...@@ -2416,26 +2416,34 @@ empty_delay_slot (rtx insn) ...@@ -2416,26 +2416,34 @@ empty_delay_slot (rtx insn)
int int
tls_call_delay (rtx trial) tls_call_delay (rtx trial)
{ {
rtx pat, unspec; rtx pat;
/* Binutils allows /* Binutils allows
call __tls_get_addr, %tgd_call (foo) call __tls_get_addr, %tgd_call (foo)
add %l7, %o0, %o0, %tgd_add (foo) add %l7, %o0, %o0, %tgd_add (foo)
while Sun as/ld does not. */ while Sun as/ld does not. */
if (TARGET_GNU_TLS || !TARGET_TLS) if (TARGET_GNU_TLS || !TARGET_TLS)
return 1; return 1;
pat = PATTERN (trial); pat = PATTERN (trial);
if (GET_CODE (pat) != SET || GET_CODE (SET_DEST (pat)) != PLUS)
return 1;
unspec = XEXP (SET_DEST (pat), 1); /* We must reject tgd_add{32|64}, i.e.
if (GET_CODE (unspec) != UNSPEC (set (reg) (plus (reg) (unspec [(reg) (symbol_ref)] UNSPEC_TLSGD)))
|| (XINT (unspec, 1) != UNSPEC_TLSGD and tldm_add{32|64}, i.e.
&& XINT (unspec, 1) != UNSPEC_TLSLDM)) (set (reg) (plus (reg) (unspec [(reg) (symbol_ref)] UNSPEC_TLSLDM)))
return 1; for Sun as/ld. */
if (GET_CODE (pat) == SET
&& GET_CODE (SET_SRC (pat)) == PLUS)
{
rtx unspec = XEXP (SET_SRC (pat), 1);
return 0; if (GET_CODE (unspec) == UNSPEC
&& (XINT (unspec, 1) == UNSPEC_TLSGD
|| XINT (unspec, 1) == UNSPEC_TLSLDM))
return 0;
}
return 1;
} }
/* Return nonzero if TRIAL, an insn, can be combined with a 'restore' /* Return nonzero if TRIAL, an insn, can be combined with a 'restore'
......
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