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]

[PATCH] Fix gcc.dg/20020201-3.c


Hi!

The following patch fixes the IA-32 -mmmx ICE testcase I've commited
yesterday. I don't see why a SFmode value cannot be moved from or into an
MMX register similarly to movsi (though it certainly shouldn't be
encouraged).
Ok to commit if testing is ok?

2002-02-02  Jakub Jelinek  <jakub@redhat.com>

	* config/i386/i386.md (movsf_1): Allow moving SF values in MMX
	registers.

--- gcc/config/i386/i386.md.jj	Wed Jan 23 16:29:20 2002
+++ gcc/config/i386/i386.md	Sat Feb  2 23:32:41 2002
@@ -2713,8 +2713,8 @@
    (set (mem:SF (reg:DI 7)) (match_dup 1))])
 
 (define_insn "*movsf_1"
-  [(set (match_operand:SF 0 "nonimmediate_operand" "=f#xr,m,f#xr,r#xf,m,x#rf,x#rf,x#rf,m")
-	(match_operand:SF 1 "general_operand" "fm#rx,f#rx,G,rmF#fx,Fr#fx,H,x,xm#rf,x#rf"))]
+  [(set (match_operand:SF 0 "nonimmediate_operand" "=f#xr,m,f#xr,r#xf,m,x#rf,x#rf,x#rf,m,!*y,!rm")
+	(match_operand:SF 1 "general_operand" "fm#rx,f#rx,G,rmF#fx,Fr#fx,H,x,xm#rf,x#rf,rm,*y"))]
   "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)
    && (reload_in_progress || reload_completed
        || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
@@ -2762,12 +2762,16 @@
     case 8:
       return "movss\t{%1, %0|%0, %1}";
 
+    case 9:
+    case 10:
+      return "movd\t{%1, %0|%0, %1}";
+
     default:
       abort();
     }
 }
-  [(set_attr "type" "fmov,fmov,fmov,imov,imov,sse,sse,sse,sse")
-   (set_attr "mode" "SF,SF,SF,SI,SI,TI,SF,SF,SF")])
+  [(set_attr "type" "fmov,fmov,fmov,imov,imov,sse,sse,sse,sse,mmx,mmx")
+   (set_attr "mode" "SF,SF,SF,SI,SI,TI,SF,SF,SF,SI,SI")])
 
 (define_insn "*swapsf"
   [(set (match_operand:SF 0 "register_operand" "+f")

	Jakub


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