aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2004-07-11 11:44:09 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2004-07-11 11:44:09 +0000
commit578d1468411d6b29ff198e17eb0f87b83e825980 (patch)
treec77c6721218ac49876c489a783a3500cc21c2fb8
parentd8be287168bfc03d5766c44d237aaf0047e68752 (diff)
downloadgcc-578d1468411d6b29ff198e17eb0f87b83e825980.zip
gcc-578d1468411d6b29ff198e17eb0f87b83e825980.tar.gz
gcc-578d1468411d6b29ff198e17eb0f87b83e825980.tar.bz2
s390.c (legitimize_tls_address): Handle constant offsets added to TLS symbol addresses.
* config/s390/s390.c (legitimize_tls_address): Handle constant offsets added to TLS symbol addresses. From-SVN: r84504
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/s390/s390.c12
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 03d7804..147f9ec 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * config/s390/s390.c (legitimize_tls_address): Handle constant offsets
+ added to TLS symbol addresses.
+
2004-07-11 Richard Henderson <rth@redhat.com>
* expmed.c (init_expmed): Use stack-local structures for
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 5a8b46d0..614e714 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -2913,6 +2913,18 @@ legitimize_tls_address (rtx addr, rtx reg)
}
}
+ 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 ... */