* i386.md (movsi_1, movhi_1): Force reload to use more flexible
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 19 Apr 2002 14:02:06 +0000 (14:02 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 19 Apr 2002 14:02:06 +0000 (14:02 +0000)
alternative.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52519 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.md

index 097cf31..0571b4e 100644 (file)
@@ -1,3 +1,8 @@
+Fri Apr 19 15:53:03 CEST 2002  Jan Hubicka  <jh@suse.cz>
+
+       * i386.md (movsi_1, movhi_1): Force reload to use more flexible
+       alternative.
+
 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * builtins.c: Include langhooks.h.
index 3ebc997..868f4b0 100644 (file)
    (set_attr "mode" "SI")
    (set_attr "length_immediate" "1")])
 
+; The first alternative is used only to compute proper length of instruction.
+; Reload's algorithm does not take into account the cost of spill instructions
+; needed to free register in given class, so avoid it from choosing the first
+; alternative when eax is not available.
+
 (define_insn "*movsi_1"
-  [(set (match_operand:SI 0 "nonimmediate_operand" "=*a,r,*a,m,!*y,!rm,!*y,!*Y,!rm,!*Y")
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=*?a,r,*?a,m,!*y,!rm,!*y,!*Y,!rm,!*Y")
        (match_operand:SI 1 "general_operand" "im,rinm,rinm,rin,rm,*y,*y,rm,*Y,*Y"))]
   "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM"
 {
   [(set_attr "type" "push")
    (set_attr "mode" "QI")])
 
+; The first alternative is used only to compute proper length of instruction.
+; Reload's algorithm does not take into account the cost of spill instructions
+; needed to free register in given class, so avoid it from choosing the first
+; alternative when eax is not available.
+
 (define_insn "*movhi_1"
-  [(set (match_operand:HI 0 "nonimmediate_operand" "=*a,r,r,*a,r,m")
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=*?a,r,r,*?a,r,m")
        (match_operand:HI 1 "general_operand" "i,r,rn,rm,rm,rn"))]
   "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM"
 {