summaryrefslogtreecommitdiff
path: root/gcc/config/s390
diff options
context:
space:
mode:
authorkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-20 08:42:27 +0000
committerkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-20 08:42:27 +0000
commit1ed004b714e2f2f646040e6fde2100dbe1f79e1d (patch)
tree64de3ebe12fc600ba8302084fa34cdef4be4d4e4 /gcc/config/s390
parent26526d23eb2fb904bb83b72cc6ced380ec06c359 (diff)
downloadgcc-1ed004b714e2f2f646040e6fde2100dbe1f79e1d.tar.gz
2006-02-20 Angel Nunez Mencias <anunez@de.ibm.com>
* config/s390/s390.c (legitimize_pic_address): Assertions checking for non tls symbols added. (legitimize_address): Do nothing for PLUS expressions if one of the addends is a tls symbol reference. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111296 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/s390')
-rw-r--r--gcc/config/s390/s390.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index bdf15125541..3eeb4acb0b6 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -2821,6 +2821,8 @@ legitimize_pic_address (rtx orig, rtx reg)
rtx new = orig;
rtx base;
+ gcc_assert (!TLS_SYMBOLIC_CONST (addr));
+
if (GET_CODE (addr) == LABEL_REF
|| (GET_CODE (addr) == SYMBOL_REF && SYMBOL_REF_LOCAL_P (addr)))
{
@@ -2973,6 +2975,10 @@ legitimize_pic_address (rtx orig, rtx reg)
if (GET_CODE (addr) == PLUS)
{
rtx op0 = XEXP (addr, 0), op1 = XEXP (addr, 1);
+
+ gcc_assert (!TLS_SYMBOLIC_CONST (op0));
+ gcc_assert (!TLS_SYMBOLIC_CONST (op1));
+
/* Check first to see if this is a constant offset
from a local symbol reference. */
if ((GET_CODE (op0) == LABEL_REF
@@ -3345,6 +3351,12 @@ legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
if (legitimate_address_p (mode, x, FALSE))
return x;
}
+ else if (GET_CODE (x) == PLUS
+ && (TLS_SYMBOLIC_CONST (XEXP (x, 0))
+ || TLS_SYMBOLIC_CONST (XEXP (x, 1))))
+ {
+ return x;
+ }
else if (flag_pic)
{
if (SYMBOLIC_CONST (x)