< prev index next >

src/cpu/x86/vm/x86_32.ad

Print this page

        

@@ -11815,10 +11815,34 @@
                         $tmp4$$XMMRegister, $tmp5$$Register, $result$$Register);
   %}
   ins_pipe( pipe_slow );
 %}
 
+// fma - double - a * b + c
+instruct fmaD_reg(regD a, regD b, regD c) %{
+  predicate(UseFMA);
+  match(Set c (FmaD  c (Binary a b)));
+  format %{ "fmasd $a,$b,$c -> $c" %}
+  ins_cost(150);
+  ins_encode %{
+    __ vfmadd231sd($c$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister);
+  %}
+  ins_pipe( pipe_slow );
+%}
+
+// fma - float - a * b + c
+instruct fmaF_reg(regF a, regF b, regF c) %{
+  predicate(UseFMA);
+  match(Set c (FmaF  c (Binary a b)));
+  format %{ "fmass $a,$b,$c -> $c" %}
+  ins_cost(150);
+  ins_encode %{
+    __ vfmadd231ss($c$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister);
+  %}
+  ins_pipe( pipe_slow );
+%}
+
 
 //----------Control Flow Instructions------------------------------------------
 // Signed compare Instructions
 instruct compI_eReg(eFlagsReg cr, rRegI op1, rRegI op2) %{
   match(Set cr (CmpI op1 op2));
< prev index next >