--- old/src/cpu/x86/vm/x86_32.ad 2016-07-13 16:45:10.260461500 -0700 +++ new/src/cpu/x86/vm/x86_32.ad 2016-07-13 16:45:09.909461500 -0700 @@ -11817,6 +11817,30 @@ 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