summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/binaryen.js/kitchen-sink.js.txt2
-rw-r--r--test/example/c-api-kitchen-sink.txt2
-rw-r--r--test/lit/help/wasm-as.test4
-rw-r--r--test/lit/help/wasm-ctor-eval.test4
-rw-r--r--test/lit/help/wasm-dis.test4
-rw-r--r--test/lit/help/wasm-emscripten-finalize.test4
-rw-r--r--test/lit/help/wasm-merge.test4
-rw-r--r--test/lit/help/wasm-metadce.test4
-rw-r--r--test/lit/help/wasm-opt.test4
-rw-r--r--test/lit/help/wasm-reduce.test4
-rw-r--r--test/lit/help/wasm-split.test4
-rw-r--r--test/lit/help/wasm2js.test4
-rw-r--r--test/lit/validation/fp16.wast11
-rw-r--r--test/passes/strip-target-features_roundtrip_print-features_all-features.txt1
-rw-r--r--test/unit/test_features.py1
15 files changed, 55 insertions, 2 deletions
diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt
index 212194c9c..d41301751 100644
--- a/test/binaryen.js/kitchen-sink.js.txt
+++ b/test/binaryen.js/kitchen-sink.js.txt
@@ -33,7 +33,7 @@ Features.RelaxedSIMD: 4096
Features.ExtendedConst: 8192
Features.Strings: 16384
Features.MultiMemory: 32768
-Features.All: 262143
+Features.All: 524287
InvalidId: 0
BlockId: 1
IfId: 2
diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt
index e568cfba0..17344ccab 100644
--- a/test/example/c-api-kitchen-sink.txt
+++ b/test/example/c-api-kitchen-sink.txt
@@ -47,7 +47,7 @@ BinaryenFeatureMemory64: 2048
BinaryenFeatureRelaxedSIMD: 4096
BinaryenFeatureExtendedConst: 8192
BinaryenFeatureStrings: 16384
-BinaryenFeatureAll: 262143
+BinaryenFeatureAll: 524287
(f32.neg
(f32.const -33.61199951171875)
)
diff --git a/test/lit/help/wasm-as.test b/test/lit/help/wasm-as.test
index 3a863dbd6..a2ee3d45e 100644
--- a/test/lit/help/wasm-as.test
+++ b/test/lit/help/wasm-as.test
@@ -112,6 +112,10 @@
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-shared-everything Disable shared-everything threads
;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-fp16 Enable float 16 operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-fp16 Disable float 16 operations
+;; CHECK-NEXT:
;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag
diff --git a/test/lit/help/wasm-ctor-eval.test b/test/lit/help/wasm-ctor-eval.test
index 2d57e3e8c..4ad75a8d0 100644
--- a/test/lit/help/wasm-ctor-eval.test
+++ b/test/lit/help/wasm-ctor-eval.test
@@ -119,6 +119,10 @@
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-shared-everything Disable shared-everything threads
;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-fp16 Enable float 16 operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-fp16 Disable float 16 operations
+;; CHECK-NEXT:
;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag
diff --git a/test/lit/help/wasm-dis.test b/test/lit/help/wasm-dis.test
index 63c7f8bd0..96e999c2c 100644
--- a/test/lit/help/wasm-dis.test
+++ b/test/lit/help/wasm-dis.test
@@ -105,6 +105,10 @@
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-shared-everything Disable shared-everything threads
;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-fp16 Enable float 16 operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-fp16 Disable float 16 operations
+;; CHECK-NEXT:
;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag
diff --git a/test/lit/help/wasm-emscripten-finalize.test b/test/lit/help/wasm-emscripten-finalize.test
index c92960dfb..fbf86209c 100644
--- a/test/lit/help/wasm-emscripten-finalize.test
+++ b/test/lit/help/wasm-emscripten-finalize.test
@@ -147,6 +147,10 @@
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-shared-everything Disable shared-everything threads
;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-fp16 Enable float 16 operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-fp16 Disable float 16 operations
+;; CHECK-NEXT:
;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag
diff --git a/test/lit/help/wasm-merge.test b/test/lit/help/wasm-merge.test
index fe3f1cdb2..108fd3673 100644
--- a/test/lit/help/wasm-merge.test
+++ b/test/lit/help/wasm-merge.test
@@ -135,6 +135,10 @@
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-shared-everything Disable shared-everything threads
;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-fp16 Enable float 16 operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-fp16 Disable float 16 operations
+;; CHECK-NEXT:
;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag
diff --git a/test/lit/help/wasm-metadce.test b/test/lit/help/wasm-metadce.test
index e25a0214d..665d78746 100644
--- a/test/lit/help/wasm-metadce.test
+++ b/test/lit/help/wasm-metadce.test
@@ -734,6 +734,10 @@
;; CHECK-NEXT: --disable-shared-everything Disable shared-everything
;; CHECK-NEXT: threads
;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-fp16 Enable float 16 operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-fp16 Disable float 16 operations
+;; CHECK-NEXT:
;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag
diff --git a/test/lit/help/wasm-opt.test b/test/lit/help/wasm-opt.test
index 3a577099b..4eea3c431 100644
--- a/test/lit/help/wasm-opt.test
+++ b/test/lit/help/wasm-opt.test
@@ -743,6 +743,10 @@
;; CHECK-NEXT: --disable-shared-everything Disable shared-everything
;; CHECK-NEXT: threads
;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-fp16 Enable float 16 operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-fp16 Disable float 16 operations
+;; CHECK-NEXT:
;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag
diff --git a/test/lit/help/wasm-reduce.test b/test/lit/help/wasm-reduce.test
index cacf260fa..61e171ba9 100644
--- a/test/lit/help/wasm-reduce.test
+++ b/test/lit/help/wasm-reduce.test
@@ -141,6 +141,10 @@
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-shared-everything Disable shared-everything threads
;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-fp16 Enable float 16 operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-fp16 Disable float 16 operations
+;; CHECK-NEXT:
;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag
diff --git a/test/lit/help/wasm-split.test b/test/lit/help/wasm-split.test
index bc09796d7..a6074c85d 100644
--- a/test/lit/help/wasm-split.test
+++ b/test/lit/help/wasm-split.test
@@ -222,6 +222,10 @@
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-shared-everything Disable shared-everything threads
;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-fp16 Enable float 16 operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-fp16 Disable float 16 operations
+;; CHECK-NEXT:
;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag
diff --git a/test/lit/help/wasm2js.test b/test/lit/help/wasm2js.test
index 3c0a17e7a..501d1d3f1 100644
--- a/test/lit/help/wasm2js.test
+++ b/test/lit/help/wasm2js.test
@@ -697,6 +697,10 @@
;; CHECK-NEXT: --disable-shared-everything Disable shared-everything
;; CHECK-NEXT: threads
;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-fp16 Enable float 16 operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-fp16 Disable float 16 operations
+;; CHECK-NEXT:
;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag
diff --git a/test/lit/validation/fp16.wast b/test/lit/validation/fp16.wast
new file mode 100644
index 000000000..b1c8ce9c2
--- /dev/null
+++ b/test/lit/validation/fp16.wast
@@ -0,0 +1,11 @@
+;; Test that fp16 operations require the fp16 feature.
+
+;; RUN: not wasm-opt %s --enable-simd 2>&1 | filecheck %s --check-prefix NO-FP16
+;; RUN: wasm-opt %s --enable-simd --enable-fp16 -o - -S | filecheck %s --check-prefix FP16
+
+;; NO-FP16: FP16 operations require FP16 [--enable-fp16]
+;; FP16: (type $0 (func (param v128 v128) (result v128)))
+
+(module
+ (func (export "f16x8.add") (param $0 v128) (param $1 v128) (result v128) (f16x8.add (local.get $0) (local.get $1)))
+)
diff --git a/test/passes/strip-target-features_roundtrip_print-features_all-features.txt b/test/passes/strip-target-features_roundtrip_print-features_all-features.txt
index 2c6523e6d..901f43bc5 100644
--- a/test/passes/strip-target-features_roundtrip_print-features_all-features.txt
+++ b/test/passes/strip-target-features_roundtrip_print-features_all-features.txt
@@ -16,6 +16,7 @@
--enable-multimemory
--enable-typed-continuations
--enable-shared-everything
+--enable-fp16
(module
(type $0 (func (result v128 externref)))
(func $foo (type $0) (result v128 externref)
diff --git a/test/unit/test_features.py b/test/unit/test_features.py
index 3bd9ac127..f5c3fabc5 100644
--- a/test/unit/test_features.py
+++ b/test/unit/test_features.py
@@ -426,4 +426,5 @@ class TargetFeaturesSectionTest(utils.BinaryenTestCase):
'--enable-multimemory',
'--enable-typed-continuations',
'--enable-shared-everything',
+ '--enable-fp16',
], p2.stdout.splitlines())