Commit ab081dd6 by Andreas Krebbel Committed by Andreas Krebbel

s390.c (s390_delegitimize_address): Fix offset handling for PLTOFF/GOTOFF.

2011-03-22  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config/s390/s390.c (s390_delegitimize_address): Fix offset
	handling for PLTOFF/GOTOFF.

From-SVN: r171281
parent 6fd5332b
2011-03-22 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/s390.c (s390_delegitimize_address): Fix offset
handling for PLTOFF/GOTOFF.
2011-03-22 Nick Clifton <nickc@redhat.com> 2011-03-22 Nick Clifton <nickc@redhat.com>
* config/i386/cygming.h (SUBTARGET_OVERRIDE_OPTIONS): Remove * config/i386/cygming.h (SUBTARGET_OVERRIDE_OPTIONS): Remove
......
...@@ -5030,17 +5030,22 @@ s390_delegitimize_address (rtx orig_x) ...@@ -5030,17 +5030,22 @@ s390_delegitimize_address (rtx orig_x)
&& REGNO (XEXP (x, 0)) == PIC_OFFSET_TABLE_REGNUM && REGNO (XEXP (x, 0)) == PIC_OFFSET_TABLE_REGNUM
&& GET_CODE (XEXP (x, 1)) == CONST) && GET_CODE (XEXP (x, 1)) == CONST)
{ {
HOST_WIDE_INT offset = 0;
/* The const operand. */ /* The const operand. */
y = XEXP (XEXP (x, 1), 0); y = XEXP (XEXP (x, 1), 0);
if (GET_CODE (y) == PLUS if (GET_CODE (y) == PLUS
&& GET_CODE (XEXP (y, 1)) == CONST_INT) && GET_CODE (XEXP (y, 1)) == CONST_INT)
y = XEXP (y, 0); {
offset = INTVAL (XEXP (y, 1));
y = XEXP (y, 0);
}
if (GET_CODE (y) == UNSPEC if (GET_CODE (y) == UNSPEC
&& (XINT (y, 1) == UNSPEC_GOTOFF && (XINT (y, 1) == UNSPEC_GOTOFF
|| XINT (y, 1) == UNSPEC_PLTOFF)) || XINT (y, 1) == UNSPEC_PLTOFF))
return XVECEXP (y, 0, 0); return plus_constant (XVECEXP (y, 0, 0), offset);
} }
if (GET_CODE (x) != MEM) if (GET_CODE (x) != MEM)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment