diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/unit.asm.js | 7 | ||||
-rw-r--r-- | test/unit.fromasm | 14 | ||||
-rw-r--r-- | test/unit.fromasm.imprecise | 14 | ||||
-rw-r--r-- | test/unit.fromasm.imprecise.no-opts | 15 | ||||
-rw-r--r-- | test/unit.fromasm.no-opts | 15 |
5 files changed, 65 insertions, 0 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js index da4269873..77fbe408b 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -8,6 +8,7 @@ function asm(global, env, buffer) { var Math_abs = global.Math.abs; var Math_ceil = global.Math.ceil; var tempDoublePtr = env.tempDoublePtr | 0; + var n = env.gb | 0; var abort = env.abort; var print = env.print; @@ -214,6 +215,12 @@ function asm(global, env, buffer) { (HEAPF32[tempDoublePtr >> 2] = d, HEAP32[tempDoublePtr >> 2] | 0); // f64 with implict f32 conversion, ->i32 } + function lb(a) { + a = a | 0; + HEAP32[a >> 2] = n + 136 + 8; + return; + } + function z() { } function w() { diff --git a/test/unit.fromasm b/test/unit.fromasm index 669aa33d9..23f6c48ba 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -363,6 +363,20 @@ (func $bitcasts (param $0 i32) (param $1 f32) (nop) ) + (func $lb (param $0 i32) + (i32.store + (get_local $0) + (i32.add + (i32.add + (i32.load + (i32.const 48) + ) + (i32.const 136) + ) + (i32.const 8) + ) + ) + ) (func $z (nop) ) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index 240cc0bd5..347ea4e88 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -355,6 +355,20 @@ (func $bitcasts (param $0 i32) (param $1 f32) (nop) ) + (func $lb (param $0 i32) + (i32.store + (get_local $0) + (i32.add + (i32.add + (i32.load + (i32.const 48) + ) + (i32.const 136) + ) + (i32.const 8) + ) + ) + ) (func $z (nop) ) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index a4b3c3682..4b765e4dc 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -562,6 +562,21 @@ ) ) ) + (func $lb (param $a i32) + (i32.store + (get_local $a) + (i32.add + (i32.add + (i32.load + (i32.const 48) + ) + (i32.const 136) + ) + (i32.const 8) + ) + ) + (return) + ) (func $z (nop) ) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 222993289..ddfa05577 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -566,6 +566,21 @@ ) ) ) + (func $lb (param $a i32) + (i32.store + (get_local $a) + (i32.add + (i32.add + (i32.load + (i32.const 48) + ) + (i32.const 136) + ) + (i32.const 8) + ) + ) + (return) + ) (func $z (nop) ) |