summaryrefslogtreecommitdiff
path: root/test/unit.wast.fromBinary
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2023-12-13 10:53:50 -0800
committerGitHub <noreply@github.com>2023-12-13 10:53:50 -0800
commit0024c8bdd28f701d57e49e65d38b28aad0594299 (patch)
tree19b9eb323836843d147dedf40495042edcf9404f /test/unit.wast.fromBinary
parent9e636855b582d1499a87fb73f55d85102ce95a58 (diff)
downloadbinaryen-0024c8bdd28f701d57e49e65d38b28aad0594299.tar.gz
binaryen-0024c8bdd28f701d57e49e65d38b28aad0594299.tar.bz2
binaryen-0024c8bdd28f701d57e49e65d38b28aad0594299.zip
[test] Port tests in test/ to test/lit/basic/ (#6160)
This ports all tests from `test/` to `test/lit/basic/`. The set of commands and `CHECK` lines used are the same as the ones in #6159. Now we use `lit` to test these, this also deletes all `.wast`, `.wast.from-wast`, `.wast.fromBinary`, and `.wast.fromBinary.noDebugInfo` files from `test/` and all related test routines from the python scripts. All `CHECK` lines are generated by `update_lit_checks.py --all-items`. This also deletes these three multi-memory tests in `test/lit/`, because they seem to contain the same code with the ones in `test/`, which have been ported to `test/lit/basic/` along with other tests. - `test/lit/multi-memories-atomics64.wast` - `test/lit/multi-memories-basics.wast` - `test/lit/multi-memories-simd.wast` This also adds newlines between `(func`s in case there are none to make `CHECK` lines easy to view, and removes some extra existing newlines here and there.
Diffstat (limited to 'test/unit.wast.fromBinary')
-rw-r--r--test/unit.wast.fromBinary537
1 files changed, 0 insertions, 537 deletions
diff --git a/test/unit.wast.fromBinary b/test/unit.wast.fromBinary
deleted file mode 100644
index 9564e9eca..000000000
--- a/test/unit.wast.fromBinary
+++ /dev/null
@@ -1,537 +0,0 @@
-(module
- (type $none_=>_i32 (func (result i32)))
- (type $none_=>_none (func))
- (type $f32_=>_none (func (param f32)))
- (type $none_=>_f64 (func (result f64)))
- (type $f64_f64_=>_f64 (func (param f64 f64) (result f64)))
- (type $i32_i64_=>_none (func (param i32 i64)))
- (type $i32_=>_i32 (func (param i32) (result i32)))
- (type $f64_=>_i32 (func (param f64) (result i32)))
- (type $none_=>_i64 (func (result i64)))
- (type $f64_=>_f64 (func (param f64) (result f64)))
- (import "env" "_emscripten_asm_const_vi" (func $_emscripten_asm_const_vi))
- (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32)))
- (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64)))
- (memory $0 4096 4096)
- (data (i32.const 1026) "\14\00")
- (table $0 10 funcref)
- (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg)
- (export "big_negative" (func $big_negative))
- (func $big_negative (; 3 ;)
- (local $0 f64)
- (local.set $0
- (f64.const -2147483648)
- )
- (local.set $0
- (f64.const -2147483648)
- )
- (local.set $0
- (f64.const -21474836480)
- )
- (local.set $0
- (f64.const 0.039625)
- )
- (local.set $0
- (f64.const -0.039625)
- )
- )
- (func $importedDoubles (; 4 ;) (result f64)
- (local $0 f64)
- (block $label$1 (result f64)
- (local.set $0
- (f64.add
- (f64.add
- (f64.add
- (f64.load
- (i32.const 8)
- )
- (f64.load
- (i32.const 16)
- )
- )
- (f64.neg
- (f64.load
- (i32.const 16)
- )
- )
- )
- (f64.neg
- (f64.load
- (i32.const 8)
- )
- )
- )
- )
- (if
- (i32.gt_s
- (i32.load
- (i32.const 24)
- )
- (i32.const 0)
- )
- (br $label$1
- (f64.const -3.4)
- )
- )
- (if
- (f64.gt
- (f64.load
- (i32.const 32)
- )
- (f64.const 0)
- )
- (br $label$1
- (f64.const 5.6)
- )
- )
- (f64.const 1.2)
- )
- )
- (func $doubleCompares (; 5 ;) (param $0 f64) (param $1 f64) (result f64)
- (local $2 i32)
- (local $3 f64)
- (local $4 f64)
- (block $label$1 (result f64)
- (if
- (f64.gt
- (local.get $0)
- (f64.const 0)
- )
- (br $label$1
- (f64.const 1.2)
- )
- )
- (if
- (f64.gt
- (local.get $4)
- (f64.const 0)
- )
- (br $label$1
- (f64.const -3.4)
- )
- )
- (if
- (i32.gt_s
- (local.get $2)
- (i32.const 0)
- )
- (br $label$1
- (f64.const 5.6)
- )
- )
- (if
- (f64.lt
- (local.get $0)
- (local.get $1)
- )
- (br $label$1
- (local.get $0)
- )
- )
- (local.get $1)
- )
- )
- (func $intOps (; 6 ;) (result i32)
- (local $0 i32)
- (i32.eq
- (local.get $0)
- (i32.const 0)
- )
- )
- (func $hexLiterals (; 7 ;)
- (drop
- (i32.add
- (i32.add
- (i32.const 0)
- (i32.const 313249263)
- )
- (i32.const -19088752)
- )
- )
- )
- (func $conversions (; 8 ;)
- (local $0 i32)
- (local $1 f64)
- (local.set $0
- (call $f64-to-int
- (local.get $1)
- )
- )
- (local.set $1
- (f64.convert_i32_s
- (local.get $0)
- )
- )
- (local.set $1
- (f64.convert_i32_u
- (i32.shr_u
- (local.get $0)
- (i32.const 0)
- )
- )
- )
- )
- (func $seq (; 9 ;)
- (local $0 f64)
- (local.set $0
- (f64.sub
- (block $label$1 (result f64)
- (drop
- (f64.const 0.1)
- )
- (f64.const 5.1)
- )
- (block $label$2 (result f64)
- (drop
- (f64.const 3.2)
- )
- (f64.const 4.2)
- )
- )
- )
- )
- (func $switcher (; 10 ;) (param $0 i32) (result i32)
- (block $label$1 (result i32)
- (block $label$2
- (block $label$3
- (block $label$4
- (block $label$5
- (br_table $label$5 $label$4 $label$3
- (i32.sub
- (local.get $0)
- (i32.const 1)
- )
- )
- )
- (br $label$1
- (i32.const 1)
- )
- )
- (br $label$1
- (i32.const 2)
- )
- )
- (nop)
- )
- (block $label$6
- (block $label$7
- (block $label$8
- (block $label$9
- (br_table $label$8 $label$7 $label$7 $label$7 $label$7 $label$7 $label$7 $label$9 $label$7
- (i32.sub
- (local.get $0)
- (i32.const 5)
- )
- )
- )
- (br $label$1
- (i32.const 121)
- )
- )
- (br $label$1
- (i32.const 51)
- )
- )
- (nop)
- )
- (block $label$10
- (block $label$11
- (block $label$12
- (block $label$13
- (block $label$14
- (block $label$15
- (br_table $label$12 $label$11 $label$11 $label$13 $label$11 $label$11 $label$11 $label$11 $label$14 $label$11 $label$15 $label$11
- (i32.sub
- (local.get $0)
- (i32.const 2)
- )
- )
- )
- (br $label$10)
- )
- (br $label$10)
- )
- (block $label$16
- (loop $label$17
- (br $label$16)
- )
- )
- )
- (block $label$18
- (loop $label$19
- (br $label$10)
- )
- )
- )
- (nop)
- )
- (i32.const 0)
- )
- )
- (func $blocker (; 11 ;)
- (block $label$1
- (br $label$1)
- )
- )
- (func $frem (; 12 ;) (result f64)
- (call $f64-rem
- (f64.const 5.5)
- (f64.const 1.2)
- )
- )
- (func $big_uint_div_u (; 13 ;) (result i32)
- (local $0 i32)
- (local.set $0
- (i32.and
- (i32.div_u
- (i32.const -1)
- (i32.const 2)
- )
- (i32.const -1)
- )
- )
- (local.get $0)
- )
- (func $fr (; 14 ;) (param $0 f32)
- (local $1 f32)
- (local $2 f64)
- (drop
- (f32.demote_f64
- (local.get $2)
- )
- )
- (drop
- (local.get $1)
- )
- (drop
- (f32.const 5)
- )
- (drop
- (f32.const 0)
- )
- (drop
- (f32.const 5)
- )
- (drop
- (f32.const 0)
- )
- )
- (func $negZero (; 15 ;) (result f64)
- (f64.const -0)
- )
- (func $abs (; 16 ;)
- (local $0 i32)
- (local $1 i32)
- (local $2 f32)
- (local $3 f64)
- (local.set $0
- (block $label$1 (result i32)
- (local.set $1
- (i32.const 0)
- )
- (select
- (i32.sub
- (i32.const 0)
- (local.get $1)
- )
- (local.get $1)
- (i32.lt_s
- (local.get $1)
- (i32.const 0)
- )
- )
- )
- )
- (local.set $3
- (f64.abs
- (f64.const 0)
- )
- )
- (local.set $2
- (f32.abs
- (f32.const 0)
- )
- )
- )
- (func $neg (; 17 ;)
- (local $0 f32)
- (local.set $0
- (f32.neg
- (local.get $0)
- )
- )
- (call_indirect (type $f32_=>_none)
- (local.get $0)
- (i32.add
- (i32.and
- (i32.const 1)
- (i32.const 7)
- )
- (i32.const 8)
- )
- )
- )
- (func $cneg (; 18 ;) (param $0 f32)
- (call_indirect (type $f32_=>_none)
- (local.get $0)
- (i32.add
- (i32.and
- (i32.const 1)
- (i32.const 7)
- )
- (i32.const 8)
- )
- )
- )
- (func $___syscall_ret (; 19 ;)
- (local $0 i32)
- (drop
- (i32.gt_u
- (i32.shr_u
- (local.get $0)
- (i32.const 0)
- )
- (i32.const -4096)
- )
- )
- )
- (func $z (; 20 ;)
- (nop)
- )
- (func $w (; 21 ;)
- (nop)
- )
- (func $block_and_after (; 22 ;) (result i32)
- (block $label$1
- (drop
- (i32.const 1)
- )
- (br $label$1)
- )
- (i32.const 0)
- )
- (func $loop-roundtrip (; 23 ;) (param $0 f64) (result f64)
- (loop $label$1 (result f64)
- (drop
- (local.get $0)
- )
- (local.get $0)
- )
- )
- (func $big-i64 (; 24 ;) (result i64)
- (i64.const -9218868437227405313)
- )
- (func $i64-store32 (; 25 ;) (param $0 i32) (param $1 i64)
- (i64.store32
- (local.get $0)
- (local.get $1)
- )
- )
- (func $return-unreachable (; 26 ;) (result i32)
- (return
- (i32.const 1)
- )
- )
- (func $unreachable-block (; 27 ;) (result i32)
- (block $label$1
- (drop
- (i32.const 1)
- )
- (return
- (i32.const 2)
- )
- )
- )
- (func $unreachable-block-toplevel (; 28 ;) (result i32)
- (drop
- (i32.const 1)
- )
- (return
- (i32.const 2)
- )
- )
- (func $unreachable-block0 (; 29 ;) (result i32)
- (block $label$1
- (return
- (i32.const 2)
- )
- )
- )
- (func $unreachable-block0-toplevel (; 30 ;) (result i32)
- (return
- (i32.const 2)
- )
- )
- (func $unreachable-block-with-br (; 31 ;) (result i32)
- (block $label$1
- (drop
- (i32.const 1)
- )
- (br $label$1)
- )
- (i32.const 1)
- )
- (func $unreachable-if (; 32 ;) (result i32)
- (if
- (i32.const 3)
- (return
- (i32.const 2)
- )
- (return
- (i32.const 1)
- )
- )
- )
- (func $unreachable-if-toplevel (; 33 ;) (result i32)
- (if
- (i32.const 3)
- (return
- (i32.const 2)
- )
- (return
- (i32.const 1)
- )
- )
- )
- (func $unreachable-loop (; 34 ;) (result i32)
- (loop $label$1
- (nop)
- (return
- (i32.const 1)
- )
- )
- )
- (func $unreachable-loop0 (; 35 ;) (result i32)
- (loop $label$1
- (return
- (i32.const 1)
- )
- )
- )
- (func $unreachable-loop-toplevel (; 36 ;) (result i32)
- (loop $label$1
- (nop)
- (return
- (i32.const 1)
- )
- )
- )
- (func $unreachable-loop0-toplevel (; 37 ;) (result i32)
- (loop $label$1
- (return
- (i32.const 1)
- )
- )
- )
- (func $unreachable-ifs (; 38 ;)
- (unreachable)
- )
- (func $unreachable-if-arm (; 39 ;)
- (if
- (i32.const 1)
- (nop)
- (unreachable)
- )
- )
-)
-