binaryen
binaryen copied to clipboard
[FP16] Implement madd and nmadd.
Specified at https://github.com/WebAssembly/half-precision/blob/main/proposals/half-precision/Overview.md
A few notes:
- The F32x4 and F64x2 versions of madd and nmadd are missing spect tests.
- For madd, the implementation was incorrectly doing
(b*c)+a
where it should be(a*b)+c
. - For nmadd, the implementation was incorrectly doing
(-b*c)+a
where it should be-(a*b)+c
. - There doesn't appear to be a great way to actually implement a fused nmadd, but the spec allows the double rounded version I added.