Hi,

So tests are complete (with full test on x86_64-unknown-linux-gnu and
testfailure testing on i686-w64-mingw32 and x86_64-w64-mingw32).

ChangeLog

2012-02-23  Kai Tietz  <kti...@redhat.com>

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

Regression tested for x86_64-w64-mingw32, and
x86_64-unknown-linux-gnu.  Ok for apply?

Regards,
Kai

Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c  (revision 184486)
+++ config/i386/i386.c  (working copy)
@@ -13241,6 +13241,19 @@

   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

Reply via email to