diff mbox

[10/N,am33] convert to fma

Message ID 20101112030659.GA14773@twiddle.net
State New
Headers show

Commit Message

Richard Henderson Nov. 12, 2010, 3:06 a.m. UTC
The mn10300 documentation that I have does not contain
these instructions, so please double-check the definition
of the fnmadd instruction.


r~

Comments

Nick Clifton Nov. 15, 2010, 3:58 p.m. UTC | #1
Hi Richard,

> The mn10300 documentation that I have does not contain
> these instructions, so please double-check the definition
> of the fnmadd instruction.

It is fine, as are the other definitions.

I did look for documentation on these instructions online but I could 
not find any.  I do have a copy of the MN103E Instruction Manual 
archived locally however that does include the specification of the 
instructions.  I can send a copy to you if you like.

Cheers
   Nick
diff mbox

Patch

diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md
index 9f2fc9f..1028357 100644
--- a/gcc/config/mn10300/mn10300.md
+++ b/gcc/config/mn10300/mn10300.md
@@ -2866,11 +2866,11 @@ 
   ]
 )
 
-(define_insn "fmaddsf4"
-  [(set (match_operand:SF                   0 "register_operand" "=A")
-	(plus:SF (mult:SF (match_operand:SF 1 "register_operand" "%f")
-			  (match_operand:SF 2 "register_operand" "f"))
-		 (match_operand:SF          3 "register_operand" "f")))
+(define_insn "fmasf4"
+  [(set (match_operand:SF         0 "register_operand" "=A")
+	(fma:SF (match_operand:SF 1 "register_operand" "f")
+		(match_operand:SF 2 "register_operand" "f")
+		(match_operand:SF 3 "register_operand" "f")))
    (clobber (reg:CC_FLOAT CC_REG))
   ]
   "TARGET_AM33_2"
@@ -2879,11 +2879,11 @@ 
 				       (const_int 17) (const_int 24)))]
 )
 
-(define_insn "fmsubsf4"
-  [(set (match_operand:SF                    0 "register_operand" "=A")
-	(minus:SF (mult:SF (match_operand:SF 1 "register_operand" "%f")
-			   (match_operand:SF 2 "register_operand" "f"))
-		  (match_operand:SF          3 "register_operand" "f")))
+(define_insn "fmssf4"
+  [(set (match_operand:SF                 0 "register_operand" "=A")
+	(fma:SF (match_operand:SF         1 "register_operand" "f")
+		(match_operand:SF         2 "register_operand" "f")
+		(neg:SF (match_operand:SF 3 "register_operand" "f"))))
    (clobber (reg:CC_FLOAT CC_REG))
   ]
   "TARGET_AM33_2"
@@ -2892,11 +2892,11 @@ 
 				       (const_int 17) (const_int 24)))]
 )
 
-(define_insn "fnmaddsf4"
-  [(set (match_operand:SF                    0 "register_operand" "=A")
-	(minus:SF (match_operand:SF          3 "register_operand" "f")
-		  (mult:SF (match_operand:SF 1 "register_operand" "%f")
-			   (match_operand:SF 2 "register_operand" "f"))))
+(define_insn "fnmasf4"
+  [(set (match_operand:SF                 0 "register_operand" "=A")
+	(fma:SF (neg:SF (match_operand:SF 1 "register_operand" "f"))
+		(match_operand:SF         2 "register_operand" "f")
+		(match_operand:SF         3 "register_operand" "f")))
    (clobber (reg:CC_FLOAT CC_REG))
   ]
   "TARGET_AM33_2"
@@ -2905,11 +2905,11 @@ 
 				       (const_int 17) (const_int 24)))]
 )
 
-(define_insn "fnmsubsf4"
-  [(set (match_operand:SF                            0 "register_operand" "=A")
-	(minus:SF (neg:SF (mult:SF (match_operand:SF 1 "register_operand" "%f")
-				   (match_operand:SF 2 "register_operand" "f")))
-		  (match_operand:SF                  3 "register_operand" "f")))
+(define_insn "fnmssf4"
+  [(set (match_operand:SF                 0 "register_operand" "=A")
+	(fma:SF (neg:SF (match_operand:SF 1 "register_operand" "f"))
+		(match_operand:SF         2 "register_operand" "f")
+		(neg:SF (match_operand:SF 3 "register_operand" "f"))))
    (clobber (reg:CC_FLOAT CC_REG))
   ]
   "TARGET_AM33_2"