diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-11-07 16:47:47 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-07 16:47:47 -0800 |
commit | 3dac399ba503e05ee014e96a7ce9c82f29f6981c (patch) | |
tree | b00c60f1ca8019da8283c4f38660dd4d46d82d87 /test | |
parent | 89d393ed02f6b15a3a8dc60b489f969184070625 (diff) | |
download | binaryen-3dac399ba503e05ee014e96a7ce9c82f29f6981c.tar.gz binaryen-3dac399ba503e05ee014e96a7ce9c82f29f6981c.tar.bz2 binaryen-3dac399ba503e05ee014e96a7ce9c82f29f6981c.zip |
support assigns of f32 to HEAP64 in asm2wasm (#830)
Diffstat (limited to 'test')
-rw-r--r-- | test/unit.asm.js | 7 | ||||
-rw-r--r-- | test/unit.fromasm | 11 | ||||
-rw-r--r-- | test/unit.fromasm.imprecise | 11 | ||||
-rw-r--r-- | test/unit.fromasm.imprecise.no-opts | 11 | ||||
-rw-r--r-- | test/unit.fromasm.no-opts | 11 |
5 files changed, 50 insertions, 1 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js index 0c1ad9fa8..84fb346cc 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -647,6 +647,11 @@ function asm(global, env, buffer) { return Math_fround(x|0); } + function store_fround(x) { + x = x | 0; + HEAPF64[10] = Math_fround(x|0); + } + function v() { } function vi(x) { @@ -658,6 +663,6 @@ function asm(global, env, buffer) { var FUNCTION_TABLE_c = [ z, cneg, z, z, z, z, z, z ]; var FUNCTION_TABLE_vi = [ vi, vi, vi, vi, vi, vi, vi, vi ]; - return { big_negative: big_negative, pick: forgetMe, pick: exportMe, doubleCompares: doubleCompares, intOps: intOps, conversions: conversions, switcher: switcher, frem: frem, big_uint_div_u: big_uint_div_u, fr: fr, negZero: negZero, neg: neg, smallCompare: smallCompare, cneg_nosemicolon: cneg_nosemicolon, forLoop: forLoop, ceiling_32_64: ceiling_32_64, aborts: aborts, continues: continues, bitcasts: bitcasts, recursiveBlockMerging: recursiveBlockMerging, lb: lb, zeroInit: zeroInit, phi: phi, smallIf: smallIf, dropCall: dropCall, useSetGlobal: useSetGlobal, usesSetGlobal2: usesSetGlobal2, breakThroughMany: breakThroughMany, ifChainEmpty: ifChainEmpty, heap8NoShift: heap8NoShift, conditionalTypeFun: conditionalTypeFun, loadSigned: loadSigned, globalOpts: globalOpts, dropCallImport: dropCallImport, loophi: loophi, loophi2: loophi2, relooperJumpThreading: relooperJumpThreading, relooperJumpThreading__ZN4game14preloadweaponsEv: relooperJumpThreading__ZN4game14preloadweaponsEv, __Z12multi_varargiz: __Z12multi_varargiz, jumpThreadDrop: jumpThreadDrop, dropIgnoredImportInIf: dropIgnoredImportInIf, dropIgnoredImportsInIf: dropIgnoredImportsInIf, relooperJumpThreading_irreducible: relooperJumpThreading_irreducible }; + return { big_negative: big_negative, pick: forgetMe, pick: exportMe, doubleCompares: doubleCompares, intOps: intOps, conversions: conversions, switcher: switcher, frem: frem, big_uint_div_u: big_uint_div_u, fr: fr, negZero: negZero, neg: neg, smallCompare: smallCompare, cneg_nosemicolon: cneg_nosemicolon, forLoop: forLoop, ceiling_32_64: ceiling_32_64, aborts: aborts, continues: continues, bitcasts: bitcasts, recursiveBlockMerging: recursiveBlockMerging, lb: lb, zeroInit: zeroInit, phi: phi, smallIf: smallIf, dropCall: dropCall, useSetGlobal: useSetGlobal, usesSetGlobal2: usesSetGlobal2, breakThroughMany: breakThroughMany, ifChainEmpty: ifChainEmpty, heap8NoShift: heap8NoShift, conditionalTypeFun: conditionalTypeFun, loadSigned: loadSigned, globalOpts: globalOpts, dropCallImport: dropCallImport, loophi: loophi, loophi2: loophi2, relooperJumpThreading: relooperJumpThreading, relooperJumpThreading__ZN4game14preloadweaponsEv: relooperJumpThreading__ZN4game14preloadweaponsEv, __Z12multi_varargiz: __Z12multi_varargiz, jumpThreadDrop: jumpThreadDrop, dropIgnoredImportInIf: dropIgnoredImportInIf, dropIgnoredImportsInIf: dropIgnoredImportsInIf, relooperJumpThreading_irreducible: relooperJumpThreading_irreducible, store_fround: store_fround }; } diff --git a/test/unit.fromasm b/test/unit.fromasm index df8d61208..1c8064892 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -75,6 +75,7 @@ (export "dropIgnoredImportInIf" (func $dropIgnoredImportInIf)) (export "dropIgnoredImportsInIf" (func $dropIgnoredImportsInIf)) (export "relooperJumpThreading_irreducible" (func $relooperJumpThreading_irreducible)) + (export "store_fround" (func $store_fround)) (func $big_negative (nop) ) @@ -1125,6 +1126,16 @@ ) ) ) + (func $store_fround (param $0 i32) + (f64.store + (i32.const 80) + (f64.promote/f32 + (f32.convert_s/i32 + (get_local $0) + ) + ) + ) + ) (func $vi (param $0 i32) (nop) ) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index e7077524e..2f97cfe93 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -70,6 +70,7 @@ (export "dropIgnoredImportInIf" (func $dropIgnoredImportInIf)) (export "dropIgnoredImportsInIf" (func $dropIgnoredImportsInIf)) (export "relooperJumpThreading_irreducible" (func $relooperJumpThreading_irreducible)) + (export "store_fround" (func $store_fround)) (func $big_negative (nop) ) @@ -1101,6 +1102,16 @@ ) ) ) + (func $store_fround (param $0 i32) + (f64.store + (i32.const 80) + (f64.promote/f32 + (f32.convert_s/i32 + (get_local $0) + ) + ) + ) + ) (func $vi (param $0 i32) (nop) ) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index 67c319f50..12fb31212 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -70,6 +70,7 @@ (export "dropIgnoredImportInIf" (func $dropIgnoredImportInIf)) (export "dropIgnoredImportsInIf" (func $dropIgnoredImportsInIf)) (export "relooperJumpThreading_irreducible" (func $relooperJumpThreading_irreducible)) + (export "store_fround" (func $store_fround)) (func $big_negative (local $temp f64) (set_local $temp @@ -1787,6 +1788,16 @@ ) ) ) + (func $store_fround (param $x i32) + (f64.store + (i32.const 80) + (f64.promote/f32 + (f32.convert_s/i32 + (get_local $x) + ) + ) + ) + ) (func $v (nop) ) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index a8d49036c..fead97f27 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -74,6 +74,7 @@ (export "dropIgnoredImportInIf" (func $dropIgnoredImportInIf)) (export "dropIgnoredImportsInIf" (func $dropIgnoredImportsInIf)) (export "relooperJumpThreading_irreducible" (func $relooperJumpThreading_irreducible)) + (export "store_fround" (func $store_fround)) (func $big_negative (local $temp f64) (set_local $temp @@ -1793,6 +1794,16 @@ ) ) ) + (func $store_fround (param $x i32) + (f64.store + (i32.const 80) + (f64.promote/f32 + (f32.convert_s/i32 + (get_local $x) + ) + ) + ) + ) (func $v (nop) ) |