(cmpdi): Rewrite to avoid bogus matching constraints.
From-SVN: r9880
This commit is contained in:
parent
7f49c33119
commit
a1efcf3c40
|
@ -411,23 +411,33 @@
|
|||
|
||||
;; compare instructions.
|
||||
|
||||
(define_insn "cmpdi"
|
||||
(define_expand "cmpdi"
|
||||
[(parallel
|
||||
[(set (cc0)
|
||||
(compare (match_operand:DI 0 "nonimmediate_operand" "")
|
||||
(match_operand:DI 1 "general_operand" "")))
|
||||
(clobber (match_dup 2))])]
|
||||
""
|
||||
"
|
||||
{
|
||||
operands[2] = gen_reg_rtx (DImode);
|
||||
}")
|
||||
|
||||
(define_insn ""
|
||||
[(set (cc0)
|
||||
;; (compare (match_operand:DI 0 "general_operand" "=&d*a")
|
||||
;; (compare (match_operand:DI 0 "general_operand" "+&d*a")
|
||||
;; (compare (match_operand:DI 0 "general_operand" "+d*a")
|
||||
(compare (match_operand:DI 0 "general_operand" "d*a")
|
||||
(match_operand:DI 1 "general_operand" "d")))
|
||||
(clobber (match_scratch:DI 2 "=0"))]
|
||||
(compare (match_operand:DI 1 "nonimmediate_operand" "0,d")
|
||||
(match_operand:DI 2 "general_operand" "d,0")))
|
||||
(clobber (match_operand:DI 0 "register_operand" "=d,d"))]
|
||||
""
|
||||
"*
|
||||
{
|
||||
operands[2] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1);
|
||||
operands[3] = gen_rtx (REG, SImode, REGNO (operands[1]) + 1);
|
||||
if (DATA_REG_P (operands[0]))
|
||||
return \"sub%.l %3,%2\;subx%.l %1,%0\";
|
||||
if (rtx_equal_p (operands[0], operands[1]))
|
||||
return \"sub%.l %R2,%R0\;subx%.l %2,%0\";
|
||||
else
|
||||
return \"exg %/d0,%2\;sub%.l %3,%/d0\;exg %/d0,%0\;subx%.l %1,%/d0\;exg %/d0,%2\";
|
||||
{
|
||||
return \"sub%.l %R1,%R0\;subx%.l %1,%0\";
|
||||
cc_status.flags |= CC_REVERSED;
|
||||
}
|
||||
}")
|
||||
|
||||
;; This is the second "hook" for PIC code (in addition to movsi). See
|
||||
|
|
Loading…
Reference in New Issue