summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorBrendan Dahl <brendan.dahl@gmail.com>2024-09-03 12:08:50 -0700
committerGitHub <noreply@github.com>2024-09-03 12:08:50 -0700
commitdb9ee9434bd74ac8f1637ec109dc52e4b09794a7 (patch)
tree3a6067d3467a74730ee92914444169f6ae48e29c /src/wasm.h
parentb7cdb8c2110dff5a9b096d766dac04cd8ec04cc9 (diff)
downloadbinaryen-db9ee9434bd74ac8f1637ec109dc52e4b09794a7.tar.gz
binaryen-db9ee9434bd74ac8f1637ec109dc52e4b09794a7.tar.bz2
binaryen-db9ee9434bd74ac8f1637ec109dc52e4b09794a7.zip
[FP16] Implement madd and nmadd. (#6878)
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.
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 86ee12972..a7ad6ec6c 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -574,6 +574,8 @@ enum SIMDTernaryOp {
Bitselect,
// Relaxed SIMD
+ RelaxedMaddVecF16x8,
+ RelaxedNmaddVecF16x8,
RelaxedMaddVecF32x4,
RelaxedNmaddVecF32x4,
RelaxedMaddVecF64x2,