diff options
author | Thomas Lively <tlively@google.com> | 2024-04-24 11:06:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-24 11:06:17 -0700 |
commit | ff02ea0bbe7e3288a2463bb449eb74a2753dda10 (patch) | |
tree | 55d042efc35cc8be79a22c0e54f27cb2e7c9b6b9 /test/spec/float_exprs.wast | |
parent | 22e80de9a32c19d294080242559fb3c2a84a42b5 (diff) | |
download | binaryen-ff02ea0bbe7e3288a2463bb449eb74a2753dda10.tar.gz binaryen-ff02ea0bbe7e3288a2463bb449eb74a2753dda10.tar.bz2 binaryen-ff02ea0bbe7e3288a2463bb449eb74a2753dda10.zip |
[wasm-shell] Error on unknown commands (#6528)
We previously ignored unknown wast commands, which could lead to the mistaken
impression that we were passing test cases that we were in fact not running at
all. Clarify matters by having wasm-shell error out on unrecognized commands,
and comment out all such commands in our versions of the spec test. As we work
toward being able to run the upstream spec tests, having these unsupported
commands explicitly commented out will make it easier to track progress toward
full support.
Diffstat (limited to 'test/spec/float_exprs.wast')
-rw-r--r-- | test/spec/float_exprs.wast | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/test/spec/float_exprs.wast b/test/spec/float_exprs.wast index e6583634f..18dbf8344 100644 --- a/test/spec/float_exprs.wast +++ b/test/spec/float_exprs.wast @@ -46,8 +46,8 @@ (assert_return (invoke "f32.no_fold_add_zero" (f32.const -0.0)) (f32.const 0.0)) (assert_return (invoke "f64.no_fold_add_zero" (f64.const -0.0)) (f64.const 0.0)) -(assert_return_arithmetic_nan (invoke "f32.no_fold_add_zero" (f32.const nan:0x200000))) -(assert_return_arithmetic_nan (invoke "f64.no_fold_add_zero" (f64.const nan:0x4000000000000))) +;; (assert_return_arithmetic_nan (invoke "f32.no_fold_add_zero" (f32.const nan:0x200000))) +;; (assert_return_arithmetic_nan (invoke "f64.no_fold_add_zero" (f64.const nan:0x4000000000000))) ;; Test that 0.0 - x is not folded to -x. @@ -60,8 +60,8 @@ (assert_return (invoke "f32.no_fold_zero_sub" (f32.const 0.0)) (f32.const 0.0)) (assert_return (invoke "f64.no_fold_zero_sub" (f64.const 0.0)) (f64.const 0.0)) -(assert_return_arithmetic_nan (invoke "f32.no_fold_zero_sub" (f32.const nan:0x200000))) -(assert_return_arithmetic_nan (invoke "f64.no_fold_zero_sub" (f64.const nan:0x4000000000000))) +;; (assert_return_arithmetic_nan (invoke "f32.no_fold_zero_sub" (f32.const nan:0x200000))) +;; (assert_return_arithmetic_nan (invoke "f64.no_fold_zero_sub" (f64.const nan:0x4000000000000))) ;; Test that x - 0.0 is not folded to x. @@ -72,8 +72,8 @@ (f64.sub (local.get $x) (f64.const 0.0))) ) -(assert_return_arithmetic_nan (invoke "f32.no_fold_sub_zero" (f32.const nan:0x200000))) -(assert_return_arithmetic_nan (invoke "f64.no_fold_sub_zero" (f64.const nan:0x4000000000000))) +;; (assert_return_arithmetic_nan (invoke "f32.no_fold_sub_zero" (f32.const nan:0x200000))) +;; (assert_return_arithmetic_nan (invoke "f64.no_fold_sub_zero" (f64.const nan:0x4000000000000))) ;; Test that x*0.0 is not folded to 0.0. @@ -87,11 +87,11 @@ (assert_return (invoke "f32.no_fold_mul_zero" (f32.const -0.0)) (f32.const -0.0)) (assert_return (invoke "f32.no_fold_mul_zero" (f32.const -1.0)) (f32.const -0.0)) (assert_return (invoke "f32.no_fold_mul_zero" (f32.const -2.0)) (f32.const -0.0)) -(assert_return_arithmetic_nan (invoke "f32.no_fold_mul_zero" (f32.const nan:0x200000))) +;; (assert_return_arithmetic_nan (invoke "f32.no_fold_mul_zero" (f32.const nan:0x200000))) (assert_return (invoke "f64.no_fold_mul_zero" (f64.const -0.0)) (f64.const -0.0)) (assert_return (invoke "f64.no_fold_mul_zero" (f64.const -1.0)) (f64.const -0.0)) (assert_return (invoke "f64.no_fold_mul_zero" (f64.const -2.0)) (f64.const -0.0)) -(assert_return_arithmetic_nan (invoke "f64.no_fold_mul_zero" (f64.const nan:0x4000000000000))) +;; (assert_return_arithmetic_nan (invoke "f64.no_fold_mul_zero" (f64.const nan:0x4000000000000))) ;; Test that x*1.0 is not folded to x. ;; See IEEE 754-2008 10.4 "Literal meaning and value-changing optimizations". @@ -103,8 +103,8 @@ (f64.mul (local.get $x) (f64.const 1.0))) ) -(assert_return_arithmetic_nan (invoke "f32.no_fold_mul_one" (f32.const nan:0x200000))) -(assert_return_arithmetic_nan (invoke "f64.no_fold_mul_one" (f64.const nan:0x4000000000000))) +;; (assert_return_arithmetic_nan (invoke "f32.no_fold_mul_one" (f32.const nan:0x200000))) +;; (assert_return_arithmetic_nan (invoke "f64.no_fold_mul_one" (f64.const nan:0x4000000000000))) ;; Test that 0.0/x is not folded to 0.0. @@ -115,14 +115,14 @@ (f64.div (f64.const 0.0) (local.get $x))) ) -(assert_return_canonical_nan (invoke "f32.no_fold_zero_div" (f32.const 0.0))) -(assert_return_canonical_nan (invoke "f32.no_fold_zero_div" (f32.const -0.0))) -(assert_return_canonical_nan (invoke "f32.no_fold_zero_div" (f32.const nan))) -(assert_return_arithmetic_nan (invoke "f32.no_fold_zero_div" (f32.const nan:0x200000))) -(assert_return_canonical_nan (invoke "f64.no_fold_zero_div" (f64.const 0.0))) -(assert_return_canonical_nan (invoke "f64.no_fold_zero_div" (f64.const -0.0))) -(assert_return_canonical_nan (invoke "f64.no_fold_zero_div" (f64.const nan))) -(assert_return_arithmetic_nan (invoke "f64.no_fold_zero_div" (f64.const nan:0x4000000000000))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_zero_div" (f32.const 0.0))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_zero_div" (f32.const -0.0))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_zero_div" (f32.const nan))) +;; (assert_return_arithmetic_nan (invoke "f32.no_fold_zero_div" (f32.const nan:0x200000))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_zero_div" (f64.const 0.0))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_zero_div" (f64.const -0.0))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_zero_div" (f64.const nan))) +;; (assert_return_arithmetic_nan (invoke "f64.no_fold_zero_div" (f64.const nan:0x4000000000000))) ;; Test that x/1.0 is not folded to x. @@ -133,8 +133,8 @@ (f64.div (local.get $x) (f64.const 1.0))) ) -(assert_return_arithmetic_nan (invoke "f32.no_fold_div_one" (f32.const nan:0x200000))) -(assert_return_arithmetic_nan (invoke "f64.no_fold_div_one" (f64.const nan:0x4000000000000))) +;; (assert_return_arithmetic_nan (invoke "f32.no_fold_div_one" (f32.const nan:0x200000))) +;; (assert_return_arithmetic_nan (invoke "f64.no_fold_div_one" (f64.const nan:0x4000000000000))) ;; Test that x/-1.0 is not folded to -x. @@ -145,8 +145,8 @@ (f64.div (local.get $x) (f64.const -1.0))) ) -(assert_return_arithmetic_nan (invoke "f32.no_fold_div_neg1" (f32.const nan:0x200000))) -(assert_return_arithmetic_nan (invoke "f64.no_fold_div_neg1" (f64.const nan:0x4000000000000))) +;; (assert_return_arithmetic_nan (invoke "f32.no_fold_div_neg1" (f32.const nan:0x200000))) +;; (assert_return_arithmetic_nan (invoke "f64.no_fold_div_neg1" (f64.const nan:0x4000000000000))) ;; Test that -0.0 - x is not folded to -x. @@ -157,8 +157,8 @@ (f64.sub (f64.const -0.0) (local.get $x))) ) -(assert_return_arithmetic_nan (invoke "f32.no_fold_neg0_sub" (f32.const nan:0x200000))) -(assert_return_arithmetic_nan (invoke "f64.no_fold_neg0_sub" (f64.const nan:0x4000000000000))) +;; (assert_return_arithmetic_nan (invoke "f32.no_fold_neg0_sub" (f32.const nan:0x200000))) +;; (assert_return_arithmetic_nan (invoke "f64.no_fold_neg0_sub" (f64.const nan:0x4000000000000))) ;; Test that -1.0 * x is not folded to -x. @@ -169,8 +169,8 @@ (f64.mul (f64.const -1.0) (local.get $x))) ) -(assert_return_arithmetic_nan (invoke "f32.no_fold_neg1_mul" (f32.const nan:0x200000))) -(assert_return_arithmetic_nan (invoke "f64.no_fold_neg1_mul" (f64.const nan:0x4000000000000))) +;; (assert_return_arithmetic_nan (invoke "f32.no_fold_neg1_mul" (f32.const nan:0x200000))) +;; (assert_return_arithmetic_nan (invoke "f64.no_fold_neg1_mul" (f64.const nan:0x4000000000000))) ;; Test that x == x is not folded to true. @@ -205,10 +205,10 @@ (f64.sub (local.get $x) (local.get $x))) ) -(assert_return_canonical_nan (invoke "f32.no_fold_sub_self" (f32.const inf))) -(assert_return_canonical_nan (invoke "f32.no_fold_sub_self" (f32.const nan))) -(assert_return_canonical_nan (invoke "f64.no_fold_sub_self" (f64.const inf))) -(assert_return_canonical_nan (invoke "f64.no_fold_sub_self" (f64.const nan))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_sub_self" (f32.const inf))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_sub_self" (f32.const nan))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_sub_self" (f64.const inf))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_sub_self" (f64.const nan))) ;; Test that x / x is not folded to 1.0. @@ -219,14 +219,14 @@ (f64.div (local.get $x) (local.get $x))) ) -(assert_return_canonical_nan (invoke "f32.no_fold_div_self" (f32.const inf))) -(assert_return_canonical_nan (invoke "f32.no_fold_div_self" (f32.const nan))) -(assert_return_canonical_nan (invoke "f32.no_fold_div_self" (f32.const 0.0))) -(assert_return_canonical_nan (invoke "f32.no_fold_div_self" (f32.const -0.0))) -(assert_return_canonical_nan (invoke "f64.no_fold_div_self" (f64.const inf))) -(assert_return_canonical_nan (invoke "f64.no_fold_div_self" (f64.const nan))) -(assert_return_canonical_nan (invoke "f64.no_fold_div_self" (f64.const 0.0))) -(assert_return_canonical_nan (invoke "f64.no_fold_div_self" (f64.const -0.0))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_div_self" (f32.const inf))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_div_self" (f32.const nan))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_div_self" (f32.const 0.0))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_div_self" (f32.const -0.0))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_div_self" (f64.const inf))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_div_self" (f64.const nan))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_div_self" (f64.const 0.0))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_div_self" (f64.const -0.0))) ;; Test that x/3 is not folded to x*(1/3). @@ -381,18 +381,18 @@ (assert_return (invoke "f32.no_fold_div_0" (f32.const -1.0)) (f32.const -inf)) (assert_return (invoke "f32.no_fold_div_0" (f32.const inf)) (f32.const inf)) (assert_return (invoke "f32.no_fold_div_0" (f32.const -inf)) (f32.const -inf)) -(assert_return_canonical_nan (invoke "f32.no_fold_div_0" (f32.const 0))) -(assert_return_canonical_nan (invoke "f32.no_fold_div_0" (f32.const -0))) -(assert_return_arithmetic_nan (invoke "f32.no_fold_div_0" (f32.const nan:0x200000))) -(assert_return_canonical_nan (invoke "f32.no_fold_div_0" (f32.const nan))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_div_0" (f32.const 0))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_div_0" (f32.const -0))) +;; (assert_return_arithmetic_nan (invoke "f32.no_fold_div_0" (f32.const nan:0x200000))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_div_0" (f32.const nan))) (assert_return (invoke "f64.no_fold_div_0" (f64.const 1.0)) (f64.const inf)) (assert_return (invoke "f64.no_fold_div_0" (f64.const -1.0)) (f64.const -inf)) (assert_return (invoke "f64.no_fold_div_0" (f64.const inf)) (f64.const inf)) (assert_return (invoke "f64.no_fold_div_0" (f64.const -inf)) (f64.const -inf)) -(assert_return_canonical_nan (invoke "f64.no_fold_div_0" (f64.const 0))) -(assert_return_canonical_nan (invoke "f64.no_fold_div_0" (f64.const -0))) -(assert_return_canonical_nan (invoke "f64.no_fold_div_0" (f64.const nan))) -(assert_return_arithmetic_nan (invoke "f64.no_fold_div_0" (f64.const nan:0x4000000000000))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_div_0" (f64.const 0))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_div_0" (f64.const -0))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_div_0" (f64.const nan))) +;; (assert_return_arithmetic_nan (invoke "f64.no_fold_div_0" (f64.const nan:0x4000000000000))) ;; Test that x/-0 is not folded away. @@ -407,18 +407,18 @@ (assert_return (invoke "f32.no_fold_div_neg0" (f32.const -1.0)) (f32.const inf)) (assert_return (invoke "f32.no_fold_div_neg0" (f32.const inf)) (f32.const -inf)) (assert_return (invoke "f32.no_fold_div_neg0" (f32.const -inf)) (f32.const inf)) -(assert_return_canonical_nan (invoke "f32.no_fold_div_neg0" (f32.const 0))) -(assert_return_canonical_nan (invoke "f32.no_fold_div_neg0" (f32.const -0))) -(assert_return_arithmetic_nan (invoke "f32.no_fold_div_neg0" (f32.const nan:0x200000))) -(assert_return_canonical_nan (invoke "f32.no_fold_div_neg0" (f32.const nan))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_div_neg0" (f32.const 0))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_div_neg0" (f32.const -0))) +;; (assert_return_arithmetic_nan (invoke "f32.no_fold_div_neg0" (f32.const nan:0x200000))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_div_neg0" (f32.const nan))) (assert_return (invoke "f64.no_fold_div_neg0" (f64.const 1.0)) (f64.const -inf)) (assert_return (invoke "f64.no_fold_div_neg0" (f64.const -1.0)) (f64.const inf)) (assert_return (invoke "f64.no_fold_div_neg0" (f64.const inf)) (f64.const -inf)) (assert_return (invoke "f64.no_fold_div_neg0" (f64.const -inf)) (f64.const inf)) -(assert_return_canonical_nan (invoke "f64.no_fold_div_neg0" (f64.const 0))) -(assert_return_canonical_nan (invoke "f64.no_fold_div_neg0" (f64.const -0))) -(assert_return_canonical_nan (invoke "f64.no_fold_div_neg0" (f64.const nan))) -(assert_return_arithmetic_nan (invoke "f64.no_fold_div_neg0" (f64.const nan:0x4000000000000))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_div_neg0" (f64.const 0))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_div_neg0" (f64.const -0))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_div_neg0" (f64.const nan))) +;; (assert_return_arithmetic_nan (invoke "f64.no_fold_div_neg0" (f64.const nan:0x4000000000000))) ;; Test that sqrt(x*x+y*y) is not folded to hypot. @@ -635,7 +635,7 @@ (f32.demote_f64 (f64.promote_f32 (local.get $x)))) ) -(assert_return_arithmetic_nan (invoke "no_fold_promote_demote" (f32.const nan:0x200000))) +;; (assert_return_arithmetic_nan (invoke "no_fold_promote_demote" (f32.const nan:0x200000))) (assert_return (invoke "no_fold_promote_demote" (f32.const 0x0p+0)) (f32.const 0x0p+0)) (assert_return (invoke "no_fold_promote_demote" (f32.const -0x0p+0)) (f32.const -0x0p+0)) (assert_return (invoke "no_fold_promote_demote" (f32.const 0x1p-149)) (f32.const 0x1p-149)) @@ -1653,13 +1653,13 @@ (assert_return (invoke "f32.no_fold_add_neg" (f32.const 0.0)) (f32.const 0.0)) (assert_return (invoke "f32.no_fold_add_neg" (f32.const -0.0)) (f32.const 0.0)) -(assert_return_canonical_nan (invoke "f32.no_fold_add_neg" (f32.const inf))) -(assert_return_canonical_nan (invoke "f32.no_fold_add_neg" (f32.const -inf))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_add_neg" (f32.const inf))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_add_neg" (f32.const -inf))) (assert_return (invoke "f64.no_fold_add_neg" (f64.const 0.0)) (f64.const 0.0)) (assert_return (invoke "f64.no_fold_add_neg" (f64.const -0.0)) (f64.const 0.0)) -(assert_return_canonical_nan (invoke "f64.no_fold_add_neg" (f64.const inf))) -(assert_return_canonical_nan (invoke "f64.no_fold_add_neg" (f64.const -inf))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_add_neg" (f64.const inf))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_add_neg" (f64.const -inf))) ;; Test that x+x+x+x+x+x is not folded to x * 6. @@ -1790,13 +1790,13 @@ (f64.mul (f64.sqrt (local.get $x)) (f64.sqrt (local.get $y)))) ) -(assert_return_canonical_nan (invoke "f32.no_fold_mul_sqrts" (f32.const 0x1.dddda8p-125) (f32.const -0x1.25d22ap-83))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_mul_sqrts" (f32.const 0x1.dddda8p-125) (f32.const -0x1.25d22ap-83))) (assert_return (invoke "f32.no_fold_mul_sqrts" (f32.const 0x1.418d14p-92) (f32.const 0x1.c6535cp-32)) (f32.const 0x1.7e373ap-62)) (assert_return (invoke "f32.no_fold_mul_sqrts" (f32.const 0x1.4de7ep-88) (f32.const 0x1.84ff18p+6)) (f32.const 0x1.686668p-41)) (assert_return (invoke "f32.no_fold_mul_sqrts" (f32.const 0x1.78091ep+101) (f32.const 0x1.81feb8p-9)) (f32.const 0x1.7cfb98p+46)) (assert_return (invoke "f32.no_fold_mul_sqrts" (f32.const 0x1.583ap-56) (f32.const 0x1.14ba2ap-9)) (f32.const 0x1.b47a8ep-33)) -(assert_return_canonical_nan (invoke "f64.no_fold_mul_sqrts" (f64.const -0x1.d1144cc28cdbep-635) (f64.const -0x1.bf9bc373d3b6ap-8))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_mul_sqrts" (f64.const -0x1.d1144cc28cdbep-635) (f64.const -0x1.bf9bc373d3b6ap-8))) (assert_return (invoke "f64.no_fold_mul_sqrts" (f64.const 0x1.5a7eb976bebc9p-643) (f64.const 0x1.f30cb8865a4cap-404)) (f64.const 0x1.260a1032d6e76p-523)) (assert_return (invoke "f64.no_fold_mul_sqrts" (f64.const 0x1.711a0c1707935p-89) (f64.const 0x1.6fb5de51a20d3p-913)) (f64.const 0x1.7067ca28e31ecp-501)) (assert_return (invoke "f64.no_fold_mul_sqrts" (f64.const 0x1.fb0bbea33b076p-363) (f64.const 0x1.d963b34894158p-573)) (f64.const 0x1.e9edc1fa624afp-468)) @@ -1812,13 +1812,13 @@ (f64.div (f64.sqrt (local.get $x)) (f64.sqrt (local.get $y)))) ) -(assert_return_canonical_nan (invoke "f32.no_fold_div_sqrts" (f32.const -0x1.bea9bap+25) (f32.const -0x1.db776ep-58))) +;; (assert_return_canonical_nan (invoke "f32.no_fold_div_sqrts" (f32.const -0x1.bea9bap+25) (f32.const -0x1.db776ep-58))) (assert_return (invoke "f32.no_fold_div_sqrts" (f32.const 0x1.b983b6p+32) (f32.const 0x1.901f1ep+27)) (f32.const 0x1.7c4df6p+2)) (assert_return (invoke "f32.no_fold_div_sqrts" (f32.const 0x1.d45e72p-120) (f32.const 0x1.ab49ccp+15)) (f32.const 0x1.7b0b04p-68)) (assert_return (invoke "f32.no_fold_div_sqrts" (f32.const 0x1.b2e444p+59) (f32.const 0x1.5b8b16p-30)) (f32.const 0x1.94fca8p+44)) (assert_return (invoke "f32.no_fold_div_sqrts" (f32.const 0x1.835aa6p-112) (f32.const 0x1.d17128p-103)) (f32.const 0x1.4a468p-5)) -(assert_return_canonical_nan (invoke "f64.no_fold_div_sqrts" (f64.const -0x1.509fc16411167p-711) (f64.const -0x1.9c4255f5d6517p-187))) +;; (assert_return_canonical_nan (invoke "f64.no_fold_div_sqrts" (f64.const -0x1.509fc16411167p-711) (f64.const -0x1.9c4255f5d6517p-187))) (assert_return (invoke "f64.no_fold_div_sqrts" (f64.const 0x1.b6897bddac76p-587) (f64.const 0x1.104578b4c91f3p+541)) (f64.const 0x1.44e4f21f26cc9p-564)) (assert_return (invoke "f64.no_fold_div_sqrts" (f64.const 0x1.ac83451b08989p+523) (f64.const 0x1.8da575c6d12b8p-109)) (f64.const 0x1.09c003991ce17p+316)) (assert_return (invoke "f64.no_fold_div_sqrts" (f64.const 0x1.bab7836456417p-810) (f64.const 0x1.1ff60d03ba607p+291)) (f64.const 0x1.c0e6c833bf657p-551)) |