* S/390: Fix gcc.dg/tls/opt-7.c
@ 2004-07-11 12:43 Ulrich Weigand
0 siblings, 0 replies; only message in thread
From: Ulrich Weigand @ 2004-07-11 12:43 UTC (permalink / raw)
To: gcc-patches
Hello,
this fixes the new gcc.dg/tls/opt-7.c failure on s390(x), caused by
legitimate_tls_address not handling addresses of the form TLS-symbol
plus constant offset.
Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux,
applied to mainline.
Bye,
Ulrich
ChangeLog:
* config/s390/s390.c (legitimize_tls_address): Handle constant offsets
added to TLS symbol addresses.
Index: gcc/config/s390/s390.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.c,v
retrieving revision 1.156
diff -c -p -r1.156 s390.c
*** gcc/config/s390/s390.c 7 Jul 2004 19:24:45 -0000 1.156
--- gcc/config/s390/s390.c 9 Jul 2004 19:16:36 -0000
*************** legitimize_tls_address (rtx addr, rtx re
*** 2913,2918 ****
--- 2913,2930 ----
}
}
+ else if (GET_CODE (addr) == CONST && GET_CODE (XEXP (addr, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (addr, 0), 1)) == CONST_INT)
+ {
+ new = XEXP (XEXP (addr, 0), 0);
+ if (GET_CODE (new) != SYMBOL_REF)
+ new = gen_rtx_CONST (Pmode, new);
+
+ new = legitimize_tls_address (new, reg);
+ new = plus_constant (new, INTVAL (XEXP (XEXP (addr, 0), 1)));
+ new = force_operand (new, 0);
+ }
+
else
abort (); /* for now ... */
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-07-11 11:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-11 12:43 S/390: Fix gcc.dg/tls/opt-7.c Ulrich Weigand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).