diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2009-08-03 17:58:55 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2009-08-03 17:58:55 +0200 |
commit | 42a9ba1d7e12ecd8a58b0c32801601e09de7a30b (patch) | |
tree | e42053ec9d3d71df749b5f77cfa7e11223f7772e /gcc | |
parent | 9f774cb03aa6d4d020fb1bb711a84f987bd5e42b (diff) | |
download | gcc-42a9ba1d7e12ecd8a58b0c32801601e09de7a30b.zip gcc-42a9ba1d7e12ecd8a58b0c32801601e09de7a30b.tar.gz gcc-42a9ba1d7e12ecd8a58b0c32801601e09de7a30b.tar.bz2 |
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: r150372
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.c | 13 |
2 files changed, 18 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 965beac..04816e3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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-08-03 SUGIOKA Toshinobu <sugioka@itonet.co.jp> * config/sh/linux-atomic.asm (ATOMIC_COMPARE_AND_SWAP): Rename @@ -29,8 +34,7 @@ 2009-08-03 Andreas Krebbel <krebbel1@de.ibm.com> - * explow.c (promote_mode): Mark TYPE and PUNSIGNEDP as - possibly unused. + * explow.c (promote_mode): Mark TYPE and PUNSIGNEDP as possibly unused. 2009-08-02 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index f250e14..fe515d4 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -2062,11 +2062,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; |