OSDN Git Service

* config/i386/i386.c (ix86_delegitimize_address): Handle
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Feb 2012 16:31:41 +0000 (16:31 +0000)
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Feb 2012 16:31:41 +0000 (16:31 +0000)
        UNSPEC_PCREL plus displacement.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184560 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.c

index 5e0c1e6..121d74a 100644 (file)
@@ -1,3 +1,8 @@
+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>
 
        PR target/52261
index 24dbc49..52fcb61 100644 (file)
@@ -13241,6 +13241,19 @@ ix86_delegitimize_address (rtx x)
 
   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
          || GET_CODE (XEXP (x, 0)) != UNSPEC
          || (XINT (XEXP (x, 0), 1) != UNSPEC_GOTPCREL