diff options
author | Andreas Krebbel <Andreas.Krebbel@de.ibm.com> | 2011-03-22 07:29:53 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2011-03-22 07:29:53 +0000 |
commit | 01841ac09118a182e00303786f35461fb3e8e9c6 (patch) | |
tree | 7f5e12121098d33ad3588145b9583622e913f236 /gcc | |
parent | 7f2acfca7dca4a3bef08ce1c9b611b7a5b96a3e5 (diff) | |
download | gcc-01841ac09118a182e00303786f35461fb3e8e9c6.zip gcc-01841ac09118a182e00303786f35461fb3e8e9c6.tar.gz gcc-01841ac09118a182e00303786f35461fb3e8e9c6.tar.bz2 |
s390.c (s390_delegitimize_address): Handle PLTOFF and PLT unspecs.
2011-03-22 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/s390.c (s390_delegitimize_address): Handle PLTOFF
and PLT unspecs.
From-SVN: r171279
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 22 |
2 files changed, 24 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4c0e0ca..1e44957 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-03-22 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> + + * config/s390/s390.c (s390_delegitimize_address): Handle PLTOFF + and PLT unspecs. + 2011-03-21 Richard Sandiford <richard.sandiford@linaro.org> * expr.h (prepare_operand): Move to... diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 532a42f..0501298 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -5019,7 +5019,12 @@ s390_delegitimize_address (rtx orig_x) /* Extract the symbol ref from: (plus:SI (reg:SI 12 %r12) (const:SI (unspec:SI [(symbol_ref/f:SI ("*.LC0"))] - UNSPEC_GOTOFF))) */ + UNSPEC_GOTOFF/PLTOFF))) + and + (plus:SI (reg:SI 12 %r12) + (const:SI (plus:SI (unspec:SI [(symbol_ref:SI ("L"))] + UNSPEC_GOTOFF/PLTOFF) + (const_int 4 [0x4])))) */ if (GET_CODE (x) == PLUS && REG_P (XEXP (x, 0)) && REGNO (XEXP (x, 0)) == PIC_OFFSET_TABLE_REGNUM @@ -5027,8 +5032,14 @@ s390_delegitimize_address (rtx orig_x) { /* The const operand. */ y = XEXP (XEXP (x, 1), 0); + + if (GET_CODE (y) == PLUS + && GET_CODE (XEXP (y, 1)) == CONST_INT) + y = XEXP (y, 0); + if (GET_CODE (y) == UNSPEC - && XINT (y, 1) == UNSPEC_GOTOFF) + && (XINT (y, 1) == UNSPEC_GOTOFF + || XINT (y, 1) == UNSPEC_PLTOFF)) return XVECEXP (y, 0, 0); } @@ -5050,9 +5061,14 @@ s390_delegitimize_address (rtx orig_x) } else if (GET_CODE (x) == CONST) { + /* Extract the symbol ref from: + (mem:QI (const:DI (unspec:DI [(symbol_ref:DI ("foo"))] + UNSPEC_PLT/GOTENT))) */ + y = XEXP (x, 0); if (GET_CODE (y) == UNSPEC - && XINT (y, 1) == UNSPEC_GOTENT) + && (XINT (y, 1) == UNSPEC_GOTENT + || XINT (y, 1) == UNSPEC_PLT)) y = XVECEXP (y, 0, 0); else return orig_x; |