summaryrefslogtreecommitdiff
path: root/test/unit.fromasm.no-opts
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-09-21 19:33:11 -0700
committerGitHub <noreply@github.com>2016-09-21 19:33:11 -0700
commit8be82627c6a8cbded0dab67ad1f31906a54ba78c (patch)
treeb7b14f1899ffe39a7562007474a58948685146c8 /test/unit.fromasm.no-opts
parent7292ef9c863a0766c697cc0a77516447ff652820 (diff)
parent740e36eab98d679387fea60cd642591a69ce809f (diff)
downloadbinaryen-8be82627c6a8cbded0dab67ad1f31906a54ba78c.tar.gz
binaryen-8be82627c6a8cbded0dab67ad1f31906a54ba78c.tar.bz2
binaryen-8be82627c6a8cbded0dab67ad1f31906a54ba78c.zip
Merge pull request #703 from WebAssembly/spec-update
Spec update - get us passing the 0xc spec tests (minus stacky stuff)
Diffstat (limited to 'test/unit.fromasm.no-opts')
-rw-r--r--test/unit.fromasm.no-opts149
1 files changed, 76 insertions, 73 deletions
diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts
index 846ef21a0..0684c1464 100644
--- a/test/unit.fromasm.no-opts
+++ b/test/unit.fromasm.no-opts
@@ -1,5 +1,4 @@
(module
- (memory 256 256)
(type $FUNCSIG$id (func (param f64) (result i32)))
(type $FUNCSIG$ddd (func (param f64 f64) (result f64)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
@@ -8,11 +7,11 @@
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$dd (func (param f64) (result f64)))
(type $FUNCSIG$i (func (result i32)))
- (import "global" "NaN" (global $t f64))
- (import "global" "Infinity" (global $u f64))
- (import "env" "tempDoublePtr" (global $tempDoublePtr i32))
- (import "env" "gb" (global $n i32))
- (import "env" "STACKTOP" (global $STACKTOP i32))
+ (import "global" "NaN" (global $t$asm2wasm$import f64))
+ (import "global" "Infinity" (global $u$asm2wasm$import f64))
+ (import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
+ (import "env" "gb" (global $n$asm2wasm$import i32))
+ (import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "setTempRet0" (func $setTempRet0 (param i32) (result i32)))
(import "env" "abort" (func $abort (param f64) (result f64)))
(import "env" "print" (func $print (param i32)))
@@ -21,15 +20,19 @@
(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)))
(import "asm2wasm" "i32u-div" (func $i32u-div (param i32 i32) (result i32)))
- (import "env" "memory" (memory $memory))
- (import "env" "table" (table $table))
+ (import "env" "memory" (memory 256 256))
+ (import "env" "table" (table 10 10 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
(export "big_negative" (func $big_negative))
(export "pick" (func $exportMe))
- (global $Int i32 (i32.const 0))
- (global $Double f64 (f64.const 0))
- (table 10 10 anyfunc)
+ (global $t (mut f64) (get_global $t$asm2wasm$import))
+ (global $u (mut f64) (get_global $u$asm2wasm$import))
+ (global $Int (mut i32) (i32.const 0))
+ (global $Double (mut f64) (f64.const 0))
+ (global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
+ (global $n (mut i32) (get_global $n$asm2wasm$import))
+ (global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg)
(func $big_negative
(local $temp f64)
@@ -158,12 +161,12 @@
(local $d f64)
(local $f f32)
(set_local $i
- (call_import $f64-to-int
+ (call $f64-to-int
(get_local $d)
)
)
(set_local $i
- (call_import $f64-to-int
+ (call $f64-to-int
(f64.promote/f32
(get_local $f)
)
@@ -184,13 +187,13 @@
(local $J f64)
(set_local $J
(f64.sub
- (block
+ (block f64
(drop
(f64.const 0.1)
)
(f64.const 5.1)
)
- (block
+ (block f64
(drop
(f64.const 3.2)
)
@@ -319,7 +322,7 @@
(br $label$continue$L3)
)
)
- (call_import $h
+ (call $h
(i32.const 120)
)
(br $label$continue$L1)
@@ -336,7 +339,7 @@
)
(func $frem (result f64)
(return
- (call_import $f64-rem
+ (call $f64-rem
(f64.const 5.5)
(f64.const 1.2)
)
@@ -346,7 +349,7 @@
(local $x i32)
(set_local $x
(i32.and
- (call_import $i32u-div
+ (call $i32u-div
(i32.const -1)
(i32.const 2)
)
@@ -392,7 +395,7 @@
(local $z f32)
(local $asm2wasm_i32_temp i32)
(set_local $x
- (block
+ (block i32
(set_local $asm2wasm_i32_temp
(i32.const 0)
)
@@ -518,7 +521,7 @@
)
(br $for-out$0)
)
- (call_import $h
+ (call $h
(get_local $i)
)
(set_local $i
@@ -553,29 +556,29 @@
)
(func $aborts
(drop
- (call_import $abort
+ (call $abort
(f64.const 0)
)
)
(drop
- (call_import $abort
+ (call $abort
(f64.convert_s/i32
(i32.const 55)
)
)
)
(drop
- (call_import $abort
+ (call $abort
(f64.const 0)
)
)
(drop
- (call_import $abort
+ (call $abort
(f64.const 12.34)
)
)
(drop
- (call_import $abort
+ (call $abort
(f64.promote/f32
(f32.const 56.779998779296875)
)
@@ -585,12 +588,12 @@
(func $continues
(loop $while-in$1
(block $while-out$0
- (call_import $print
+ (call $print
(i32.const 1)
)
(block $do-once$2
(loop $unlikely-continue$3
- (call_import $print
+ (call $print
(i32.const 5)
)
(if
@@ -599,7 +602,7 @@
)
)
)
- (call_import $print
+ (call $print
(i32.const 2)
)
(br $while-in$1)
@@ -639,20 +642,20 @@
(i32.add
(i32.add
(i32.add
- (block
+ (block i32
(drop
(i32.const 1)
)
(get_local $x)
)
- (block
+ (block i32
(drop
(i32.const 2)
)
(i32.const 3)
)
)
- (block
+ (block i32
(block
(block
(drop
@@ -669,19 +672,19 @@
(i32.const 7)
)
)
- (block
+ (block i32
(drop
(i32.const 8)
)
- (block
+ (block i32
(drop
(i32.const 9)
)
- (block
+ (block i32
(drop
(i32.const 10)
)
- (block
+ (block i32
(drop
(i32.const 11)
)
@@ -697,7 +700,7 @@
(i32.add
(i32.add
(i32.add
- (block
+ (block i32
(drop
(call $lb
(i32.const 1)
@@ -705,7 +708,7 @@
)
(get_local $x)
)
- (block
+ (block i32
(drop
(call $lb
(i32.const 2)
@@ -716,7 +719,7 @@
)
)
)
- (block
+ (block i32
(block
(block
(drop
@@ -741,25 +744,25 @@
)
)
)
- (block
+ (block i32
(drop
(call $lb
(i32.const 8)
)
)
- (block
+ (block i32
(drop
(call $lb
(i32.const 9)
)
)
- (block
+ (block i32
(drop
(call $lb
(i32.const 10)
)
)
- (block
+ (block i32
(drop
(call $lb
(i32.const 11)
@@ -879,12 +882,12 @@
(call $phi)
)
(drop
- (call_import $setTempRet0
+ (call $setTempRet0
(i32.const 10)
)
)
(call $zeroInit
- (call_import $setTempRet0
+ (call $setTempRet0
(i32.const 10)
)
)
@@ -897,7 +900,7 @@
(func $useSetGlobal (result i32)
(local $x i32)
(set_local $x
- (block
+ (block i32
(set_global $Int
(i32.const 10)
)
@@ -908,7 +911,7 @@
(i32.const 20)
)
(return
- (block
+ (block i32
(set_global $Int
(i32.const 30)
)
@@ -918,7 +921,7 @@
)
(func $usesSetGlobal2 (result i32)
(return
- (block
+ (block i32
(block
(set_global $Int
(i32.const 40)
@@ -991,7 +994,7 @@
(if
(i32.const 1)
(i32.trunc_s/f64
- (call_import $abort
+ (call $abort
(f64.convert_s/i32
(i32.const 5)
)
@@ -1003,7 +1006,7 @@
(set_local $y
(if
(i32.const 3)
- (call_import $abort
+ (call $abort
(f64.convert_s/i32
(i32.const 7)
)
@@ -1155,7 +1158,7 @@
(if
(i32.const 1)
(drop
- (call_import $return_int)
+ (call $return_int)
)
)
)
@@ -1261,7 +1264,7 @@
(if
(get_local $x)
(block
- (call_import $h
+ (call $h
(i32.const 0)
)
(set_local $label
@@ -1274,11 +1277,11 @@
(get_local $label)
(i32.const 1)
)
- (call_import $h
+ (call $h
(i32.const 1)
)
)
- (call_import $h
+ (call $h
(i32.const -1)
)
(loop $while-in$1
@@ -1292,7 +1295,7 @@
(if
(get_local $x)
(block
- (call_import $h
+ (call $h
(i32.const 2)
)
(set_local $label
@@ -1309,17 +1312,17 @@
(get_local $label)
(i32.const 2)
)
- (call_import $h
+ (call $h
(i32.const 3)
)
)
- (call_import $h
+ (call $h
(i32.const -2)
)
(if
(get_local $x)
(block
- (call_import $h
+ (call $h
(i32.const 4)
)
(if
@@ -1341,7 +1344,7 @@
(get_local $label)
(i32.const 3)
)
- (call_import $h
+ (call $h
(i32.const 5)
)
(if
@@ -1349,18 +1352,18 @@
(get_local $label)
(i32.const 4)
)
- (call_import $h
+ (call $h
(i32.const 6)
)
)
)
- (call_import $h
+ (call $h
(i32.const -3)
)
(if
(get_local $x)
(block
- (call_import $h
+ (call $h
(i32.const 7)
)
(if
@@ -1383,7 +1386,7 @@
(i32.const 5)
)
(block
- (call_import $h
+ (call $h
(i32.const 8)
)
(if
@@ -1402,17 +1405,17 @@
(get_local $label)
(i32.const 6)
)
- (call_import $h
+ (call $h
(i32.const 9)
)
)
- (call_import $h
+ (call $h
(i32.const -4)
)
(if
(get_local $x)
(block
- (call_import $h
+ (call $h
(i32.const 10)
)
(set_local $label
@@ -1427,20 +1430,20 @@
(i32.const 7)
)
(block
- (call_import $h
+ (call $h
(i32.const 11)
)
(br $label$break$L1)
)
)
)
- (call_import $h
+ (call $h
(i32.const -5)
)
(if
(get_local $x)
(block
- (call_import $h
+ (call $h
(i32.const 12)
)
(if
@@ -1463,7 +1466,7 @@
(i32.const 8)
)
(block
- (call_import $h
+ (call $h
(i32.const 13)
)
(if
@@ -1481,14 +1484,14 @@
(i32.const 9)
)
(block
- (call_import $h
+ (call $h
(i32.const 14)
)
(br $label$break$L1)
)
)
)
- (call_import $h
+ (call $h
(i32.const -6)
)
(return
@@ -1589,7 +1592,7 @@
(local $label i32)
(local $temp i32)
(set_local $temp
- (call_import $return_int)
+ (call $return_int)
)
(loop $while-in$1
(block $while-out$0
@@ -1612,7 +1615,7 @@
(i32.const 12)
)
(drop
- (call_import $return_int)
+ (call $return_int)
)
(if
(i32.eq