From 6c2d0e20906248ab8f8365702b35fd67db29c44f Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Tue, 27 Aug 2024 11:14:54 -0700 Subject: [FP16] Implement unary operations. (#6867) Specified at https://github.com/WebAssembly/half-precision/blob/main/proposals/half-precision/Overview.md --- scripts/gen-s-parser.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scripts') diff --git a/scripts/gen-s-parser.py b/scripts/gen-s-parser.py index 39d621f48..49fa6afb6 100755 --- a/scripts/gen-s-parser.py +++ b/scripts/gen-s-parser.py @@ -452,6 +452,9 @@ instructions = [ ("i64x2.extmul_high_i32x4_s", "makeBinary(BinaryOp::ExtMulHighSVecI64x2)"), ("i64x2.extmul_low_i32x4_u", "makeBinary(BinaryOp::ExtMulLowUVecI64x2)"), ("i64x2.extmul_high_i32x4_u", "makeBinary(BinaryOp::ExtMulHighUVecI64x2)"), + ("f16x8.abs", "makeUnary(UnaryOp::AbsVecF16x8)"), + ("f16x8.neg", "makeUnary(UnaryOp::NegVecF16x8)"), + ("f16x8.sqrt", "makeUnary(UnaryOp::SqrtVecF16x8)"), ("f16x8.add", "makeBinary(BinaryOp::AddVecF16x8)"), ("f16x8.sub", "makeBinary(BinaryOp::SubVecF16x8)"), ("f16x8.mul", "makeBinary(BinaryOp::MulVecF16x8)"), @@ -460,6 +463,10 @@ instructions = [ ("f16x8.max", "makeBinary(BinaryOp::MaxVecF16x8)"), ("f16x8.pmin", "makeBinary(BinaryOp::PMinVecF16x8)"), ("f16x8.pmax", "makeBinary(BinaryOp::PMaxVecF16x8)"), + ("f16x8.ceil", "makeUnary(UnaryOp::CeilVecF16x8)"), + ("f16x8.floor", "makeUnary(UnaryOp::FloorVecF16x8)"), + ("f16x8.trunc", "makeUnary(UnaryOp::TruncVecF16x8)"), + ("f16x8.nearest", "makeUnary(UnaryOp::NearestVecF16x8)"), ("f32x4.abs", "makeUnary(UnaryOp::AbsVecF32x4)"), ("f32x4.neg", "makeUnary(UnaryOp::NegVecF32x4)"), ("f32x4.sqrt", "makeUnary(UnaryOp::SqrtVecF32x4)"), -- cgit v1.2.3