This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch i386]: Fix for x64 windows targets the split of PCREL unspecs


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  <ktietz@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 */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]