diff options
author | krebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-04 20:47:11 +0000 |
---|---|---|
committer | krebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-04 20:47:11 +0000 |
commit | cf8ffe7df91cfb5197fb48190a5f925343968fe8 (patch) | |
tree | 071f3c965c7ee30a7905be74fa3ae7c2ce82face | |
parent | 7fcec42570c5e46cbe214dc0ff35d4afbcc4aea4 (diff) | |
download | gcc-cf8ffe7df91cfb5197fb48190a5f925343968fe8.tar.gz |
2011-03-04 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/s390.c (s390_decompose_address): Reject non-literal
pool references in UNSPEC_LTREL_OFFSET.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170685 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6b8dc6467ec..76a2bd2b8e9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-03-04 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> + + * config/s390/s390.c (s390_decompose_address): Reject non-literal + pool references in UNSPEC_LTREL_OFFSET. + 2011-03-04 Jan Hubicka <jh@suse.cz> PR lto/47497 diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index f43b3765032..3e6edb76b47 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -2065,6 +2065,16 @@ s390_decompose_address (rtx addr, struct s390_address *out) else if (GET_CODE (disp) == UNSPEC && XINT (disp, 1) == UNSPEC_LTREL_OFFSET) { + /* In case CSE pulled a non literal pool reference out of + the pool we have to reject the address. This is + especially important when loading the GOT pointer on non + zarch CPUs. In this case the literal pool contains an lt + relative offset to the _GLOBAL_OFFSET_TABLE_ label which + will most likely exceed the displacement. */ + if (GET_CODE (XVECEXP (disp, 0, 0)) != SYMBOL_REF + || !CONSTANT_POOL_ADDRESS_P (XVECEXP (disp, 0, 0))) + return false; + orig_disp = gen_rtx_CONST (Pmode, disp); if (offset) { |