[PATCH, i386]: Fix PR79514, ICE with -m96bit-long-double on x86_64

Uros Bizjak ubizjak@gmail.com
Fri Mar 3 09:20:00 GMT 2017


On Thu, Mar 2, 2017 at 7:52 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> Attached patch adds new insn_and_split pattern to handle pre_modify
> XFmode push variant. -m96bit-long-double option sets XFmode size to 12
> bytes that is not divisible with push size (8 bytes), resulting in
> pre_modify push variant.

Attached patch is also needed to avoid ICE on x32.

2017-03-03  Uros Bizjak  <ubizjak@gmail.com>

    PR target/79514
    * config/i386/i386.md (*pushxf_rounded): Use Pmode instead of DImode.

Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

Committed to mainline, will be backported to release branches.

Uros.
-------------- next part --------------
Index: config/i386/i386.md
===================================================================
--- config/i386/i386.md	(revision 245860)
+++ config/i386/i386.md	(working copy)
@@ -3017,14 +3017,14 @@
 
 (define_insn_and_split "*pushxf_rounded"
   [(set (mem:XF
-	  (pre_modify:DI
-	    (reg:DI SP_REG)
-	    (plus:DI (reg:DI SP_REG) (const_int -16))))
+	  (pre_modify:P
+	    (reg:P SP_REG)
+	    (plus:P (reg:P SP_REG) (const_int -16))))
 	(match_operand:XF 0 "nonmemory_no_elim_operand" "f,r,*r,C"))]
   "TARGET_64BIT"
   "#"
   "&& 1"
-  [(set (reg:DI SP_REG) (plus:DI (reg:DI SP_REG) (const_int -16)))
+  [(set (reg:P SP_REG) (plus:P (reg:P SP_REG) (const_int -16)))
    (set (match_dup 1) (match_dup 0))]
 {
   rtx pat = PATTERN (curr_insn);


More information about the Gcc-patches mailing list