x86 FMA intrinsic support design

Yudi Zheng yudi.zheng at oracle.com
Fri Mar 29 10:04:02 UTC 2019

Hi Jp,

Thanks in advance for the contribution!

> 1.       Add VexRVMOp class support in AMD64Assembler with the corresponding FMA instructions
> a.       It requires to add the VexOpAssertion.FMA and CPUFeature.FMA flags

We already have the CPUFeature.FMA flag. For adding the 
VexOpAssertion.FMA, you might refer to this commit [1] that adds BMI 
VexOpAssertion (with quite some refactoring which you can ignore).

> 2.       Add UseFMA flag from HotSpot flags in GraalHotSpotVMConfig.java
> 3.       Add a registerFMA method in AMD64GraphBuilderPlugins::registerMathPlugins
> a.       This requires to add a specific FMAIntrinsicNode, which will emit the corresponding FMA instructions.

Sounds good to me. Maybe the name of the node could be unabbreviated as 
FusedMultiplyAddNode? Before implementing it, you might take a look into 
the Math exact plugins, the corresponding nodes (e.g., 
IntegerAddExactNode), and how we handleArithmeticException caused by 
such invocations.



More information about the graal-dev mailing list