Commit 15498cfa by Kai Tietz Committed by Kai Tietz

i386.c (ix86_delegitimize_address): Handle UNSPEC_PCREL plus displacement.

        * config/i386/i386.c (ix86_delegitimize_address): Handle
        UNSPEC_PCREL plus displacement.

From-SVN: r184560
parent 39e73abc
2012-02-23 Kai Tietz <ktietz@redhat.com>
* config/i386/i386.c (ix86_delegitimize_address): Handle
UNSPEC_PCREL plus displacement.
2012-02-24 Georg-Johann Lay <avr@gjlay.de> 2012-02-24 Georg-Johann Lay <avr@gjlay.de>
PR target/52261 PR target/52261
......
...@@ -13241,6 +13241,19 @@ ix86_delegitimize_address (rtx x) ...@@ -13241,6 +13241,19 @@ ix86_delegitimize_address (rtx x)
if (TARGET_64BIT) if (TARGET_64BIT)
{ {
if (GET_CODE (x) == CONST
&& GET_CODE (XEXP (x, 0)) == PLUS
&& GET_MODE (XEXP (x, 0)) == Pmode
&& CONST_INT_P (XEXP (XEXP (x, 0), 1))
&& GET_CODE (XEXP (XEXP (x, 0), 0)) == UNSPEC
&& XINT (XEXP (XEXP (x, 0), 0), 1) == UNSPEC_PCREL)
{
rtx x2 = XVECEXP (XEXP (XEXP (x, 0), 0), 0, 0);
x = gen_rtx_PLUS (Pmode, XEXP (XEXP (x, 0), 1), x2);
if (MEM_P (orig_x))
x = replace_equiv_address_nv (orig_x, x);
return x;
}
if (GET_CODE (x) != CONST if (GET_CODE (x) != CONST
|| GET_CODE (XEXP (x, 0)) != UNSPEC || GET_CODE (XEXP (x, 0)) != UNSPEC
|| (XINT (XEXP (x, 0), 1) != UNSPEC_GOTPCREL || (XINT (XEXP (x, 0), 1) != UNSPEC_GOTPCREL
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