public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, i386]: Fix recently added sibcall insns and peephole2 patterns
@ 2014-06-18 10:24 Uros Bizjak
  2014-06-18 12:24 ` Kai Tietz
  0 siblings, 1 reply; 5+ messages in thread
From: Uros Bizjak @ 2014-06-18 10:24 UTC (permalink / raw)
  To: gcc-patches; +Cc: Kai Tietz, Richard Henderson

[-- Attachment #1: Type: text/plain, Size: 1799 bytes --]

Hello!

Attached patch fixes recently added sibcall insns and their
corresponding peephole2 patterns:

- There is no need for new memory_nox32_operand. A generic
memory_operand can be used, since new insns and peephole2 patterns
should be disabled for TARGET_X32 entirely.
- Adds missing "m" constraint in insn patterns.
- Macroizes peephole2 patterns
- Adds check that eliminated register is really dead after the call
(maybe an overkill, but some hard-to-debug problems surfaced due to
missing liveness checks in the past)
- Fixes call RTXes in sibcall_pop related patterns (and fixes two
newly introduced warnings in i386.md)

2014-06-18  Uros Bizjak  <ubizjak@gmail.com>

    * config/i386/i386.md (*sibcall_memory): Rename from *sibcall_intern.
    Do not use unspec as call operand.  Use memory_operand instead of
    memory_nox32_operand and add "m" operand constraint.  Disable
    pattern for TARGET_X32.
    (*sibcall_pop_memory): Ditto.
    (*sibcall_value_memory): Ditto.
    (*sibcall_value_pop_memory): Ditto.
    (sibcall peepholes): Merge SImode and DImode patterns using
    W mode iterator.  Use memory_operand instead of memory_nox32_operand.
    Disable pattern for TARGET_X32.  Check if eliminated register is
    really dead after call insn.  Generate call RTX without unspec operand.
    (sibcall_value peepholes): Ditto.
    (sibcall_pop peepholes): Fix call insn RTXes.  Use memory_operand
    instead of memory_nox32_operand.  Check if eliminated register is
    really dead after call insn. Generate call RTX without unspec operand.
    (sibcall_value_pop peepholes): Ditto.
    * config/i386/predicates.md (memory_nox32_operand): Remove predicate.

The patch was bootstrapped and regression tested on
x86_64-pc-linux-gnu {,-m32} and was committed to mainline SVN.

Uros.

[-- Attachment #2: p.diff.txt --]
[-- Type: text/plain, Size: 12305 bytes --]

Index: i386.md
===================================================================
--- i386.md	(revision 211725)
+++ i386.md	(working copy)
@@ -11354,53 +11354,38 @@
   "* return ix86_output_call_insn (insn, operands[0]);"
   [(set_attr "type" "call")])
 
-(define_insn "*sibcall_intern"
-  [(call (unspec [(mem:QI (match_operand:W 0 "memory_nox32_operand"))]
-	   UNSPEC_PEEPSIB)
-	 (match_operand 1))]
-  ""
+(define_insn "*sibcall_memory"
+  [(call (mem:QI (match_operand:W 0 "memory_operand" "m"))
+	 (match_operand 1))
+   (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
+  "!TARGET_X32"
   "* return ix86_output_call_insn (insn, operands[0]);"
   [(set_attr "type" "call")])
 
 (define_peephole2
-  [(set (match_operand:DI 0 "register_operand")
-        (match_operand:DI 1 "memory_nox32_operand"))
+  [(set (match_operand:W 0 "register_operand")
+	(match_operand:W 1 "memory_operand"))
    (call (mem:QI (match_dup 0))
          (match_operand 3))]
-  "TARGET_64BIT && SIBLING_CALL_P (peep2_next_insn (1))"
-  [(call (unspec [(mem:QI (match_dup 1))] UNSPEC_PEEPSIB)
-         (match_dup 3))])
+  "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (1))
+   && peep2_reg_dead_p (2, operands[0])"
+  [(parallel [(call (mem:QI (match_dup 1))
+		    (match_dup 3))
+	      (unspec [(const_int 0)] UNSPEC_PEEPSIB)])])
 
 (define_peephole2
-  [(set (match_operand:DI 0 "register_operand")
-        (match_operand:DI 1 "memory_nox32_operand"))
+  [(set (match_operand:W 0 "register_operand")
+	(match_operand:W 1 "memory_operand"))
    (unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
    (call (mem:QI (match_dup 0))
          (match_operand 3))]
-  "TARGET_64BIT && SIBLING_CALL_P (peep2_next_insn (2))"
+  "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (2))
+   && peep2_reg_dead_p (3, operands[0])"
   [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
-   (call (unspec [(mem:QI (match_dup 1))] UNSPEC_PEEPSIB)
-         (match_dup 3))])
+   (parallel [(call (mem:QI (match_dup 1))
+		    (match_dup 3))
+	      (unspec [(const_int 0)] UNSPEC_PEEPSIB)])])
 
-(define_peephole2
-  [(set (match_operand:SI 0 "register_operand")
-        (match_operand:SI 1 "memory_nox32_operand"))
-   (call (mem:QI (match_dup 0))
-         (match_operand 3))]
-  "!TARGET_64BIT && SIBLING_CALL_P (peep2_next_insn (1))"
-  [(call (unspec [(mem:QI (match_dup 1))] UNSPEC_PEEPSIB)
-         (match_dup 3))])
-
-(define_peephole2
-  [(set (match_operand:SI 0 "register_operand")
-        (match_operand:SI 1 "memory_nox32_operand"))
-   (unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
-   (call (mem:QI (match_dup 0))
-         (match_operand 3))]
-  "!TARGET_64BIT && SIBLING_CALL_P (peep2_next_insn (2))"
-  [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
-   (call (unspec [(mem:QI (match_dup 1))] UNSPEC_PEEPSIB) (match_dup 3))])
-
 (define_expand "call_pop"
   [(parallel [(call (match_operand:QI 0)
 		    (match_operand:SI 1))
@@ -11434,42 +11419,52 @@
   "* return ix86_output_call_insn (insn, operands[0]);"
   [(set_attr "type" "call")])
 
-(define_insn "*sibcall_pop_intern"
-  [(call (unspec [(mem:QI (match_operand:SI 0 "memory_nox32_operand"))]
-           UNSPEC_PEEPSIB)
+(define_insn "*sibcall_pop_memory"
+  [(call (mem:QI (match_operand:SI 0 "memory_operand" "m"))
 	 (match_operand 1))
    (set (reg:SI SP_REG)
 	(plus:SI (reg:SI SP_REG)
-		 (match_operand:SI 2 "immediate_operand" "i")))]
+		 (match_operand:SI 2 "immediate_operand" "i")))
+   (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
   "!TARGET_64BIT"
   "* return ix86_output_call_insn (insn, operands[0]);"
   [(set_attr "type" "call")])
 
 (define_peephole2
   [(set (match_operand:SI 0 "register_operand")
-        (match_operand:SI 1 "memory_nox32_operand"))
+	(match_operand:SI 1 "memory_operand"))
    (parallel [(call (mem:QI (match_dup 0))
 		    (match_operand 3))
 	      (set (reg:SI SP_REG)
-		   (match_operand 4))])]
-  "!TARGET_64BIT && SIBLING_CALL_P (peep2_next_insn (1))"
-  [(parallel [(call (unspec [(mem:QI (match_dup 1))] UNSPEC_PEEPSIB)
+		   (plus:SI (reg:SI SP_REG)
+			    (match_operand:SI 4 "immediate_operand")))])]
+  "!TARGET_64BIT && SIBLING_CALL_P (peep2_next_insn (1))
+   && peep2_reg_dead_p (2, operands[0])"
+  [(parallel [(call (mem:QI (match_dup 1))
 		    (match_dup 3))
-	      (set (reg:SI SP_REG) (match_dup 4))])])
+	      (set (reg:SI SP_REG)
+		   (plus:SI (reg:SI SP_REG)
+			    (match_dup 4)))
+	      (unspec [(const_int 0)] UNSPEC_PEEPSIB)])])
 
 (define_peephole2
   [(set (match_operand:SI 0 "register_operand")
-        (match_operand:SI 1 "memory_nox32_operand"))
+	(match_operand:SI 1 "memory_operand"))
    (unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
    (parallel [(call (mem:QI (match_dup 0))
 		    (match_operand 3))
 	      (set (reg:SI SP_REG)
-		   (match_operand 4))])]
-  "!TARGET_64BIT && SIBLING_CALL_P (peep2_next_insn (2))"
+		   (plus:SI (reg:SI SP_REG)
+			    (match_operand:SI 4 "immediate_operand")))])]
+  "!TARGET_64BIT && SIBLING_CALL_P (peep2_next_insn (2))
+   && peep2_reg_dead_p (3, operands[0])"
   [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
-   (parallel [(call (unspec [(mem:QI (match_dup 1))] UNSPEC_PEEPSIB)
+   (parallel [(call (mem:QI (match_dup 1))
 		    (match_dup 3))
-	      (set (reg:SI SP_REG) (match_dup 4))])])
+	      (set (reg:SI SP_REG)
+		   (plus:SI (reg:SI SP_REG)
+			    (match_dup 4)))
+	      (unspec [(const_int 0)] UNSPEC_PEEPSIB)])])
 
 ;; Call subroutine, returning value in operand 0
 
@@ -11513,63 +11508,43 @@
   "* return ix86_output_call_insn (insn, operands[1]);"
   [(set_attr "type" "callv")])
 
-(define_insn "*sibcall_value_intern"
+(define_insn "*sibcall_value_memory"
   [(set (match_operand 0)
-    (call (unspec [(mem:QI (match_operand:W 1 "memory_nox32_operand"))]
-	    UNSPEC_PEEPSIB)
-          (match_operand 2)))]
-  ""
+ 	(call (mem:QI (match_operand:W 1 "memory_operand" "m"))
+	      (match_operand 2)))
+   (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
+  "!TARGET_X32"
   "* return ix86_output_call_insn (insn, operands[1]);"
   [(set_attr "type" "callv")])
 
 (define_peephole2
-  [(set (match_operand:DI 0 "register_operand")
-        (match_operand:DI 1 "memory_nox32_operand"))
+  [(set (match_operand:W 0 "register_operand")
+	(match_operand:W 1 "memory_operand"))
    (set (match_operand 2)
    (call (mem:QI (match_dup 0))
 		 (match_operand 3)))]
-  "TARGET_64BIT && SIBLING_CALL_P (peep2_next_insn (1))"
-  [(set (match_dup 2)
-   (call (unspec [(mem:QI (match_dup 1))] UNSPEC_PEEPSIB)
-	 (match_dup 3)))])
+  "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (1))
+   && peep2_reg_dead_p (2, operands[0])"
+  [(parallel [(set (match_dup 2)
+		   (call (mem:QI (match_dup 1))
+			 (match_dup 3)))
+	      (unspec [(const_int 0)] UNSPEC_PEEPSIB)])])
 
 (define_peephole2
-  [(set (match_operand:DI 0 "register_operand")
-        (match_operand:DI 1 "memory_nox32_operand"))
+  [(set (match_operand:W 0 "register_operand")
+	(match_operand:W 1 "memory_operand"))
    (unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
    (set (match_operand 2)
 	(call (mem:QI (match_dup 0))
 	      (match_operand 3)))]
-  "TARGET_64BIT && SIBLING_CALL_P (peep2_next_insn (2))"
+  "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (2))
+   && peep2_reg_dead_p (3, operands[0])"
   [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
-   (set (match_dup 2)
-	(call (unspec [(mem:QI (match_dup 1))] UNSPEC_PEEPSIB)
-	      (match_dup 3)))])
+   (parallel [(set (match_dup 2)
+		   (call (mem:QI (match_dup 1))
+			 (match_dup 3)))
+	      (unspec [(const_int 0)] UNSPEC_PEEPSIB)])])
 
-(define_peephole2
-  [(set (match_operand:SI 0 "register_operand")
-        (match_operand:SI 1 "memory_nox32_operand"))
-   (set (match_operand 2)
-	(call (mem:QI (match_dup 0))
-	      (match_operand 3)))]
-  "!TARGET_64BIT && SIBLING_CALL_P (peep2_next_insn (1))"
-  [(set (match_dup 2)
-	(call (unspec [(mem:QI (match_dup 1))] UNSPEC_PEEPSIB)
-	      (match_dup 3)))])
-
-(define_peephole2
-  [(set (match_operand:SI 0 "register_operand")
-        (match_operand:SI 1 "memory_nox32_operand"))
-   (unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
-   (set (match_operand 2)
-	(call (mem:QI (match_dup 0))
-	      (match_operand 3)))]
-  "!TARGET_64BIT && SIBLING_CALL_P (peep2_next_insn (2))"
-  [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
-   (set (match_dup 2)
-	(call (unspec [(mem:QI (match_dup 1))] UNSPEC_PEEPSIB)
-	      (match_dup 3)))])
-
 (define_insn "*call_value_rex64_ms_sysv"
   [(match_parallel 3 "call_rex64_ms_sysv_operation"
     [(set (match_operand 0)
@@ -11616,55 +11591,57 @@
   "* return ix86_output_call_insn (insn, operands[1]);"
   [(set_attr "type" "callv")])
 
-(define_insn "*sibcall_value_pop_intern"
+(define_insn "*sibcall_value_pop_memory"
   [(set (match_operand 0)
-        (call (unspec [(mem:QI (match_operand:SI 1 "memory_nox32_operand"))]
-	       UNSPEC_PEEPSIB)
+ 	(call (mem:QI (match_operand:SI 1 "memory_operand" "m"))
 	  (match_operand 2)))
    (set (reg:SI SP_REG)
 	(plus:SI (reg:SI SP_REG)
-		 (match_operand:SI 3 "immediate_operand" "i")))]
+		 (match_operand:SI 3 "immediate_operand" "i")))
+   (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
   "!TARGET_64BIT"
   "* return ix86_output_call_insn (insn, operands[1]);"
   [(set_attr "type" "callv")])
 
 (define_peephole2
   [(set (match_operand:SI 0 "register_operand")
-        (match_operand:SI 1 "memory_nox32_operand"))
+	(match_operand:SI 1 "memory_operand"))
    (parallel [(set (match_operand 2)
 	      (call (mem:QI (match_dup 0))
 		    (match_operand 3)))
 	    (set (reg:SI SP_REG)
 		(plus:SI (reg:SI SP_REG)
-			  (match_operand:SI 4 "immediate_operand")))]
-   )]
-  "!TARGET_64BIT && SIBLING_CALL_P (peep2_next_insn (1))"
+			    (match_operand:SI 4 "immediate_operand")))])]
+  "!TARGET_64BIT && SIBLING_CALL_P (peep2_next_insn (1))
+   && peep2_reg_dead_p (2, operands[0])"
   [(parallel [(set (match_dup 2)
-	      (call (unspec [(mem:QI (match_dup 1))] UNSPEC_PEEPSIB)
+		   (call (mem:QI (match_dup 1))
 		    (match_dup 3)))
 	      (set (reg:SI SP_REG)
 		   (plus:SI (reg:SI SP_REG)
-			    (match_dup 4)))])])
+			    (match_dup 4)))
+	      (unspec [(const_int 0)] UNSPEC_PEEPSIB)])])
 
 (define_peephole2
   [(set (match_operand:SI 0 "register_operand")
-        (match_operand:SI 1 "memory_nox32_operand"))
+	(match_operand:SI 1 "memory_operand"))
    (unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
    (parallel [(set (match_operand 2)
 	      (call (mem:QI (match_dup 0))
 		    (match_operand 3)))
 	    (set (reg:SI SP_REG)
 		(plus:SI (reg:SI SP_REG)
-			  (match_operand:SI 4 "immediate_operand")))]
-   )]
-  "!TARGET_64BIT && SIBLING_CALL_P (peep2_next_insn (1))"
+			    (match_operand:SI 4 "immediate_operand")))])]
+  "!TARGET_64BIT && SIBLING_CALL_P (peep2_next_insn (2))
+   && peep2_reg_dead_p (3, operands[0])"
   [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
    (parallel [(set (match_dup 2)
-	      (call (unspec [(mem:QI (match_dup 1))] UNSPEC_PEEPSIB)
+		   (call (mem:QI (match_dup 1))
 		    (match_dup 3)))
 	      (set (reg:SI SP_REG)
 		   (plus:SI (reg:SI SP_REG)
-			    (match_dup 4)))])])
+			    (match_dup 4)))
+	      (unspec [(const_int 0)] UNSPEC_PEEPSIB)])])
 
 ;; Call subroutine returning any type.
 
Index: predicates.md
===================================================================
--- predicates.md	(revision 211725)
+++ predicates.md	(working copy)
@@ -71,11 +71,10 @@
   return ANY_QI_REG_P (op);
 })
 
+;; Return true if OP is a memory operands that can be used in sibcalls.
 (define_predicate "sibcall_memory_operand"
-  (match_operand 0 "memory_operand")
-{
-  return CONSTANT_P (XEXP (op, 0));
-})
+  (and (match_operand 0 "memory_operand")
+       (match_test "CONSTANT_P (XEXP (op, 0))")))
 
 ;; Match an SI or HImode register for a zero_extract.
 (define_special_predicate "ext_register_operand"
@@ -587,11 +586,6 @@
   (ior (match_operand 0 "register_no_elim_operand")
        (match_operand 0 "immediate_operand")))
 
-;; Test for a valid memory operand.
-(define_predicate "memory_nox32_operand"
-  (and (not (match_test "TARGET_X32"))
-       (match_operand 0 "memory_operand")))
-
 ;; Test for a valid operand for indirect branch.
 (define_predicate "indirect_branch_operand"
   (ior (match_operand 0 "register_operand")

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH, i386]: Fix recently added sibcall insns and peephole2 patterns
  2014-06-18 10:24 [PATCH, i386]: Fix recently added sibcall insns and peephole2 patterns Uros Bizjak
@ 2014-06-18 12:24 ` Kai Tietz
  2014-06-18 13:10   ` Uros Bizjak
  0 siblings, 1 reply; 5+ messages in thread
From: Kai Tietz @ 2014-06-18 12:24 UTC (permalink / raw)
  To: Uros Bizjak; +Cc: gcc-patches, Richard Henderson

2014-06-18 12:24 GMT+02:00 Uros Bizjak <ubizjak@gmail.com>:
> Hello!
>
> Attached patch fixes recently added sibcall insns and their
> corresponding peephole2 patterns:
>
> - There is no need for new memory_nox32_operand. A generic
> memory_operand can be used, since new insns and peephole2 patterns
> should be disabled for TARGET_X32 entirely.
> - Adds missing "m" constraint in insn patterns.
> - Macroizes peephole2 patterns
> - Adds check that eliminated register is really dead after the call
> (maybe an overkill, but some hard-to-debug problems surfaced due to
> missing liveness checks in the past)
> - Fixes call RTXes in sibcall_pop related patterns (and fixes two
> newly introduced warnings in i386.md)
>
> 2014-06-18  Uros Bizjak  <ubizjak@gmail.com>
>
>     * config/i386/i386.md (*sibcall_memory): Rename from *sibcall_intern.
>     Do not use unspec as call operand.  Use memory_operand instead of
>     memory_nox32_operand and add "m" operand constraint.  Disable
>     pattern for TARGET_X32.
>     (*sibcall_pop_memory): Ditto.
>     (*sibcall_value_memory): Ditto.
>     (*sibcall_value_pop_memory): Ditto.
>     (sibcall peepholes): Merge SImode and DImode patterns using
>     W mode iterator.  Use memory_operand instead of memory_nox32_operand.
>     Disable pattern for TARGET_X32.  Check if eliminated register is
>     really dead after call insn.  Generate call RTX without unspec operand.
>     (sibcall_value peepholes): Ditto.
>     (sibcall_pop peepholes): Fix call insn RTXes.  Use memory_operand
>     instead of memory_nox32_operand.  Check if eliminated register is
>     really dead after call insn. Generate call RTX without unspec operand.
>     (sibcall_value_pop peepholes): Ditto.
>     * config/i386/predicates.md (memory_nox32_operand): Remove predicate.
>
> The patch was bootstrapped and regression tested on
> x86_64-pc-linux-gnu {,-m32} and was committed to mainline SVN.
>
> Uros.

The following change in predicates.md seems to be a bit premature.
There is still the point about Darwin's PIC issue for unspec-gotpcrel.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61387

  return ANY_QI_REG_P (op);
})

+;; Return true if OP is a memory operands that can be used in sibcalls.
(define_predicate "sibcall_memory_operand"
-  (match_operand 0 "memory_operand")
-{
-  return CONSTANT_P (XEXP (op, 0));
-})
+  (and (match_operand 0 "memory_operand")
+       (match_test "CONSTANT_P (XEXP (op, 0))")))

as we might to pessimize for Darwin UNSPEC_GOTPCREL at that point.
 In general there is still the question why this issue just happens
for Darwin, but not for linux.  For linux that gotpcrel-code path
seems not to be hit at all (at least is that what Ians told).

Kai

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH, i386]: Fix recently added sibcall insns and peephole2 patterns
  2014-06-18 12:24 ` Kai Tietz
@ 2014-06-18 13:10   ` Uros Bizjak
  0 siblings, 0 replies; 5+ messages in thread
From: Uros Bizjak @ 2014-06-18 13:10 UTC (permalink / raw)
  To: Kai Tietz; +Cc: gcc-patches, Richard Henderson

On Wed, Jun 18, 2014 at 2:24 PM, Kai Tietz <ktietz70@googlemail.com> wrote:

> The following change in predicates.md seems to be a bit premature.
> There is still the point about Darwin's PIC issue for unspec-gotpcrel.
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61387
>
>   return ANY_QI_REG_P (op);
> })
>
> +;; Return true if OP is a memory operands that can be used in sibcalls.
> (define_predicate "sibcall_memory_operand"
> -  (match_operand 0 "memory_operand")
> -{
> -  return CONSTANT_P (XEXP (op, 0));
> -})
> +  (and (match_operand 0 "memory_operand")
> +       (match_test "CONSTANT_P (XEXP (op, 0))")))
>
> as we might to pessimize for Darwin UNSPEC_GOTPCREL at that point.
>  In general there is still the question why this issue just happens
> for Darwin, but not for linux.  For linux that gotpcrel-code path
> seems not to be hit at all (at least is that what Ians told).

Oh, this part doesn't change any functionality at all. The predicate
is just written in a different way.

Uros.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH, i386]: Fix recently added sibcall insns and peephole2 patterns
  2014-06-18 13:11 Dominique Dhumieres
@ 2014-06-18 13:45 ` Kai Tietz
  0 siblings, 0 replies; 5+ messages in thread
From: Kai Tietz @ 2014-06-18 13:45 UTC (permalink / raw)
  To: Dominique Dhumieres; +Cc: GCC Patches, iains, Uros Bizjak

2014-06-18 15:11 GMT+02:00 Dominique Dhumieres <dominiq@lps.ens.fr>:
>
>> The following change in predicates.md seems to be a bit premature.
>> There is still the point about Darwin's PIC issue for unspec-gotpcrel.
>
> The change is indeed incompatible with the patch in pr61387 comment 9.
> And without it the failures are back!-(
>
> Kai, what is wrong with Iain's patch in comment 4?
>
> TIA
>
> Dominique

Well, I don't see there patch, just a comment about a possible
code-change.  I think it is getting fixed at wrong place.  Reverting
fnaddr back to its original seems to be wrong solution here.  It would
be better to do something in the lines 'if (!flag_pic ||
targetm.binds_local_p (function) || TARGET_PECOFF)' instead.
Why shall we make it here an unspec, and later on revert that change?
If Darwin isn't able to handle such an UNSPEC_GOTPCREL as address for
a sibcall pattern, we should avoid it in general, and not just
papering over at place of mi__tunk.

Kai

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH, i386]: Fix recently added sibcall insns and peephole2 patterns
@ 2014-06-18 13:11 Dominique Dhumieres
  2014-06-18 13:45 ` Kai Tietz
  0 siblings, 1 reply; 5+ messages in thread
From: Dominique Dhumieres @ 2014-06-18 13:11 UTC (permalink / raw)
  To: gcc-patches; +Cc: iains, ktietz70, ubizjak


> The following change in predicates.md seems to be a bit premature.
> There is still the point about Darwin's PIC issue for unspec-gotpcrel.

The change is indeed incompatible with the patch in pr61387 comment 9.
And without it the failures are back!-(

Kai, what is wrong with Iain's patch in comment 4?

TIA

Dominique

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-18 13:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-18 10:24 [PATCH, i386]: Fix recently added sibcall insns and peephole2 patterns Uros Bizjak
2014-06-18 12:24 ` Kai Tietz
2014-06-18 13:10   ` Uros Bizjak
2014-06-18 13:11 Dominique Dhumieres
2014-06-18 13:45 ` Kai Tietz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).