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]: Sibcall tail-call improvement and partial fix PR/60104


Here it is. Hope I didn't made here typos.

Kai

Index: config/i386/predicates.md
===================================================================
--- config/i386/predicates.md   (Revision 215364)
+++ config/i386/predicates.md   (Arbeitskopie)
@@ -73,8 +73,15 @@

 ;; Return true if OP is a memory operands that can be used in sibcalls.
 (define_predicate "sibcall_memory_operand"
-  (and (match_operand 0 "memory_operand")
-       (match_test "CONSTANT_P (XEXP (op, 0))")))
+  (match_operand 0 "memory_operand")
+{
+  if (TARGET_MACHO && TARGET_64BIT
+      && GET_CODE (op) == CONST
+      && GET_CODE (XEXP (op, 0)) == UNSPEC
+      && XINT (XEXP (op, 0), 1) == UNSPEC_GOTPCREL)
+    return false;
+  return CONSTANT_P (XEXP (op, 0));
+})

 ;; Match an SI or HImode register for a zero_extract.
 (define_special_predicate "ext_register_operand"


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