Commit ca097615 by John Wehle Committed by Jeff Law

i386.md: Remove redundant integer push patterns.

        * i386.md: Remove redundant integer push patterns.
        Don't bother checking for TARGET_PUSH_MEMORY when
        pushing constants or registers.

From-SVN: r17401
parent 4399e7a3
Sat Jan 17 23:22:59 1998 John Wehle (john@feith.com)
* i386.md: Remove redundant integer push patterns.
Don't bother checking for TARGET_PUSH_MEMORY when
pushing constants or registers.
Sat Jan 17 22:35:39 1998 Mumit Khan <khan@xraylith.wisc.edu> Sat Jan 17 22:35:39 1998 Mumit Khan <khan@xraylith.wisc.edu>
J.J VanderHeijden <J.J.vanderHeijden@student.utwente.nl> J.J VanderHeijden <J.J.vanderHeijden@student.utwente.nl>
......
...@@ -834,23 +834,16 @@ ...@@ -834,23 +834,16 @@
(define_insn "" (define_insn ""
[(set (match_operand:SI 0 "push_operand" "=<") [(set (match_operand:SI 0 "push_operand" "=<")
(match_operand:SI 1 "general_operand" "g"))]
"TARGET_PUSH_MEMORY"
"push%L0 %1")
;; If not a 386, it is faster to move MEM to a REG and then push, rather than
;; push MEM directly.
(define_insn ""
[(set (match_operand:SI 0 "push_operand" "=<")
(match_operand:SI 1 "nonmemory_operand" "ri"))] (match_operand:SI 1 "nonmemory_operand" "ri"))]
"!TARGET_PUSH_MEMORY && TARGET_MOVE" ""
"push%L0 %1") "push%L0 %1")
;; On a 386, it is faster to push MEM directly.
(define_insn "" (define_insn ""
[(set (match_operand:SI 0 "push_operand" "=<") [(set (match_operand:SI 0 "push_operand" "=<")
(match_operand:SI 1 "nonmemory_operand" "ri"))] (match_operand:SI 1 "memory_operand" "m"))]
"!TARGET_PUSH_MEMORY && !TARGET_MOVE" "TARGET_PUSH_MEMORY"
"push%L0 %1") "push%L0 %1")
;; General case of fullword move. ;; General case of fullword move.
...@@ -911,20 +904,14 @@ ...@@ -911,20 +904,14 @@
(define_insn "" (define_insn ""
[(set (match_operand:HI 0 "push_operand" "=<") [(set (match_operand:HI 0 "push_operand" "=<")
(match_operand:HI 1 "general_operand" "g"))]
"TARGET_PUSH_MEMORY"
"push%W0 %1")
(define_insn ""
[(set (match_operand:HI 0 "push_operand" "=<")
(match_operand:HI 1 "nonmemory_operand" "ri"))] (match_operand:HI 1 "nonmemory_operand" "ri"))]
"!TARGET_PUSH_MEMORY && TARGET_MOVE" ""
"push%W0 %1") "push%W0 %1")
(define_insn "" (define_insn ""
[(set (match_operand:HI 0 "push_operand" "=<") [(set (match_operand:HI 0 "push_operand" "=<")
(match_operand:HI 1 "nonmemory_operand" "ri"))] (match_operand:HI 1 "memory_operand" "m"))]
"!TARGET_PUSH_MEMORY && !TARGET_MOVE" "TARGET_PUSH_MEMORY"
"push%W0 %1") "push%W0 %1")
;; On i486, an incl and movl are both faster than incw and movw. ;; On i486, an incl and movl are both faster than incw and movw.
...@@ -1038,22 +1025,12 @@ ...@@ -1038,22 +1025,12 @@
[(set (match_operand:QI 0 "push_operand" "=<") [(set (match_operand:QI 0 "push_operand" "=<")
(match_operand:QI 1 "const_int_operand" "n"))] (match_operand:QI 1 "const_int_operand" "n"))]
"" ""
"* return AS1 (push%W0,%1);") "push%W0,%1")
(define_insn ""
[(set (match_operand:QI 0 "push_operand" "=<")
(match_operand:QI 1 "register_operand" "q"))]
"!TARGET_MOVE"
"*
{
operands[1] = gen_rtx (REG, HImode, REGNO (operands[1]));
return AS1 (push%W0,%1);
}")
(define_insn "" (define_insn ""
[(set (match_operand:QI 0 "push_operand" "=<") [(set (match_operand:QI 0 "push_operand" "=<")
(match_operand:QI 1 "register_operand" "q"))] (match_operand:QI 1 "register_operand" "q"))]
"TARGET_MOVE" ""
"* "*
{ {
operands[1] = gen_rtx (REG, HImode, REGNO (operands[1])); operands[1] = gen_rtx (REG, HImode, REGNO (operands[1]));
......
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