[patch i386]: Sibcall tail-call improvement and partial fix PR/60104

Kai Tietz ktietz70@googlemail.com
Thu Sep 18 22:14:00 GMT 2014


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"



More information about the Gcc-patches mailing list