From: Ulrich Weigand Date: Sun, 11 Jul 2004 11:44:09 +0000 (+0000) Subject: s390.c (legitimize_tls_address): Handle constant offsets added to TLS symbol addresses. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=578d1468411d6b29ff198e17eb0f87b83e825980;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 03d7804a6df..147f9ec3895 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-07-11 Ulrich Weigand + + * config/s390/s390.c (legitimize_tls_address): Handle constant offsets + added to TLS symbol addresses. + 2004-07-11 Richard Henderson * expmed.c (init_expmed): Use stack-local structures for diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 5a8b46d0423..614e714b8a0 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 ... */