The hunk about config/i386/predicates.md (x86_64_immediate_operand) I
recet here,
actual it would lead to none-PIC code.

So updated patch:

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

        * config/i386/i386.c (legitimate_pic_address_disp_p): Allow
        interger-constant displacement for UNSPEC_PCREL.

Tested for x86_64-w64-mingw32, and x86_64-unkown-linux-gnu for all
languages.  Ok for apply?

Regards,
Kai

Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c  (revision 184304)
+++ config/i386/i386.c  (working copy)
@@ -11823,6 +11823,13 @@
             break;
          if (GET_CODE (op0) == LABEL_REF)
            return true;
+         if (GET_CODE (op0) == CONST
+             && GET_CODE (XEXP (op0, 0)) == UNSPEC
+             && XINT (XEXP (op0, 0), 1) == UNSPEC_PCREL)
+           return true;
+         if (GET_CODE (op0) == UNSPEC
+             && XINT (op0, 1) == UNSPEC_PCREL)
+           return true;
          if (GET_CODE (op0) != SYMBOL_REF)
            break;
          /* FALLTHRU */

Reply via email to