diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1996-01-31 07:14:24 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1996-01-31 07:14:24 -0500 |
commit | f8e0b2eab0ba8af9312f1a7ce2d5e70cf778a006 (patch) | |
tree | baf62e8cf52a14ce86049c0e97391382685ff7c3 /gcc | |
parent | ad92f7940c5fbbd8a0b021856e1fbde37eb9bc7a (diff) | |
download | gcc-f8e0b2eab0ba8af9312f1a7ce2d5e70cf778a006.zip gcc-f8e0b2eab0ba8af9312f1a7ce2d5e70cf778a006.tar.gz gcc-f8e0b2eab0ba8af9312f1a7ce2d5e70cf778a006.tar.bz2 |
({adddi,subdi}_sexthishl32): 'a' and 'd' versions merged and fixed; do
not generate 'add/sub a,m'.
From-SVN: r11127
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/m68k/m68k.md | 63 |
1 files changed, 26 insertions, 37 deletions
diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index e8f5807..d65d84d 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -2014,31 +2014,25 @@ return \"sub%.l %2,%3\;subx%.l %2,%0\"; }") -(define_insn "adddia_sexthishl32" - [(set (match_operand:DI 0 "register_operand" "+a") +(define_insn "adddi_sexthishl32" + [(set (match_operand:DI 0 "general_operand" "=o,d,a") (plus:DI (ashift:DI (sign_extend:DI - (match_operand:HI 1 "general_operand" "rm")) + (match_operand:HI 1 "general_operand" "rm,rm,rm")) (const_int 32)) - (match_dup 0)))] + (match_operand:DI 2 "general_operand" "0,0,0"))) + (clobber (match_scratch:SI 3 "=&d*a,a*d,X"))] "" "* { CC_STATUS_INIT; - return \"add%.w %1,%0\"; -} ") - -(define_insn "adddid_sexthishl32" - [(set (match_operand:DI 0 "general_operand" "+ro") - (plus:DI (ashift:DI (sign_extend:DI - (match_operand:HI 1 "general_operand" "rm")) - (const_int 32)) - (match_dup 0))) - (clobber (match_scratch:SI 2 "=a"))] - "" - "* -{ - CC_STATUS_INIT; - return \"move%.w %1,%2\;add%.l %2,%0\"; + if (ADDRESS_REG_P (operands[0])) + return \"add%.w %1,%0\"; + else if (DATA_REG_P (operands[3])) + return \"move%.w %1,%3\;ext%.l %3\;add%.l %3,%0\"; + else if (DATA_REG_P (operands[0])) + return \"move%.w %1,%3\;add%.l %3,%0\"; + else + return \"move%.l %0,%3\;add%.w %1,%3\;mov%.l %3,%0\"; } ") (define_insn "adddi_dilshr32" @@ -2627,29 +2621,24 @@ ;; subtract instructions -(define_insn "subdia_sexthishl32" - [(set (match_operand:DI 0 "register_operand" "+a") - (minus:DI (match_dup 0) - (ashift:DI (sign_extend:DI (match_operand:HI 1 "general_operand" "rm")) - (const_int 32))))] - "" - "* -{ - CC_STATUS_INIT; - return \"sub%.w %1,%0\"; -} ") - -(define_insn "subdid_sexthishl32" - [(set (match_operand:DI 0 "general_operand" "+ro") - (minus:DI (match_dup 0) - (ashift:DI (sign_extend:DI (match_operand:HI 1 "general_operand" "rm")) +(define_insn "subdi_sexthishl32" + [(set (match_operand:DI 0 "general_operand" "=o,d,a") + (minus:DI (match_operand:DI 1 "general_operand" "0,0,0") + (ashift:DI (sign_extend:DI (match_operand:HI 2 "general_operand" "rm,rm,rm")) (const_int 32)))) - (clobber (match_scratch:SI 2 "=a"))] + (clobber (match_scratch:SI 3 "=&d*a,a*d,X"))] "" "* { CC_STATUS_INIT; - return \"move%.w %1,%2\;sub%.l %2,%0\"; + if (ADDRESS_REG_P (operands[0])) + return \"sub%.w %2,%0\"; + else if (DATA_REG_P (operands[3])) + return \"move%.w %2,%3\;ext%.l %3\;sub%.l %3,%0\"; + else if (DATA_REG_P (operands[0])) + return \"move%.w %2,%3\;sub%.l %3,%0\"; + else + return \"move%.l %0,%3\;sub%.w %2,%3\;mov%.l %3,%0\"; } ") (define_insn "subdi_dishl32" |