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
This commit is contained in:
Ulrich Weigand 2004-07-11 11:44:09 +00:00 committed by Ulrich Weigand
parent d8be287168
commit 578d146841
2 changed files with 17 additions and 0 deletions

View File

@ -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

View File

@ -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 ... */