Commit de80110b by Jan Hubicka Committed by Jan Hubicka

i386.md (movsi_1, movhi_1): Force reload to use more flexible alternative.

	* i386.md (movsi_1, movhi_1): Force reload to use more flexible
	alternative.

From-SVN: r52519
parent eea18a4a
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> 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
* builtins.c: Include langhooks.h. * builtins.c: Include langhooks.h.
......
...@@ -1733,8 +1733,13 @@ ...@@ -1733,8 +1733,13 @@
(set_attr "mode" "SI") (set_attr "mode" "SI")
(set_attr "length_immediate" "1")]) (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" (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"))] (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" "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM"
{ {
...@@ -1843,8 +1848,13 @@ ...@@ -1843,8 +1848,13 @@
[(set_attr "type" "push") [(set_attr "type" "push")
(set_attr "mode" "QI")]) (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" (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"))] (match_operand:HI 1 "general_operand" "i,r,rn,rm,rm,rn"))]
"GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM" "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM"
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment