binaryen icon indicating copy to clipboard operation
binaryen copied to clipboard

[FP16] Implement madd and nmadd.

Open brendandahl opened this issue 5 months ago • 1 comments

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.

brendandahl avatar Aug 27 '24 23:08 brendandahl