aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-03-14 18:38:25 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1995-03-14 18:38:25 -0500
commit22859ae8bd7288dd5a644be1491c9e5cc1bb1f1b (patch)
treecaa38d3786b0d791bae1e6b001b7b082f2cfa2f8 /gcc/config
parent49a0b2043ae6dc5832c03121f285d42f2ab0f537 (diff)
downloadgcc-22859ae8bd7288dd5a644be1491c9e5cc1bb1f1b.zip
gcc-22859ae8bd7288dd5a644be1491c9e5cc1bb1f1b.tar.gz
gcc-22859ae8bd7288dd5a644be1491c9e5cc1bb1f1b.tar.bz2
({add,sub,mul,div}[sdx]f3): Add new patterns for recognizing SImode,
HImode, and QImode operands. From-SVN: r9183
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/m68k/m68k.md282
1 files changed, 282 insertions, 0 deletions
diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md
index 24065ac..eca3715 100644
--- a/gcc/config/m68k/m68k.md
+++ b/gcc/config/m68k/m68k.md
@@ -2406,6 +2406,27 @@
(define_insn ""
[(set (match_operand:DF 0 "general_operand" "=f")
+ (plus:DF (float:DF (match_operand:SI 2 "general_operand" "dmi"))
+ (match_operand:DF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "f%&add%.l %2,%0")
+
+(define_insn ""
+ [(set (match_operand:DF 0 "general_operand" "=f")
+ (plus:DF (float:DF (match_operand:HI 2 "general_operand" "dmn"))
+ (match_operand:DF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "f%&add%.w %2,%0")
+
+(define_insn ""
+ [(set (match_operand:DF 0 "general_operand" "=f")
+ (plus:DF (float:DF (match_operand:QI 2 "general_operand" "dmn"))
+ (match_operand:DF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "f%&add%.b %2,%0")
+
+(define_insn ""
+ [(set (match_operand:DF 0 "general_operand" "=f")
(plus:DF (match_operand:DF 1 "general_operand" "%0")
(match_operand:DF 2 "general_operand" "fmG")))]
"TARGET_68881"
@@ -2441,6 +2462,27 @@
(define_insn ""
[(set (match_operand:SF 0 "general_operand" "=f")
+ (plus:SF (float:SF (match_operand:SI 2 "general_operand" "dmi"))
+ (match_operand:SF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "f%$add%.l %2,%0")
+
+(define_insn ""
+ [(set (match_operand:SF 0 "general_operand" "=f")
+ (plus:SF (float:SF (match_operand:HI 2 "general_operand" "dmn"))
+ (match_operand:SF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "f%$add%.w %2,%0")
+
+(define_insn ""
+ [(set (match_operand:SF 0 "general_operand" "=f")
+ (plus:SF (float:SF (match_operand:QI 2 "general_operand" "dmn"))
+ (match_operand:SF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "f%$add%.b %2,%0")
+
+(define_insn ""
+ [(set (match_operand:SF 0 "general_operand" "=f")
(plus:SF (match_operand:SF 1 "general_operand" "%0")
(match_operand:SF 2 "general_operand" "fdmF")))]
"TARGET_68881"
@@ -2601,6 +2643,27 @@
(define_insn ""
[(set (match_operand:DF 0 "general_operand" "=f")
(minus:DF (match_operand:DF 1 "general_operand" "0")
+ (float:DF (match_operand:SI 2 "general_operand" "dmi"))))]
+ "TARGET_68881"
+ "f%&sub%.l %2,%0")
+
+(define_insn ""
+ [(set (match_operand:DF 0 "general_operand" "=f")
+ (minus:DF (match_operand:DF 1 "general_operand" "0")
+ (float:DF (match_operand:HI 2 "general_operand" "dmn"))))]
+ "TARGET_68881"
+ "f%&sub%.w %2,%0")
+
+(define_insn ""
+ [(set (match_operand:DF 0 "general_operand" "=f")
+ (minus:DF (match_operand:DF 1 "general_operand" "0")
+ (float:DF (match_operand:QI 2 "general_operand" "dmn"))))]
+ "TARGET_68881"
+ "f%&sub%.b %2,%0")
+
+(define_insn ""
+ [(set (match_operand:DF 0 "general_operand" "=f")
+ (minus:DF (match_operand:DF 1 "general_operand" "0")
(match_operand:DF 2 "general_operand" "fmG")))]
"TARGET_68881"
"*
@@ -2636,6 +2699,27 @@
(define_insn ""
[(set (match_operand:SF 0 "general_operand" "=f")
(minus:SF (match_operand:SF 1 "general_operand" "0")
+ (float:SF (match_operand:SI 2 "general_operand" "dmi"))))]
+ "TARGET_68881"
+ "f%$sub%.l %2,%0")
+
+(define_insn ""
+ [(set (match_operand:SF 0 "general_operand" "=f")
+ (minus:SF (match_operand:SF 1 "general_operand" "0")
+ (float:SF (match_operand:HI 2 "general_operand" "dmn"))))]
+ "TARGET_68881"
+ "f%$sub%.w %2,%0")
+
+(define_insn ""
+ [(set (match_operand:SF 0 "general_operand" "=f")
+ (minus:SF (match_operand:SF 1 "general_operand" "0")
+ (float:SF (match_operand:QI 2 "general_operand" "dmn"))))]
+ "TARGET_68881"
+ "f%$sub%.b %2,%0")
+
+(define_insn ""
+ [(set (match_operand:SF 0 "general_operand" "=f")
+ (minus:SF (match_operand:SF 1 "general_operand" "0")
(match_operand:SF 2 "general_operand" "fdmF")))]
"TARGET_68881"
"*
@@ -2925,6 +3009,27 @@
(define_insn ""
[(set (match_operand:DF 0 "general_operand" "=f")
+ (mult:DF (float:DF (match_operand:SI 2 "general_operand" "dmi"))
+ (match_operand:DF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "f%&mul%.l %2,%0")
+
+(define_insn ""
+ [(set (match_operand:DF 0 "general_operand" "=f")
+ (mult:DF (float:DF (match_operand:HI 2 "general_operand" "dmn"))
+ (match_operand:DF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "f%&mul%.w %2,%0")
+
+(define_insn ""
+ [(set (match_operand:DF 0 "general_operand" "=f")
+ (mult:DF (float:DF (match_operand:QI 2 "general_operand" "dmn"))
+ (match_operand:DF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "f%&mul%.b %2,%0")
+
+(define_insn ""
+ [(set (match_operand:DF 0 "general_operand" "=f")
(mult:DF (match_operand:DF 1 "general_operand" "%0")
(match_operand:DF 2 "general_operand" "fmG")))]
"TARGET_68881"
@@ -2969,6 +3074,42 @@
(define_insn ""
[(set (match_operand:SF 0 "general_operand" "=f")
+ (mult:SF (float:SF (match_operand:SI 2 "general_operand" "dmi"))
+ (match_operand:SF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "*
+{
+ return (TARGET_68040_ONLY
+ ? \"fsmul%.l %2,%0\"
+ : \"fsglmul%.l %2,%0\");
+}")
+
+(define_insn ""
+ [(set (match_operand:SF 0 "general_operand" "=f")
+ (mult:SF (float:SF (match_operand:HI 2 "general_operand" "dmn"))
+ (match_operand:SF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "*
+{
+ return (TARGET_68040_ONLY
+ ? \"fsmul%.w %2,%0\"
+ : \"fsglmul%.w %2,%0\");
+}")
+
+(define_insn ""
+ [(set (match_operand:SF 0 "general_operand" "=f")
+ (mult:SF (float:SF (match_operand:QI 2 "general_operand" "dmn"))
+ (match_operand:SF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "*
+{
+ return (TARGET_68040_ONLY
+ ? \"fsmul%.b %2,%0\"
+ : \"fsglmul%.b %2,%0\");
+}")
+
+(define_insn ""
+ [(set (match_operand:SF 0 "general_operand" "=f")
(mult:SF (match_operand:SF 1 "general_operand" "%0")
(match_operand:SF 2 "general_operand" "fdmF")))]
"TARGET_68881"
@@ -3111,6 +3252,27 @@
(define_insn ""
[(set (match_operand:DF 0 "general_operand" "=f")
(div:DF (match_operand:DF 1 "general_operand" "0")
+ (float:DF (match_operand:SI 2 "general_operand" "dmi"))))]
+ "TARGET_68881"
+ "f%&div%.l %2,%0")
+
+(define_insn ""
+ [(set (match_operand:DF 0 "general_operand" "=f")
+ (div:DF (match_operand:DF 1 "general_operand" "0")
+ (float:DF (match_operand:HI 2 "general_operand" "dmn"))))]
+ "TARGET_68881"
+ "f%&div%.w %2,%0")
+
+(define_insn ""
+ [(set (match_operand:DF 0 "general_operand" "=f")
+ (div:DF (match_operand:DF 1 "general_operand" "0")
+ (float:DF (match_operand:QI 2 "general_operand" "dmn"))))]
+ "TARGET_68881"
+ "f%&div%.b %2,%0")
+
+(define_insn ""
+ [(set (match_operand:DF 0 "general_operand" "=f")
+ (div:DF (match_operand:DF 1 "general_operand" "0")
(match_operand:DF 2 "general_operand" "fmG")))]
"TARGET_68881"
"*
@@ -3146,6 +3308,42 @@
(define_insn ""
[(set (match_operand:SF 0 "general_operand" "=f")
(div:SF (match_operand:SF 1 "general_operand" "0")
+ (float:SF (match_operand:SI 2 "general_operand" "dmi"))))]
+ "TARGET_68881"
+ "*
+{
+ return (TARGET_68040_ONLY
+ ? \"fsdiv%.l %2,%0\"
+ : \"fsgldiv%.l %2,%0\");
+}")
+
+(define_insn ""
+ [(set (match_operand:SF 0 "general_operand" "=f")
+ (div:SF (match_operand:SF 1 "general_operand" "0")
+ (float:SF (match_operand:HI 2 "general_operand" "dmn"))))]
+ "TARGET_68881"
+ "*
+{
+ return (TARGET_68040_ONLY
+ ? \"fsdiv%.w %2,%0\"
+ : \"fsgldiv%.w %2,%0\");
+}")
+
+(define_insn ""
+ [(set (match_operand:SF 0 "general_operand" "=f")
+ (div:SF (match_operand:SF 1 "general_operand" "0")
+ (float:SF (match_operand:QI 2 "general_operand" "dmn"))))]
+ "TARGET_68881"
+ "*
+{
+ return (TARGET_68040_ONLY
+ ? \"fsdiv%.b %2,%0\"
+ : \"fsgldiv%.b %2,%0\");
+}")
+
+(define_insn ""
+ [(set (match_operand:SF 0 "general_operand" "=f")
+ (div:SF (match_operand:SF 1 "general_operand" "0")
(match_operand:SF 2 "general_operand" "fdmF")))]
"TARGET_68881"
"*
@@ -6237,6 +6435,27 @@
(define_insn ""
[(set (match_operand:XF 0 "general_operand" "=f")
+ (plus:XF (float:XF (match_operand:SI 2 "general_operand" "dmi"))
+ (match_operand:XF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "fadd%.l %2,%0")
+
+(define_insn ""
+ [(set (match_operand:XF 0 "general_operand" "=f")
+ (plus:XF (float:XF (match_operand:HI 2 "general_operand" "dmn"))
+ (match_operand:XF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "fadd%.w %2,%0")
+
+(define_insn ""
+ [(set (match_operand:XF 0 "general_operand" "=f")
+ (plus:XF (float:XF (match_operand:QI 2 "general_operand" "dmn"))
+ (match_operand:XF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "fadd%.b %2,%0")
+
+(define_insn ""
+ [(set (match_operand:XF 0 "general_operand" "=f")
(plus:XF (match_operand:XF 1 "nonimmediate_operand" "%0")
(match_operand:XF 2 "nonimmediate_operand" "fmG")))]
"TARGET_68881"
@@ -6262,6 +6481,27 @@
(define_insn ""
[(set (match_operand:XF 0 "general_operand" "=f")
+ (minus:XF (match_operand:XF 1 "general_operand" "0")
+ (float:XF (match_operand:SI 2 "general_operand" "dmi"))))]
+ "TARGET_68881"
+ "fsub%.l %2,%0")
+
+(define_insn ""
+ [(set (match_operand:XF 0 "general_operand" "=f")
+ (minus:XF (match_operand:XF 1 "general_operand" "0")
+ (float:XF (match_operand:HI 2 "general_operand" "dmn"))))]
+ "TARGET_68881"
+ "fsub%.w %2,%0")
+
+(define_insn ""
+ [(set (match_operand:XF 0 "general_operand" "=f")
+ (minus:XF (match_operand:XF 1 "general_operand" "0")
+ (float:XF (match_operand:QI 2 "general_operand" "dmn"))))]
+ "TARGET_68881"
+ "fsub%.b %2,%0")
+
+(define_insn ""
+ [(set (match_operand:XF 0 "general_operand" "=f")
(minus:XF (match_operand:XF 1 "nonimmediate_operand" "0")
(match_operand:XF 2 "nonimmediate_operand" "fmG")))]
"TARGET_68881"
@@ -6287,6 +6527,27 @@
(define_insn ""
[(set (match_operand:XF 0 "general_operand" "=f")
+ (mult:XF (float:XF (match_operand:SI 2 "general_operand" "dmi"))
+ (match_operand:XF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "fmul%.l %2,%0")
+
+(define_insn ""
+ [(set (match_operand:XF 0 "general_operand" "=f")
+ (mult:XF (float:XF (match_operand:HI 2 "general_operand" "dmn"))
+ (match_operand:XF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "fmul%.w %2,%0")
+
+(define_insn ""
+ [(set (match_operand:XF 0 "general_operand" "=f")
+ (mult:XF (float:XF (match_operand:QI 2 "general_operand" "dmn"))
+ (match_operand:XF 1 "general_operand" "0")))]
+ "TARGET_68881"
+ "fmul%.b %2,%0")
+
+(define_insn ""
+ [(set (match_operand:XF 0 "general_operand" "=f")
(mult:XF (match_operand:XF 1 "nonimmediate_operand" "%0")
(match_operand:XF 2 "nonimmediate_operand" "fmG")))]
"TARGET_68881"
@@ -6312,6 +6573,27 @@
(define_insn ""
[(set (match_operand:XF 0 "general_operand" "=f")
+ (div:XF (match_operand:XF 1 "general_operand" "0")
+ (float:XF (match_operand:SI 2 "general_operand" "dmi"))))]
+ "TARGET_68881"
+ "fdiv%.l %2,%0")
+
+(define_insn ""
+ [(set (match_operand:XF 0 "general_operand" "=f")
+ (div:XF (match_operand:XF 1 "general_operand" "0")
+ (float:XF (match_operand:HI 2 "general_operand" "dmn"))))]
+ "TARGET_68881"
+ "fdiv%.w %2,%0")
+
+(define_insn ""
+ [(set (match_operand:XF 0 "general_operand" "=f")
+ (div:XF (match_operand:XF 1 "general_operand" "0")
+ (float:XF (match_operand:QI 2 "general_operand" "dmn"))))]
+ "TARGET_68881"
+ "fdiv%.b %2,%0")
+
+(define_insn ""
+ [(set (match_operand:XF 0 "general_operand" "=f")
(div:XF (match_operand:XF 1 "nonimmediate_operand" "0")
(match_operand:XF 2 "nonimmediate_operand" "fmG")))]
"TARGET_68881"