diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-12-21 13:56:02 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-12-21 13:56:02 -0500 |
commit | 781e6f76683d17b29125d28f52be00151321b772 (patch) | |
tree | c59b8d262d7d6d04f49437c72ab74b79e1b9abef | |
parent | 76ebc969d32ea4ad8a7fd7a98a30f093906b2847 (diff) | |
download | gcc-781e6f76683d17b29125d28f52be00151321b772.zip gcc-781e6f76683d17b29125d28f52be00151321b772.tar.gz gcc-781e6f76683d17b29125d28f52be00151321b772.tar.bz2 |
(mulhisi3): Add truncate to mulhisi3 to fix bug and change from define_insn to...
(mulhisi3): Add truncate to mulhisi3 to fix bug and change from
define_insn to define_expand to survive register presssure.
From-SVN: r8683
-rw-r--r-- | gcc/config/pdp11/pdp11.md | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/gcc/config/pdp11/pdp11.md b/gcc/config/pdp11/pdp11.md index f1fc810..10673c7 100644 --- a/gcc/config/pdp11/pdp11.md +++ b/gcc/config/pdp11/pdp11.md @@ -1670,14 +1670,34 @@ [(set_attr "length" "1,2")]) ;; 32 bit result -(define_insn "mulhisi3" +(define_expand "mulhisi3" + [(set (match_dup 3) + (match_operand:HI 1 "general_operand" "g,g")) + (set (match_operand:SI 0 "register_operand" "=r,r") ; even numbered! + (mult:SI (truncate:HI + (match_dup 0)) + (match_operand:HI 2 "general_operand" "rR,Qi")))] + "TARGET_45" + "operands[3] = gen_lowpart(HImode, operands[1]);") + +(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r,r") ; even numbered! - (mult:SI (match_operand:HI 1 "register_operand" "%0,0") + (mult:SI (truncate:HI + (match_operand:SI 1 "register_operand" "%0,0")) (match_operand:HI 2 "general_operand" "rR,Qi")))] "TARGET_45" "mul %2, %0" [(set_attr "length" "1,2")]) +;(define_insn "mulhisi3" +; [(set (match_operand:SI 0 "register_operand" "=r,r") ; even numbered! +; (mult:SI (truncate:HI +; (match_operand:SI 1 "register_operand" "%0,0")) +; (match_operand:HI 2 "general_operand" "rR,Qi")))] +; "TARGET_45" +; "mul %2, %0" +; [(set_attr "length" "1,2")]) + ;;- divide ;; how can I use the remainder ? - ;; modsidi and move upper register to lower ???? |