From 578d1468411d6b29ff198e17eb0f87b83e825980 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Sun, 11 Jul 2004 11:44:09 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/config/s390/s390.c | 12 ++++++++++++ 2 files changed, 17 insertions(+) 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 ... */ -- 2.30.2