alpha.c (alpha_legitimate_constant_p): Reject CONST constants referencing TLS symbols.

* config/alpha/alpha.c (alpha_legitimate_constant_p): Reject CONST
	constants referencing TLS symbols.

From-SVN: r150373
This commit is contained in:
Uros Bizjak 2009-08-03 18:09:19 +02:00 committed by Uros Bizjak
parent e9b193b8fb
commit 30a9629875
2 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2009-08-03 Uros Bizjak <ubizjak@gmail.com>
* config/alpha/alpha.c (alpha_legitimate_constant_p): Reject CONST
constants referencing TLS symbols.
2009-07-30 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.c (override_options): Default

View File

@ -2052,11 +2052,22 @@ alpha_legitimate_constant_p (rtx x)
switch (GET_CODE (x))
{
case CONST:
case LABEL_REF:
case HIGH:
return true;
case CONST:
if (GET_CODE (XEXP (x, 0)) == PLUS
&& GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT)
x = XEXP (XEXP (x, 0), 0);
else
return true;
if (GET_CODE (x) != SYMBOL_REF)
return true;
/* FALLTHRU */
case SYMBOL_REF:
/* TLS symbols are never valid. */
return SYMBOL_REF_TLS_MODEL (x) == 0;