diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /js/src/jit-test/tests/wasm | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/jit-test/tests/wasm')
177 files changed, 33598 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/wasm/backtrace.js b/js/src/jit-test/tests/wasm/backtrace.js new file mode 100644 index 000000000..96a069119 --- /dev/null +++ b/js/src/jit-test/tests/wasm/backtrace.js @@ -0,0 +1,22 @@ +load(libdir + "wasm.js"); + +var code = `(module + (import $i "env" "test") + (func $t (call $i)) + (export "test" $t) +)`; +var mod = wasmEvalText(code, { + env: { + test: function() { + // Expecting 3 lines in the backtrace (plus last empty). + // The middle one is for the wasm function. + var s = getBacktrace(); + assertEq(s.split('\n').length, 4); + assertEq(s.split('\n')[1].startsWith("1 wasm-function[1]("), true); + + // Let's also run DumpBacktrace() to check if we are not crashing. + backtrace(); + } + } +}).exports; +mod.test(); diff --git a/js/src/jit-test/tests/wasm/basic.js b/js/src/jit-test/tests/wasm/basic.js new file mode 100644 index 000000000..500ff8d20 --- /dev/null +++ b/js/src/jit-test/tests/wasm/basic.js @@ -0,0 +1,627 @@ +load(libdir + "wasm.js"); + +// ---------------------------------------------------------------------------- +// exports + +var o = wasmEvalText('(module)').exports; +assertEq(Object.getOwnPropertyNames(o).length, 0); + +var o = wasmEvalText('(module (func))').exports; +assertEq(Object.getOwnPropertyNames(o).length, 0); + +var o = wasmEvalText('(module (func) (export "a" 0))').exports; +var names = Object.getOwnPropertyNames(o); +assertEq(names.length, 1); +assertEq(names[0], 'a'); +var desc = Object.getOwnPropertyDescriptor(o, 'a'); +assertEq(typeof desc.value, "function"); +assertEq(desc.value.name, "0"); +assertEq(desc.value.length, 0); +assertEq(desc.value(), undefined); +assertEq(desc.writable, false); +assertEq(desc.enumerable, true); +assertEq(desc.configurable, false); +assertEq(desc.value(), undefined); + +wasmValidateText('(module (func) (func) (export "a" 0))'); +wasmValidateText('(module (func) (func) (export "a" 1))'); +wasmValidateText('(module (func $a) (func $b) (export "a" $a) (export "b" $b))'); +wasmValidateText('(module (func $a) (func $b) (export "a" $a) (export "b" $b))'); + +wasmFailValidateText('(module (func) (export "a" 1))', /exported function index out of bounds/); +wasmFailValidateText('(module (func) (func) (export "a" 2))', /exported function index out of bounds/); + +var o = wasmEvalText('(module (func) (export "a" 0) (export "b" 0))').exports; +assertEq(Object.getOwnPropertyNames(o).sort().toString(), "a,b"); +assertEq(o.a.name, "0"); +assertEq(o.b.name, "0"); +assertEq(o.a === o.b, true); + +var o = wasmEvalText('(module (func) (func) (export "a" 0) (export "b" 1))').exports; +assertEq(Object.getOwnPropertyNames(o).sort().toString(), "a,b"); +assertEq(o.a.name, "0"); +assertEq(o.b.name, "1"); +assertEq(o.a === o.b, false); + +var o = wasmEvalText('(module (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) (export "a" 0) (export "b" 1))').exports; +assertEq(o.a(), 1); +assertEq(o.b(), 2); +var o = wasmEvalText('(module (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) (export "a" 1) (export "b" 0))').exports; +assertEq(o.a(), 2); +assertEq(o.b(), 1); + +wasmFailValidateText('(module (func) (export "a" 0) (export "a" 0))', /duplicate export/); +wasmFailValidateText('(module (func) (func) (export "a" 0) (export "a" 1))', /duplicate export/); + +// ---------------------------------------------------------------------------- +// signatures + +wasmFailValidateText('(module (func (result i32)))', mismatchError("void", "i32")); +wasmFailValidateText('(module (func (result i32) (nop)))', mismatchError("void", "i32")); + +wasmValidateText('(module (func (nop)))'); +wasmValidateText('(module (func (result i32) (i32.const 42)))'); +wasmValidateText('(module (func (param i32)))'); +wasmValidateText('(module (func (param i32) (result i32) (i32.const 42)))'); +wasmValidateText('(module (func (result i32) (param i32) (i32.const 42)))'); +wasmValidateText('(module (func (param f32)))'); +wasmValidateText('(module (func (param f64)))'); + +var f = wasmEvalText('(module (func (param i64) (result i32) (i32.const 123)) (export "" 0))').exports[""]; +assertErrorMessage(f, TypeError, /i64/); +var f = wasmEvalText('(module (func (param i32) (result i64) (i64.const 123)) (export "" 0))').exports[""]; +assertErrorMessage(f, TypeError, /i64/); + +var f = wasmEvalText('(module (import $imp "a" "b" (param i64) (result i32)) (func $f (result i32) (call $imp (i64.const 0))) (export "" $f))', {a:{b:()=>{}}}).exports[""]; +assertErrorMessage(f, TypeError, /i64/); +var f = wasmEvalText('(module (import $imp "a" "b" (result i64)) (func $f (result i64) (call $imp)) (export "" $f))', {a:{b:()=>{}}}).exports[""]; +assertErrorMessage(f, TypeError, /i64/); + +setJitCompilerOption('wasm.test-mode', 1); +wasmFullPassI64('(module (func (result i64) (i64.const 123)) (export "run" 0))', {low: 123, high: 0}); +wasmFullPassI64('(module (func (param i64) (result i64) (get_local 0)) (export "run" 0))', + { low: 0x7fffffff, high: 0x12340000}, + {}, + {low: 0x7fffffff, high: 0x12340000}); +wasmFullPassI64('(module (func (param i64) (result i64) (i64.add (get_local 0) (i64.const 1))) (export "run" 0))', + {low: 0x0, high: 0x12340001}, + {}, + { low: 0xffffffff, high: 0x12340000}); +setJitCompilerOption('wasm.test-mode', 0); + +// ---------------------------------------------------------------------------- +// imports + +const noImportObj = "second argument must be an object"; + +assertErrorMessage(() => wasmEvalText('(module (import "a" "b"))', 1), TypeError, noImportObj); +assertErrorMessage(() => wasmEvalText('(module (import "a" "b"))', null), TypeError, noImportObj); + +const notObject = /import object field '\w*' is not an Object/; +const notFunction = /import object field '\w*' is not a Function/; + +var code = '(module (import "a" "b"))'; +assertErrorMessage(() => wasmEvalText(code), TypeError, noImportObj); +assertErrorMessage(() => wasmEvalText(code, {}), TypeError, notObject); +assertErrorMessage(() => wasmEvalText(code, {a:1}), TypeError, notObject); +assertErrorMessage(() => wasmEvalText(code, {a:{}}), TypeError, notFunction); +assertErrorMessage(() => wasmEvalText(code, {a:{b:1}}), TypeError, notFunction); +wasmEvalText(code, {a:{b:()=>{}}}); + +var code = '(module (import "" "b"))'; +wasmEvalText(code, {"":{b:()=>{}}}); + +var code = '(module (import "a" ""))'; +assertErrorMessage(() => wasmEvalText(code), TypeError, noImportObj); +assertErrorMessage(() => wasmEvalText(code, {}), TypeError, notObject); +assertErrorMessage(() => wasmEvalText(code, {a:1}), TypeError, notObject); +wasmEvalText(code, {a:{"":()=>{}}}); + +var code = '(module (import "a" "") (import "b" "c") (import "c" ""))'; +assertErrorMessage(() => wasmEvalText(code, {a:()=>{}, b:{c:()=>{}}, c:{}}), TypeError, notFunction); +wasmEvalText(code, {a:{"":()=>{}}, b:{c:()=>{}}, c:{"":()=>{}}}); + +wasmEvalText('(module (import "a" "" (result i32)))', {a:{"":()=>{}}}); +wasmEvalText('(module (import "a" "" (result f32)))', {a:{"":()=>{}}}); +wasmEvalText('(module (import "a" "" (result f64)))', {a:{"":()=>{}}}); +wasmEvalText('(module (import $foo "a" "" (result f64)))', {a:{"":()=>{}}}); + +// ---------------------------------------------------------------------------- +// memory + +wasmValidateText('(module (memory 0))'); +wasmValidateText('(module (memory 1))'); +wasmFailValidateText('(module (memory 65536))', /initial memory size too big/); + +// May OOM, but must not crash: +try { + wasmEvalText('(module (memory 65535))'); +} catch (e) { + assertEq(String(e).indexOf("out of memory") != -1 || + String(e).indexOf("memory size too big") != -1, true); +} + +var buf = wasmEvalText('(module (memory 1) (export "memory" memory))').exports.memory.buffer; +assertEq(buf instanceof ArrayBuffer, true); +assertEq(buf.byteLength, 65536); + +var obj = wasmEvalText('(module (memory 1) (func (result i32) (i32.const 42)) (func (nop)) (export "memory" memory) (export "b" 0) (export "c" 1))').exports; +assertEq(obj.memory.buffer instanceof ArrayBuffer, true); +assertEq(obj.b instanceof Function, true); +assertEq(obj.c instanceof Function, true); +assertEq(obj.memory.buffer.byteLength, 65536); +assertEq(obj.b(), 42); +assertEq(obj.c(), undefined); + +var buf = wasmEvalText('(module (memory 1) (data (i32.const 0) "") (export "memory" memory))').exports.memory.buffer; +assertEq(new Uint8Array(buf)[0], 0); + +var buf = wasmEvalText('(module (memory 1) (data (i32.const 65536) "") (export "memory" memory))').exports.memory.buffer; +assertEq(new Uint8Array(buf)[0], 0); + +var buf = wasmEvalText('(module (memory 1) (data (i32.const 0) "a") (export "memory" memory))').exports.memory.buffer; +assertEq(new Uint8Array(buf)[0], 'a'.charCodeAt(0)); + +var buf = wasmEvalText('(module (memory 1) (data (i32.const 0) "a") (data (i32.const 2) "b") (export "memory" memory))').exports.memory.buffer; +assertEq(new Uint8Array(buf)[0], 'a'.charCodeAt(0)); +assertEq(new Uint8Array(buf)[1], 0); +assertEq(new Uint8Array(buf)[2], 'b'.charCodeAt(0)); + +var buf = wasmEvalText('(module (memory 1) (data (i32.const 65535) "c") (export "memory" memory))').exports.memory.buffer; +assertEq(new Uint8Array(buf)[0], 0); +assertEq(new Uint8Array(buf)[65535], 'c'.charCodeAt(0)); + +// ---------------------------------------------------------------------------- +// locals + +assertEq(wasmEvalText('(module (func (param i32) (result i32) (get_local 0)) (export "" 0))').exports[""](), 0); +assertEq(wasmEvalText('(module (func (param i32) (result i32) (get_local 0)) (export "" 0))').exports[""](42), 42); +assertEq(wasmEvalText('(module (func (param i32) (param i32) (result i32) (get_local 0)) (export "" 0))').exports[""](42, 43), 42); +assertEq(wasmEvalText('(module (func (param i32) (param i32) (result i32) (get_local 1)) (export "" 0))').exports[""](42, 43), 43); + +wasmFailValidateText('(module (func (get_local 0)))', /get_local index out of range/); +wasmFailValidateText('(module (func (result f32) (local i32) (get_local 0)))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (result i32) (local f32) (get_local 0)))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (result f32) (param i32) (local f32) (get_local 0)))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (result i32) (param i32) (local f32) (get_local 1)))', mismatchError("f32", "i32")); + +wasmValidateText('(module (func (local i32)))'); +wasmValidateText('(module (func (local i32) (local f32)))'); + +wasmFullPass('(module (func (result i32) (local i32) (get_local 0)) (export "run" 0))', 0); +wasmFullPass('(module (func (result i32) (param i32) (local f32) (get_local 0)) (export "run" 0))', 0); +wasmFullPass('(module (func (result f32) (param i32) (local f32) (get_local 1)) (export "run" 0))', 0); + +wasmFailValidateText('(module (func (set_local 0 (i32.const 0))))', /set_local index out of range/); +wasmFailValidateText('(module (func (local f32) (set_local 0 (i32.const 0))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (local f32) (set_local 0 (nop))))', /popping value from empty stack/); +wasmFailValidateText('(module (func (local i32) (local f32) (set_local 0 (get_local 1))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (local i32) (local f32) (set_local 1 (get_local 0))))', mismatchError("i32", "f32")); + +wasmValidateText('(module (func (local i32) (set_local 0 (i32.const 0))))'); +wasmValidateText('(module (func (local i32) (local f32) (set_local 0 (get_local 0))))'); +wasmValidateText('(module (func (local i32) (local f32) (set_local 1 (get_local 1))))'); + +wasmFullPass('(module (func (result i32) (local i32) (tee_local 0 (i32.const 42))) (export "run" 0))', 42); +wasmFullPass('(module (func (result i32) (local i32) (tee_local 0 (get_local 0))) (export "run" 0))', 0); + +wasmFullPass('(module (func (param $a i32) (result i32) (get_local $a)) (export "run" 0))', 0); +wasmFullPass('(module (func (param $a i32) (local $b i32) (result i32) (block i32 (set_local $b (get_local $a)) (get_local $b))) (export "run" 0))', 42, {}, 42); + +wasmValidateText('(module (func (local i32) (local $a f32) (set_local 0 (i32.const 1)) (set_local $a (f32.const nan))))'); + +// ---------------------------------------------------------------------------- +// blocks + +wasmFullPass('(module (func (block )) (export "run" 0))', undefined); + +wasmFailValidateText('(module (func (result i32) (block )))', mismatchError("void", "i32")); +wasmFailValidateText('(module (func (result i32) (block (block ))))', mismatchError("void", "i32")); +wasmFailValidateText('(module (func (local i32) (set_local 0 (block ))))', /popping value from empty stack/); + +wasmFullPass('(module (func (block (block ))) (export "run" 0))', undefined); +wasmFullPass('(module (func (result i32) (block i32 (i32.const 42))) (export "run" 0))', 42); +wasmFullPass('(module (func (result i32) (block i32 (block i32 (i32.const 42)))) (export "run" 0))', 42); +wasmFailValidateText('(module (func (result f32) (block i32 (i32.const 0))))', mismatchError("i32", "f32")); + +wasmFullPass('(module (func (result i32) (block i32 (drop (i32.const 13)) (block i32 (i32.const 42)))) (export "run" 0))', 42); +wasmFailValidateText('(module (func (result f32) (param f32) (block i32 (drop (get_local 0)) (i32.const 0))))', mismatchError("i32", "f32")); + +wasmFullPass('(module (func (result i32) (local i32) (set_local 0 (i32.const 42)) (get_local 0)) (export "run" 0))', 42); + +// ---------------------------------------------------------------------------- +// calls + +wasmFailValidateText('(module (func (nop)) (func (call 0 (i32.const 0))))', /unused values not explicitly dropped by end of block/); + +wasmFailValidateText('(module (func (param i32) (nop)) (func (call 0)))', /peeking at value from outside block/); +wasmFailValidateText('(module (func (param f32) (nop)) (func (call 0 (i32.const 0))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (nop)) (func (call 3)))', /callee index out of range/); + +wasmValidateText('(module (func (nop)) (func (call 0)))'); +wasmValidateText('(module (func (param i32) (nop)) (func (call 0 (i32.const 0))))'); + +wasmFullPass('(module (func (result i32) (i32.const 42)) (func (result i32) (call 0)) (export "run" 1))', 42); +assertThrowsInstanceOf(() => wasmEvalText('(module (func (call 0)) (export "" 0))').exports[""](), InternalError); +assertThrowsInstanceOf(() => wasmEvalText('(module (func (call 1)) (func (call 0)) (export "" 0))').exports[""](), InternalError); + +wasmValidateText('(module (func (param i32 f32)) (func (call 0 (i32.const 0) (f32.const nan))))'); +wasmFailValidateText('(module (func (param i32 f32)) (func (call 0 (i32.const 0) (i32.const 0))))', mismatchError("i32", "f32")); + +wasmFailValidateText('(module (import "a" "") (func (call 0 (i32.const 0))))', /unused values not explicitly dropped by end of block/); +wasmFailValidateText('(module (import "a" "" (param i32)) (func (call 0)))', /peeking at value from outside block/); +wasmFailValidateText('(module (import "a" "" (param f32)) (func (call 0 (i32.const 0))))', mismatchError("i32", "f32")); + +assertErrorMessage(() => wasmEvalText('(module (import "a" "") (func (call 1)))'), TypeError, noImportObj); +wasmEvalText('(module (import "" "a") (func (call 0)))', {"":{a:()=>{}}}); +wasmEvalText('(module (import "" "a" (param i32)) (func (call 0 (i32.const 0))))', {"":{a:()=>{}}}); + +function checkF32CallImport(v) { + wasmFullPass('(module (import "" "a" (result f32)) (func (result f32) (call 0)) (export "run" 1))', + Math.fround(v), + {"":{a:()=>{ return v; }}}); + wasmFullPass('(module (import "" "a" (param f32)) (func (param f32) (call 0 (get_local 0))) (export "run" 1))', + undefined, + {"":{a:x=>{ assertEq(Math.fround(v), x); }}}, + v); +} +checkF32CallImport(13.37); +checkF32CallImport(NaN); +checkF32CallImport(-Infinity); +checkF32CallImport(-0); +checkF32CallImport(Math.pow(2, 32) - 1); + +var counter = 0; +var f = wasmEvalText('(module (import "" "inc") (func (call 0)) (export "" 1))', {"":{inc:()=>counter++}}).exports[""]; +var g = wasmEvalText('(module (import "" "f") (func (block (call 0) (call 0))) (export "" 1))', {"":{f}}).exports[""]; +f(); +assertEq(counter, 1); +g(); +assertEq(counter, 3); + +var f = wasmEvalText('(module (import "" "callf") (func (call 0)) (export "" 1))', {"":{callf:()=>f()}}).exports[""]; +assertThrowsInstanceOf(() => f(), InternalError); + +var f = wasmEvalText('(module (import "" "callg") (func (call 0)) (export "" 1))', {"":{callg:()=>g()}}).exports[""]; +var g = wasmEvalText('(module (import "" "callf") (func (call 0)) (export "" 1))', {"":{callf:()=>f()}}).exports[""]; +assertThrowsInstanceOf(() => f(), InternalError); + +var code = '(module (import "" "one" (result i32)) (import "" "two" (result i32)) (func (result i32) (i32.const 3)) (func (result i32) (i32.const 4)) (func (result i32) BODY) (export "run" 4))'; +var imports = {"":{one:()=>1, two:()=>2}}; +wasmFullPass(code.replace('BODY', '(call 0)'), 1, imports); +wasmFullPass(code.replace('BODY', '(call 1)'), 2, imports); +wasmFullPass(code.replace('BODY', '(call 2)'), 3, imports); +wasmFullPass(code.replace('BODY', '(call 3)'), 4, imports); + +wasmFullPass(`(module (import "" "evalcx" (param i32) (result i32)) (func (result i32) (call 0 (i32.const 0))) (export "run" 1))`, 0, {"":{evalcx}}); + +if (typeof evaluate === 'function') + evaluate(`new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module)'))) `, { fileName: null }); + +{ + setJitCompilerOption('wasm.test-mode', 1); + + let imp = {"":{ + param(i64) { + assertEqI64(i64, { + low: 0x9abcdef0, + high: 0x12345678 + }); + return 42; + }, + result(i32) { + return { + low: 0xabcdef01, + high: 0x12345678 + i32 + } + }, + paramAndResult(i64) { + assertEqI64(i64, { + low: 0x9abcdef0, + high: 0x12345678 + }); + i64.low = 1337; + return i64; + } + }} + + wasmFullPass(`(module + (import "" "param" (param i64) (result i32)) + (func (result i32) (call 0 (i64.const 0x123456789abcdef0))) + (export "run" 1))`, 42, imp); + + wasmFullPass(`(module + (import "" "param" (param i64)(param i64)(param i64)(param i64)(param i64)(param i64)(param i64) (param i64) (result i32)) + (func (result i32) (call 0 (i64.const 0x123456789abcdef0)(i64.const 0x123456789abcdef0)(i64.const 0x123456789abcdef0)(i64.const 0x123456789abcdef0)(i64.const 0x123456789abcdef0)(i64.const 0x123456789abcdef0)(i64.const 0x123456789abcdef0)(i64.const 0x123456789abcdef0))) + (export "run" 1))`, 42, imp); + + wasmFullPassI64(`(module + (import "" "result" (param i32) (result i64)) + (func (result i64) (call 0 (i32.const 3))) + (export "run" 1))`, { low: 0xabcdef01, high: 0x1234567b }, imp); + + // Ensure the ion exit is never taken. + let ionThreshold = 2 * getJitCompilerOptions()['ion.warmup.trigger']; + wasmFullPassI64(`(module + (import "" "paramAndResult" (param i64) (result i64)) + (func (result i64) (local i32) (local i64) + (set_local 0 (i32.const 0)) + (loop $out $in + (set_local 1 (call 0 (i64.const 0x123456789abcdef0))) + (set_local 0 (i32.add (get_local 0) (i32.const 1))) + (if (i32.le_s (get_local 0) (i32.const ${ionThreshold})) (br $in)) + ) + (get_local 1) + ) + (export "run" 1))`, { low: 1337, high: 0x12345678 }, imp); + + wasmFullPassI64(`(module + (import "" "paramAndResult" (param i64) (result i64)) + (func (result i64) (local i32) (local i64) + (set_local 0 (i32.const 0)) + (block $out + (loop $in + (set_local 1 (call 0 (i64.const 0x123456789abcdef0))) + (set_local 0 (i32.add (get_local 0) (i32.const 1))) + (if (i32.le_s (get_local 0) (i32.const ${ionThreshold})) (br $in)) + ) + ) + (get_local 1) + ) + (export "run" 1))`, { low: 1337, high: 0x12345678 }, imp); + + setJitCompilerOption('wasm.test-mode', 0); +} + +wasmFailValidateText(`(module (type $t (func)) (func (call_indirect $t (i32.const 0))))`, /can't call_indirect without a table/); + +var {v2i, i2i, i2v} = wasmEvalText(`(module + (type (func (result i32))) + (type (func (param i32) (result i32))) + (type (func (param i32))) + (func (type 0) (i32.const 13)) + (func (type 0) (i32.const 42)) + (func (type 1) (i32.add (get_local 0) (i32.const 1))) + (func (type 1) (i32.add (get_local 0) (i32.const 2))) + (func (type 1) (i32.add (get_local 0) (i32.const 3))) + (func (type 1) (i32.add (get_local 0) (i32.const 4))) + (table anyfunc (elem 0 1 2 3 4 5)) + (func (param i32) (result i32) (call_indirect 0 (get_local 0))) + (func (param i32) (param i32) (result i32) (call_indirect 1 (get_local 1) (get_local 0))) + (func (param i32) (call_indirect 2 (i32.const 0) (get_local 0))) + (export "v2i" 6) + (export "i2i" 7) + (export "i2v" 8) +)`).exports; + +const signatureMismatch = /indirect call signature mismatch/; + +assertEq(v2i(0), 13); +assertEq(v2i(1), 42); +assertErrorMessage(() => v2i(2), Error, signatureMismatch); +assertErrorMessage(() => v2i(3), Error, signatureMismatch); +assertErrorMessage(() => v2i(4), Error, signatureMismatch); +assertErrorMessage(() => v2i(5), Error, signatureMismatch); + +assertErrorMessage(() => i2i(0), Error, signatureMismatch); +assertErrorMessage(() => i2i(1), Error, signatureMismatch); +assertEq(i2i(2, 100), 101); +assertEq(i2i(3, 100), 102); +assertEq(i2i(4, 100), 103); +assertEq(i2i(5, 100), 104); + +assertErrorMessage(() => i2v(0), Error, signatureMismatch); +assertErrorMessage(() => i2v(1), Error, signatureMismatch); +assertErrorMessage(() => i2v(2), Error, signatureMismatch); +assertErrorMessage(() => i2v(3), Error, signatureMismatch); +assertErrorMessage(() => i2v(4), Error, signatureMismatch); +assertErrorMessage(() => i2v(5), Error, signatureMismatch); + +{ + enableSPSProfiling(); + + var stack; + wasmFullPass( + `(module + (type $v2v (func)) + (import $foo "" "f") + (func $a (call $foo)) + (func $b (result i32) (i32.const 0)) + (table anyfunc (elem $a $b)) + (func $bar (call_indirect $v2v (i32.const 0))) + (export "run" $bar) + )`, + undefined, + {"":{f:() => { stack = new Error().stack }}} + ); + + disableSPSProfiling(); + + var inner = stack.indexOf("wasm-function[1]"); + var outer = stack.indexOf("wasm-function[3]"); + assertEq(inner === -1, false); + assertEq(outer === -1, false); + assertEq(inner < outer, true); +} + +for (bad of [6, 7, 100, Math.pow(2,31)-1, Math.pow(2,31), Math.pow(2,31)+1, Math.pow(2,32)-2, Math.pow(2,32)-1]) { + assertThrowsInstanceOf(() => v2i(bad), WebAssembly.RuntimeError); + assertThrowsInstanceOf(() => i2i(bad, 0), WebAssembly.RuntimeError); + assertThrowsInstanceOf(() => i2v(bad, 0), WebAssembly.RuntimeError); +} + +wasmValidateText('(module (func $foo (nop)) (func (call $foo)))'); +wasmValidateText('(module (func (call $foo)) (func $foo (nop)))'); +wasmValidateText('(module (import $bar "" "a") (func (call $bar)) (func $foo (nop)))'); + +// ---------------------------------------------------------------------------- +// select + +wasmFailValidateText('(module (func (select (i32.const 0) (i32.const 0) (f32.const 0))))', mismatchError("f32", "i32")); + +wasmFailValidateText('(module (func (select (i32.const 0) (f32.const 0) (i32.const 0))) (export "" 0))', /select operand types must match/); +wasmFailValidateText('(module (func (select (block ) (i32.const 0) (i32.const 0))) (export "" 0))', /popping value from empty stack/); +assertEq(wasmEvalText('(module (func (select (return) (i32.const 0) (i32.const 0))) (export "" 0))').exports[""](), undefined); +assertEq(wasmEvalText('(module (func (i32.add (i32.const 0) (select (return) (i32.const 0) (i32.const 0)))) (export "" 0))').exports[""](), undefined); +wasmFailValidateText('(module (func (select (if i32 (i32.const 1) (i32.const 0) (f32.const 0)) (i32.const 0) (i32.const 0))) (export "" 0))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func) (func (select (call 0) (call 0) (i32.const 0))) (export "" 0))', /popping value from empty stack/); + +(function testSideEffects() { + +var numT = 0; +var numF = 0; + +var imports = {"": { + ifTrue: () => 1 + numT++, + ifFalse: () => -1 + numF++, +}} + +// Test that side-effects are applied on both branches. +var f = wasmEvalText(` +(module + (import "" "ifTrue" (result i32)) + (import "" "ifFalse" (result i32)) + (func (result i32) (param i32) + (select + (call 0) + (call 1) + (get_local 0) + ) + ) + (export "" 2) +) +`, imports).exports[""]; + +assertEq(f(-1), numT); +assertEq(numT, 1); +assertEq(numF, 1); + +assertEq(f(0), numF - 2); +assertEq(numT, 2); +assertEq(numF, 2); + +assertEq(f(1), numT); +assertEq(numT, 3); +assertEq(numF, 3); + +assertEq(f(0), numF - 2); +assertEq(numT, 4); +assertEq(numF, 4); + +assertEq(f(0), numF - 2); +assertEq(numT, 5); +assertEq(numF, 5); + +assertEq(f(1), numT); +assertEq(numT, 6); +assertEq(numF, 6); + +})(); + +function testSelect(type, trueVal, falseVal) { + + var trueJS = jsify(trueVal); + var falseJS = jsify(falseVal); + + // Always true condition + var alwaysTrue = wasmEvalText(` + (module + (func (result ${type}) (param i32) + (select + (${type}.const ${trueVal}) + (${type}.const ${falseVal}) + (i32.const 1) + ) + ) + (export "" 0) + ) + `, imports).exports[""]; + + assertEq(alwaysTrue(0), trueJS); + assertEq(alwaysTrue(1), trueJS); + assertEq(alwaysTrue(-1), trueJS); + + // Always false condition + var alwaysFalse = wasmEvalText(` + (module + (func (result ${type}) (param i32) + (select + (${type}.const ${trueVal}) + (${type}.const ${falseVal}) + (i32.const 0) + ) + ) + (export "" 0) + ) + `, imports).exports[""]; + + assertEq(alwaysFalse(0), falseJS); + assertEq(alwaysFalse(1), falseJS); + assertEq(alwaysFalse(-1), falseJS); + + // Variable condition + var f = wasmEvalText(` + (module + (func (result ${type}) (param i32) + (select + (${type}.const ${trueVal}) + (${type}.const ${falseVal}) + (get_local 0) + ) + ) + (export "" 0) + ) + `, imports).exports[""]; + + assertEq(f(0), falseJS); + assertEq(f(1), trueJS); + assertEq(f(-1), trueJS); + + wasmFullPass(` + (module + (func (result ${type}) (param i32) + (select + (${type}.const ${trueVal}) + (${type}.const ${falseVal}) + (get_local 0) + ) + ) + (export "run" 0) + )`, + trueJS, + imports, + 1); +} + +testSelect('i32', 13, 37); +testSelect('i32', Math.pow(2, 31) - 1, -Math.pow(2, 31)); + +testSelect('f32', Math.fround(13.37), Math.fround(19.89)); +testSelect('f32', 'infinity', '-0'); +testSelect('f32', 'nan', Math.pow(2, -31)); + +testSelect('f64', 13.37, 19.89); +testSelect('f64', 'infinity', '-0'); +testSelect('f64', 'nan', Math.pow(2, -31)); + +{ + setJitCompilerOption('wasm.test-mode', 1); + + var f = wasmEvalText(` + (module + (func (result i64) (param i32) + (select + (i64.const 0xc0010ff08badf00d) + (i64.const 0x12345678deadc0de) + (get_local 0) + ) + ) + (export "" 0) + )`, imports).exports[""]; + + assertEqI64(f(0), { low: 0xdeadc0de, high: 0x12345678}); + assertEqI64(f(1), { low: 0x8badf00d, high: 0xc0010ff0}); + assertEqI64(f(-1), { low: 0x8badf00d, high: 0xc0010ff0}); + + setJitCompilerOption('wasm.test-mode', 0); +} diff --git a/js/src/jit-test/tests/wasm/bce.js b/js/src/jit-test/tests/wasm/bce.js new file mode 100644 index 000000000..e3c88f3f0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/bce.js @@ -0,0 +1,196 @@ +// |jit-test| test-also-wasm-check-bce +load(libdir + "wasm.js"); + +mem='\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f'+ + '\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff'+ + '\x00'.repeat(65488) + + '\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff' + +let accessWidth = { + '8_s': 1, + '8_u': 1, + '16_s': 2, + '16_u': 2, + '': 4, + 'f32': 4, + 'f64': 8, +} + +let baseOp = { + '8_s': 'i32', + '8_u': 'i32', + '16_s': 'i32', + '16_u': 'i32', + '': 'i32', + 'f32': 'f32', + 'f64': 'f64', +} + +function toSigned(width, num) { + let unsignedMax = Math.pow(2, accessWidth[width] * 8) - 1; + let signedMax = Math.pow(2, accessWidth[width] * 8 - 1) - 1; + + return (num <= signedMax ? num : -(unsignedMax + 1 - num)); +} + +function fromLittleEndianNum(width, bytes) { + let base = 1; + var res = 0; + for (var i = 0; i < accessWidth[width]; i++) { + res += base * bytes[i]; + base *= 256; + } + return res; +} + +function getInt(width, offset, mem) { + var bytes = [ ]; + for (var i = offset; i < offset + accessWidth[width]; i++) { + if (i < mem.length) + bytes.push(mem.charCodeAt(i)); + else + bytes.push(0); + } + + var res = fromLittleEndianNum(width, bytes); + if (width == '8_s' || width == '16_s' || width == '') + res = toSigned(width, res); + return res; +} + +function loadTwiceModule(type, ext, offset, align) { + // TODO: Generate memory from byte string + return wasmEvalText( + `(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (data (i32.const 65520) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (func (param i32) (param i32) (result ${type}) + (drop (${type}.load${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (get_local 0) + )) + (${type}.load${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (get_local 1) + ) + ) (export "" 0))` + ).exports[""]; +} + +function loadTwiceSameBasePlusConstModule(type, ext, offset, align, addConst) { + return wasmEvalText( + `(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (data (i32.const 65520) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (func (param i32) (result ${type}) + (drop (${type}.load${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (get_local 0) + )) + (${type}.load${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (i32.add (get_local 0) (i32.const ${addConst})) + ) + ) (export "" 0))` + ).exports[""]; +} + +function loadTwiceSameBasePlusNonConstModule(type, ext, offset, align) { + return wasmEvalText( + `(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (data (i32.const 65520) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (func (param i32) (param i32) (result ${type}) + (drop (${type}.load${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (get_local 0) + )) + (${type}.load${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (i32.add (get_local 0) (get_local 1)) + ) + ) (export "" 0))` + ).exports[""]; +} + +/* + * On x64 falsely removed bounds checks will be masked by the signal handlers. + * Thus it is important that these tests be run on x86. + */ + +function testOOB(mod, args) { + assertErrorMessage(() => mod(...args), WebAssembly.RuntimeError, /index out of bounds/); +} + +function testOk(mod, args, expected, expectedType) { + if (expectedType === 'i64') + assertEqI64(mod(...args), createI64(expected)); + else + assertEq(mod(...args), expected); +} + +// TODO: It would be nice to verify how many BCs are eliminated on positive tests. + +const align = 0; +for (let offset of [0, 1, 2, 3, 4, 8, 16, 41, 0xfff8]) { + + var widths = ['8_s', '8_u', '16_s', '16_u', ''] + + for (let width of widths) { + // Accesses of 1 byte. + let lastValidIndex = 0x10000 - offset - accessWidth[width]; + let op = baseOp[width]; + + var mod = loadTwiceModule(op, width, offset, align); + + // Two consecutive loads from two different bases + testOk(mod, [lastValidIndex, lastValidIndex], getInt(width, lastValidIndex + offset, mem), op); + testOOB(mod, [lastValidIndex + 42, lastValidIndex + 42]); + testOOB(mod, [lastValidIndex, lastValidIndex + 42]); + + mod = loadTwiceSameBasePlusConstModule(op, width, offset, align, 1); + + testOk(mod, [lastValidIndex-1], getInt(width, lastValidIndex + offset, mem), op); + testOOB(mod, [lastValidIndex]); + + // Two consecutive loads from same base with different offsets + mod = loadTwiceSameBasePlusConstModule(op, width, offset, align, 2); + + testOk(mod, [lastValidIndex-2], getInt(width, lastValidIndex + offset, mem), op); + testOOB(mod, [lastValidIndex-1, 2]); + + mod = loadTwiceSameBasePlusConstModule(op, width, offset, align, lastValidIndex); + + testOk(mod, [0], getInt(width, lastValidIndex + offset, mem), op); + testOOB(mod, [1]); + + mod = loadTwiceSameBasePlusNonConstModule(op, width, offset, align); + testOk(mod, [0, 1], getInt(width, 1 + offset, mem), op); + testOk(mod, [0, lastValidIndex], getInt(width, lastValidIndex + offset, mem), op); + testOOB(mod, [1, lastValidIndex]) + + // TODO: All of the above with mixed loads and stores + + // TODO: Branching - what do we want? + + // TODO: Just loops + // - loop invariant checks + // - loop dependant checks remaining inbounds + // - loop dependant checks going out-of bounds. + // + // TODO: Loops + branching + // - loop invariant checks guarded by a loop invariant branch? + } +} diff --git a/js/src/jit-test/tests/wasm/big-resize.js b/js/src/jit-test/tests/wasm/big-resize.js new file mode 100644 index 000000000..9e3a62815 --- /dev/null +++ b/js/src/jit-test/tests/wasm/big-resize.js @@ -0,0 +1,10 @@ +load(libdir + "wasm.js"); + +wasmFullPass(`(module + (memory 1 32768) + (func $test (result i32) + (if (i32.eq (grow_memory (i32.const 16384)) (i32.const -1)) (return (i32.const 42))) + (i32.store (i32.const 1073807356) (i32.const 42)) + (i32.load (i32.const 1073807356))) + (export "run" $test) +)`, 42); diff --git a/js/src/jit-test/tests/wasm/binary.js b/js/src/jit-test/tests/wasm/binary.js new file mode 100644 index 000000000..f9455f6a4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/binary.js @@ -0,0 +1,385 @@ +load(libdir + "wasm.js"); +load(libdir + "wasm-binary.js"); + +const CompileError = WebAssembly.CompileError; + +const magicError = /failed to match magic number/; +const unknownSection = /expected user-defined section/; + +function sectionError(section) { + return RegExp(`failed to start ${section} section`); +} + +function versionError(actual) { + var expect = encodingVersion; + var str = `binary version 0x${actual.toString(16)} does not match expected version 0x${expect.toString(16)}`; + return RegExp(str); +} + +function toU8(array) { + for (let b of array) + assertEq(b < 256, true); + return Uint8Array.from(array); +} + +function varU32(u32) { + assertEq(u32 >= 0, true); + assertEq(u32 < Math.pow(2,32), true); + var bytes = []; + do { + var byte = u32 & 0x7f; + u32 >>>= 7; + if (u32 != 0) + byte |= 0x80; + bytes.push(byte); + } while (u32 != 0); + return bytes; +} + +function varS32(s32) { + assertEq(s32 >= -Math.pow(2,31), true); + assertEq(s32 < Math.pow(2,31), true); + var bytes = []; + do { + var byte = s32 & 0x7f; + s32 >>= 7; + if (s32 != 0 && s32 != -1) + byte |= 0x80; + bytes.push(byte); + } while (s32 != 0 && s32 != -1); + return bytes; +} + +const U32MAX_LEB = [255, 255, 255, 255, 15]; + +const wasmEval = (code, imports) => new WebAssembly.Instance(new WebAssembly.Module(code), imports).exports; + +assertErrorMessage(() => wasmEval(toU8([])), CompileError, magicError); +assertErrorMessage(() => wasmEval(toU8([42])), CompileError, magicError); +assertErrorMessage(() => wasmEval(toU8([magic0, magic1, magic2])), CompileError, magicError); +assertErrorMessage(() => wasmEval(toU8([1,2,3,4])), CompileError, magicError); +assertErrorMessage(() => wasmEval(toU8([magic0, magic1, magic2, magic3])), CompileError, versionError(0x6d736100)); +assertErrorMessage(() => wasmEval(toU8([magic0, magic1, magic2, magic3, 1])), CompileError, versionError(0x6d736100)); +assertErrorMessage(() => wasmEval(toU8([magic0, magic1, magic2, magic3, ver0])), CompileError, versionError(0x6d736100)); +assertErrorMessage(() => wasmEval(toU8([magic0, magic1, magic2, magic3, ver0, ver1, ver2])), CompileError, versionError(0x6d736100)); + +// This test should be removed shortly. +assertEq(WebAssembly.validate(toU8([magic0, magic1, magic2, magic3, 0xd, 0x0, 0x0, 0x0])), true); + +function moduleHeaderThen(...rest) { + return [magic0, magic1, magic2, magic3, ver0, ver1, ver2, ver3, ...rest]; +} + +var o = wasmEval(toU8(moduleHeaderThen())); +assertEq(Object.getOwnPropertyNames(o).length, 0); + +// unfinished known sections +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(typeId))), CompileError, sectionError("type")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(importId))), CompileError, sectionError("import")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(functionId))), CompileError, sectionError("function")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(tableId))), CompileError, sectionError("table")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(memoryId))), CompileError, sectionError("memory")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(globalId))), CompileError, sectionError("global")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(exportId))), CompileError, sectionError("export")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(startId))), CompileError, sectionError("start")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(elemId))), CompileError, sectionError("elem")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(codeId))), CompileError, sectionError("code")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(dataId))), CompileError, sectionError("data")); + +// unknown sections are unconditionally rejected +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(42))), CompileError, unknownSection); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(42, 0))), CompileError, unknownSection); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(42, 1, 0))), CompileError, unknownSection); + +// user sections have special rules +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(0))), CompileError, sectionError("user-defined")); // no length +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(0, 0))), CompileError, sectionError("user-defined")); // no id +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(0, 0, 0))), CompileError, sectionError("user-defined")); // payload too small to have id length +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(0, 1, 1))), CompileError, sectionError("user-defined")); // id not present +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(0, 1, 1, 65))), CompileError, sectionError("user-defined")); // id length doesn't fit in section +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(0, 1, 0, 0))), CompileError, sectionError("user-defined")); // second, unfinished user-defined section +wasmEval(toU8(moduleHeaderThen(0, 1, 0))); // empty id +wasmEval(toU8(moduleHeaderThen(0, 1, 0, 0, 1, 0))); // 2x empty id +wasmEval(toU8(moduleHeaderThen(0, 2, 1, 65))); // id = "A" + +function string(name) { + var nameBytes = name.split('').map(c => { + var code = c.charCodeAt(0); + assertEq(code < 128, true); // TODO + return code + }); + return varU32(nameBytes.length).concat(nameBytes); +} + +function encodedString(name, len) { + var name = unescape(encodeURIComponent(name)); // break into string of utf8 code points + var nameBytes = name.split('').map(c => c.charCodeAt(0)); // map to array of numbers + return varU32(len === undefined ? nameBytes.length : len).concat(nameBytes); +} + +function moduleWithSections(sectionArray) { + var bytes = moduleHeaderThen(); + for (let section of sectionArray) { + bytes.push(section.name); + bytes.push(...varU32(section.body.length)); + bytes.push(...section.body); + } + return toU8(bytes); +} + +function sigSection(sigs) { + var body = []; + body.push(...varU32(sigs.length)); + for (let sig of sigs) { + body.push(...varU32(FuncCode)); + body.push(...varU32(sig.args.length)); + for (let arg of sig.args) + body.push(...varU32(arg)); + body.push(...varU32(sig.ret == VoidCode ? 0 : 1)); + if (sig.ret != VoidCode) + body.push(...varU32(sig.ret)); + } + return { name: typeId, body }; +} + +function declSection(decls) { + var body = []; + body.push(...varU32(decls.length)); + for (let decl of decls) + body.push(...varU32(decl)); + return { name: functionId, body }; +} + +function funcBody(func) { + var body = varU32(func.locals.length); + for (let local of func.locals) + body.push(...varU32(local)); + body = body.concat(...func.body); + body.push(EndCode); + body.splice(0, 0, ...varU32(body.length)); + return body; +} + +function bodySection(bodies) { + var body = varU32(bodies.length).concat(...bodies); + return { name: codeId, body }; +} + +function importSection(imports) { + var body = []; + body.push(...varU32(imports.length)); + for (let imp of imports) { + body.push(...string(imp.module)); + body.push(...string(imp.func)); + body.push(...varU32(FunctionCode)); + body.push(...varU32(imp.sigIndex)); + } + return { name: importId, body }; +} + +function exportSection(exports) { + var body = []; + body.push(...varU32(exports.length)); + for (let exp of exports) { + body.push(...string(exp.name)); + body.push(...varU32(FunctionCode)); + body.push(...varU32(exp.funcIndex)); + } + return { name: exportId, body }; +} + +function tableSection(initialSize) { + var body = []; + body.push(...varU32(1)); // number of tables + body.push(...varU32(AnyFuncCode)); + body.push(...varU32(0x0)); // for now, no maximum + body.push(...varU32(initialSize)); + return { name: tableId, body }; +} + +function memorySection(initialSize) { + var body = []; + body.push(...varU32(1)); // number of memories + body.push(...varU32(0x0)); // for now, no maximum + body.push(...varU32(initialSize)); + return { name: memoryId, body }; +} + +function elemSection(elemArrays) { + var body = []; + body.push(...varU32(elemArrays.length)); + for (let array of elemArrays) { + body.push(...varU32(0)); // table index + body.push(...varU32(I32ConstCode)); + body.push(...varS32(array.offset)); + body.push(...varU32(EndCode)); + body.push(...varU32(array.elems.length)); + for (let elem of array.elems) + body.push(...varU32(elem)); + } + return { name: elemId, body }; +} + +function nameSection(elems) { + var body = []; + body.push(...string(nameName)); + body.push(...varU32(elems.length)); + for (let fn of elems) { + body.push(...encodedString(fn.name, fn.nameLen)); + if (!fn.locals) { + body.push(...varU32(0)); + continue; + } + body.push(...varU32(fn.locals.length)); + for (let local of fn.locals) + body.push(...encodedString(local.name, local.nameLen)); + } + return { name: userDefinedId, body }; +} + +function userDefinedSection(name, ...body) { + return { name: userDefinedId, body: [...string(name), ...body] }; +} + +const v2vSig = {args:[], ret:VoidCode}; +const i2vSig = {args:[I32Code], ret:VoidCode}; +const v2vBody = funcBody({locals:[], body:[]}); + +assertErrorMessage(() => wasmEval(moduleWithSections([ {name: typeId, body: U32MAX_LEB } ])), CompileError, /too many signatures/); +assertErrorMessage(() => wasmEval(moduleWithSections([ {name: typeId, body: [1, 0], } ])), CompileError, /expected function form/); +assertErrorMessage(() => wasmEval(moduleWithSections([ {name: typeId, body: [1, FuncCode, ...U32MAX_LEB], } ])), CompileError, /too many arguments in signature/); + +assertThrowsInstanceOf(() => wasmEval(moduleWithSections([{name: typeId, body: [1]}])), CompileError); +assertThrowsInstanceOf(() => wasmEval(moduleWithSections([{name: typeId, body: [1, 1, 0]}])), CompileError); + +wasmEval(moduleWithSections([sigSection([])])); +wasmEval(moduleWithSections([sigSection([v2vSig])])); +wasmEval(moduleWithSections([sigSection([i2vSig])])); +wasmEval(moduleWithSections([sigSection([v2vSig, i2vSig])])); + +assertErrorMessage(() => wasmEval(moduleWithSections([sigSection([{args:[], ret:100}])])), CompileError, /bad type/); +assertErrorMessage(() => wasmEval(moduleWithSections([sigSection([{args:[100], ret:VoidCode}])])), CompileError, /bad type/); + +assertThrowsInstanceOf(() => wasmEval(moduleWithSections([sigSection([]), declSection([0])])), CompileError, /signature index out of range/); +assertThrowsInstanceOf(() => wasmEval(moduleWithSections([sigSection([v2vSig]), declSection([1])])), CompileError, /signature index out of range/); +assertErrorMessage(() => wasmEval(moduleWithSections([sigSection([v2vSig]), declSection([0])])), CompileError, /expected function bodies/); +wasmEval(moduleWithSections([sigSection([v2vSig]), declSection([0]), bodySection([v2vBody])])); + +assertErrorMessage(() => wasmEval(moduleWithSections([sigSection([v2vSig]), declSection([0]), bodySection([v2vBody.concat(v2vBody)])])), CompileError, /byte size mismatch in code section/); + +assertThrowsInstanceOf(() => wasmEval(moduleWithSections([sigSection([v2vSig]), {name: importId, body:[]}])), CompileError); +assertErrorMessage(() => wasmEval(moduleWithSections([importSection([{sigIndex:0, module:"a", func:"b"}])])), CompileError, /signature index out of range/); +assertErrorMessage(() => wasmEval(moduleWithSections([sigSection([v2vSig]), importSection([{sigIndex:1, module:"a", func:"b"}])])), CompileError, /signature index out of range/); +wasmEval(moduleWithSections([sigSection([v2vSig]), importSection([])])); +wasmEval(moduleWithSections([sigSection([v2vSig]), importSection([{sigIndex:0, module:"a", func:""}])]), {a:{"":()=>{}}}); + +wasmEval(moduleWithSections([ + sigSection([v2vSig]), + importSection([{sigIndex:0, module:"a", func:""}]), + declSection([0]), + bodySection([v2vBody]) +]), {a:{"":()=>{}}}); + +assertErrorMessage(() => wasmEval(moduleWithSections([ {name: dataId, body: [], } ])), CompileError, /data section requires a memory section/); + +wasmEval(moduleWithSections([tableSection(0)])); +wasmEval(moduleWithSections([elemSection([])])); +wasmEval(moduleWithSections([tableSection(0), elemSection([])])); +wasmEval(moduleWithSections([tableSection(1), elemSection([{offset:1, elems:[]}])])); +assertErrorMessage(() => wasmEval(moduleWithSections([tableSection(1), elemSection([{offset:0, elems:[0]}])])), CompileError, /table element out of range/); +wasmEval(moduleWithSections([sigSection([v2vSig]), declSection([0]), tableSection(1), elemSection([{offset:0, elems:[0]}]), bodySection([v2vBody])])); +wasmEval(moduleWithSections([sigSection([v2vSig]), declSection([0]), tableSection(2), elemSection([{offset:0, elems:[0,0]}]), bodySection([v2vBody])])); +assertErrorMessage(() => wasmEval(moduleWithSections([sigSection([v2vSig]), declSection([0]), tableSection(2), elemSection([{offset:0, elems:[0,1]}]), bodySection([v2vBody])])), CompileError, /table element out of range/); +wasmEval(moduleWithSections([sigSection([v2vSig]), declSection([0,0,0]), tableSection(4), elemSection([{offset:0, elems:[0,1,0,2]}]), bodySection([v2vBody, v2vBody, v2vBody])])); +wasmEval(moduleWithSections([sigSection([v2vSig,i2vSig]), declSection([0,0,1]), tableSection(3), elemSection([{offset:0,elems:[0,1,2]}]), bodySection([v2vBody, v2vBody, v2vBody])])); + +function invalidTableSection0() { + var body = []; + body.push(...varU32(0)); // number of tables + return { name: tableId, body }; +} + +assertErrorMessage(() => wasmEval(moduleWithSections([invalidTableSection0()])), CompileError, /number of tables must be exactly one/); + +wasmEval(moduleWithSections([memorySection(0)])); + +function invalidMemorySection0() { + var body = []; + body.push(...varU32(0)); // number of memories + return { name: memoryId, body }; +} + +assertErrorMessage(() => wasmEval(moduleWithSections([invalidMemorySection0()])), CompileError, /number of memories must be exactly one/); + +// Test early 'end' +const bodyMismatch = /function body length mismatch/; +assertErrorMessage(() => wasmEval(moduleWithSections([sigSection([v2vSig]), declSection([0]), bodySection([funcBody({locals:[], body:[EndCode]})])])), CompileError, bodyMismatch); +assertErrorMessage(() => wasmEval(moduleWithSections([sigSection([v2vSig]), declSection([0]), bodySection([funcBody({locals:[], body:[UnreachableCode,EndCode]})])])), CompileError, bodyMismatch); +assertErrorMessage(() => wasmEval(moduleWithSections([sigSection([v2vSig]), declSection([0]), bodySection([funcBody({locals:[], body:[EndCode,UnreachableCode]})])])), CompileError, bodyMismatch); + +// Deep nesting shouldn't crash or even throw. +var manyBlocks = []; +for (var i = 0; i < 20000; i++) + manyBlocks.push(BlockCode, VoidCode, EndCode); +wasmEval(moduleWithSections([sigSection([v2vSig]), declSection([0]), bodySection([funcBody({locals:[], body:manyBlocks})])])); + +// Ignore errors in name section. +var tooBigNameSection = { + name: userDefinedId, + body: [...string(nameName), ...varU32(Math.pow(2, 31))] // declare 2**31 functions. +}; +wasmEval(moduleWithSections([tooBigNameSection])); + +// Skip user-defined sections before any expected section +var userDefSec = userDefinedSection("wee", 42, 13); +var sigSec = sigSection([v2vSig]); +var declSec = declSection([0]); +var bodySec = bodySection([v2vBody]); +wasmEval(moduleWithSections([userDefSec, sigSec, declSec, bodySec])); +wasmEval(moduleWithSections([sigSec, userDefSec, declSec, bodySec])); +wasmEval(moduleWithSections([sigSec, declSec, userDefSec, bodySec])); +wasmEval(moduleWithSections([sigSec, declSec, bodySec, userDefSec])); +wasmEval(moduleWithSections([userDefSec, userDefSec, sigSec, declSec, bodySec])); +wasmEval(moduleWithSections([userDefSec, userDefSec, sigSec, userDefSec, declSec, userDefSec, bodySec])); + +// Diagnose nonstandard block signature types. +for (var bad of [0xff, 0, 1, 0x3f]) + assertErrorMessage(() => wasmEval(moduleWithSections([sigSection([v2vSig]), declSection([0]), bodySection([funcBody({locals:[], body:[BlockCode, bad, EndCode]})])])), CompileError, /invalid inline block type/); + +// Checking stack trace. +function runStackTraceTest(namesContent, expectedName) { + var sections = [ + sigSection([v2vSig]), + importSection([{sigIndex:0, module:"env", func:"callback"}]), + declSection([0]), + exportSection([{funcIndex:1, name: "run"}]), + bodySection([funcBody({locals: [], body: [CallCode, varU32(0)]})]), + userDefinedSection("whoa"), + userDefinedSection("wee", 42), + ]; + if (namesContent) + sections.push(nameSection(namesContent)); + sections.push(userDefinedSection("yay", 13)); + + var result = ""; + var callback = () => { + var prevFrameEntry = new Error().stack.split('\n')[1]; + result = prevFrameEntry.split('@')[0]; + }; + wasmEval(moduleWithSections(sections), {"env": { callback }}).run(); + assertEq(result, expectedName); +}; + +runStackTraceTest(null, 'wasm-function[1]'); +runStackTraceTest([{name:'blah'}, {name: 'test'}], 'test'); +runStackTraceTest([{name:'blah'}, {name: 'test', locals: [{name: 'var1'}, {name: 'var2'}]}], 'test'); +runStackTraceTest([{name:'blah'}, {name: 'test', locals: [{name: 'var1'}, {name: 'var2'}]}], 'test'); +runStackTraceTest([{name:'blah'}, {name: 'test1'}, {name: 'test2'}], 'test1'); +runStackTraceTest([{name:'blah'}, {name: 'test☃'}], 'test☃'); +runStackTraceTest([{name:'blah'}, {name: 'te\xE0\xFF'}], 'te\xE0\xFF'); +runStackTraceTest([{name:'blah'}], 'wasm-function[1]'); +runStackTraceTest([], 'wasm-function[1]'); +// Notice that invalid names section content shall not fail the parsing +runStackTraceTest([{name:'blah'}, {nameLen: 100, name: 'test'}], 'wasm-function[1]'); // invalid name size +runStackTraceTest([{name:'blah'}, {name: 'test', locals: [{nameLen: 40, name: 'var1'}]}], 'wasm-function[1]'); // invalid variable name size +runStackTraceTest([{name:'blah'}, {name: ''}], 'wasm-function[1]'); // empty name diff --git a/js/src/jit-test/tests/wasm/comments.js b/js/src/jit-test/tests/wasm/comments.js new file mode 100644 index 000000000..5bdc77b3c --- /dev/null +++ b/js/src/jit-test/tests/wasm/comments.js @@ -0,0 +1,33 @@ +load(libdir + "wasm.js"); + +// sanity check +assertErrorMessage(() => wasmEvalText(''), SyntaxError, /parsing wasm text/); + +// single line comment +var o = wasmEvalText('(module (func)) ;; end'); +var o = wasmEvalText('(module (func)) ;; end\n'); +var o = wasmEvalText('(module (func))\n;; end'); +var o = wasmEvalText('(module (func))\n;; end'); +var o = wasmEvalText(';;start\n(module (func))'); +var o = wasmEvalText('(module (func ;; middle\n))'); +var o = wasmEvalText('(module (func) ;; middle\n (export "a" 0))').exports; +assertEq(Object.getOwnPropertyNames(o)[0], "a"); + +// multi-line comments +var o = wasmEvalText('(module (func))(; end ;)'); +var o = wasmEvalText('(module (func)) (; end\nmulti;)\n'); +var o = wasmEvalText('(module (func))\n(;;)'); +var o = wasmEvalText('(;start;)(module (func))'); +var o = wasmEvalText('(;start;)\n(module (func))'); +var o = wasmEvalText('(module (func (; middle\n multi\n;)))'); +var o = wasmEvalText('(module (func)(;middle;)(export "a" 0))').exports; +assertEq(Object.getOwnPropertyNames(o)[0], "a"); + +// nested comments +var o = wasmEvalText('(module (;nested(;comment;);)(func (;;;;)))'); +var o = wasmEvalText(';;;;;;;;;;\n(module ;;(;n \n(func (;\n;;;)))'); + +assertErrorMessage(() => wasmEvalText(';; only comment'), SyntaxError, /parsing wasm text/); +assertErrorMessage(() => wasmEvalText(';; only comment\n'), SyntaxError, /parsing wasm text/); +assertErrorMessage(() => wasmEvalText('(; only comment ;)'), SyntaxError, /parsing wasm text/); +assertErrorMessage(() => wasmEvalText(';; only comment\n'), SyntaxError, /parsing wasm text/); diff --git a/js/src/jit-test/tests/wasm/compiler-frame-depth.js b/js/src/jit-test/tests/wasm/compiler-frame-depth.js new file mode 100644 index 000000000..fdde919ba --- /dev/null +++ b/js/src/jit-test/tests/wasm/compiler-frame-depth.js @@ -0,0 +1,20 @@ +load(libdir + "wasm.js"); + +// Ensures that the postorder allows us to have very deep expression trees. + +var expr = '(get_local 0)'; + +for (var i = 1000; i --> 0; ) { + expr = `(f32.neg ${expr})`; +} + +var code = `(module + (func + (result f32) + (param f32) + ${expr} + ) + (export "run" 0) +)`; + +wasmFullPass(code, Math.fround(13.37), {}, 13.37); diff --git a/js/src/jit-test/tests/wasm/const.js b/js/src/jit-test/tests/wasm/const.js new file mode 100644 index 000000000..a168e131d --- /dev/null +++ b/js/src/jit-test/tests/wasm/const.js @@ -0,0 +1,263 @@ +load(libdir + "wasm.js"); + +function testConst(type, str, expect) { + if (type === 'i64') + wasmFullPassI64(`(module (func (result i64) (i64.const ${str})) (export "run" 0))`, expect); + else + wasmFullPass(`(module (func (result ${type}) (${type}.const ${str})) (export "run" 0))`, expect); +} + +function testConstError(type, str) { + // For now at least, we don't distinguish between parse errors and OOMs. + assertErrorMessage(() => wasmEvalText(`(module (func (result ${type}) (${type}.const ${str})) (export "" 0))`).exports[""](), Error, /parsing wasm text/); +} + +testConst('i32', '0', 0); +testConst('i32', '-0', 0); +testConst('i32', '23', 23); +testConst('i32', '-23', -23); +testConst('i32', '0x23', 35); +testConst('i32', '-0x23', -35); +testConst('i32', '2147483647', 2147483647); +testConst('i32', '4294967295', -1); +testConst('i32', '-2147483648', -2147483648); +testConst('i32', '0x7fffffff', 2147483647); +testConst('i32', '0x80000000', -2147483648); +testConst('i32', '-0x80000000', -2147483648); +testConst('i32', '0xffffffff', -1); + +{ + setJitCompilerOption('wasm.test-mode', 1); + + testConst('i64', '0', 0); + testConst('i64', '-0', 0); + + testConst('i64', '23', 23); + testConst('i64', '-23', -23); + + testConst('i64', '0x23', 35); + testConst('i64', '-0x23', -35); + + testConst('i64', '-0x1', -1); + testConst('i64', '-1', -1); + testConst('i64', '0xffffffffffffffff', -1); + + testConst('i64', '0xdeadc0de', {low: 0xdeadc0de, high: 0x0}); + testConst('i64', '0x1337c0de00000000', {low: 0x0, high: 0x1337c0de}); + + testConst('i64', '0x0102030405060708', {low: 0x05060708, high: 0x01020304}); + testConst('i64', '-0x0102030405060708', {low: -0x05060708, high: -0x01020305}); + + // INT64_MAX + testConst('i64', '9223372036854775807', {low: 0xffffffff, high: 0x7fffffff}); + testConst('i64', '0x7fffffffffffffff', {low: 0xffffffff, high: 0x7fffffff}); + + // INT64_MAX + 1 + testConst('i64', '9223372036854775808', {low: 0x00000000, high: 0x80000000}); + testConst('i64', '0x8000000000000000', {low: 0x00000000, high: 0x80000000}); + + // UINT64_MAX + testConst('i64', '18446744073709551615', {low: 0xffffffff, high: 0xffffffff}); + + // INT64_MIN + testConst('i64', '-9223372036854775808', {low: 0x00000000, high: 0x80000000}); + testConst('i64', '-0x8000000000000000', {low: 0x00000000, high: 0x80000000}); + + // INT64_MIN - 1 + testConstError('i64', '-9223372036854775809'); + + testConstError('i64', ''); + testConstError('i64', '0.0'); + testConstError('i64', 'not an i64'); + + setJitCompilerOption('wasm.test-mode', 0); +} + +testConst('f32', '0.0', 0.0); +testConst('f32', '-0', -0.0); +testConst('f32', '-0.0', -0.0); +testConst('f32', '0x0.0', 0.0); +testConst('f32', '-0x0.0', -0.0); +testConst('f32', '-0x0', -0.0); +testConst('f32', '0x0.0p0', 0.0); +testConst('f32', '-0x0.0p0', -0.0); +testConst('f32', 'infinity', Infinity); +testConst('f32', '-infinity', -Infinity); +testConst('f32', '+infinity', Infinity); +testConst('f32', 'nan', NaN); +//testConst('f32', '-nan', NaN); // TODO: NYI +testConst('f32', '+nan', NaN); +//testConst('f32', 'nan:0x789', NaN); // TODO: NYI +//testConst('f32', '-nan:0x789', NaN); // TODO: NYI +//testConst('f32', '+nan:0x789', NaN); // TODO: NYI +testConst('f32', '0x01p-149', 1.401298464324817e-45); +testConst('f32', '0x1p-149', 1.401298464324817e-45); +testConst('f32', '0x1p-150', 0); +testConst('f32', '0x2p-150', 1.401298464324817e-45); +testConst('f32', '0x1.2p-149', 1.401298464324817e-45); +testConst('f32', '0x2.0p-149', 2.802596928649634e-45); +testConst('f32', '0x2.2p-149', 2.802596928649634e-45); +testConst('f32', '0x01p-148', 2.802596928649634e-45); +testConst('f32', '0x0.1p-148', 0); +testConst('f32', '0x0.1p-145', 1.401298464324817e-45); +testConst('f32', '0x1p-148', 2.802596928649634e-45); +testConst('f32', '0x1.111p-148', 2.802596928649634e-45); +testConst('f32', '0x1.2p-148', 2.802596928649634e-45); +testConst('f32', '0x2.0p-148', 5.605193857299268e-45); +testConst('f32', '0x2.2p-148', 5.605193857299268e-45); +testConst('f32', '0x1p-147', 5.605193857299268e-45); +testConst('f32', '0x1p-126', 1.1754943508222875e-38); +testConst('f32', '0x0.1fffffep+131', 3.4028234663852886e+38); +testConst('f32', '0x1.fffffep+127', 3.4028234663852886e+38); +testConst('f32', '0x2.0p+127', Infinity); +testConst('f32', '0x1.fffffep+128', Infinity); +testConst('f32', '0x0.1fffffep+128', 4.2535293329816107e+37); +testConst('f32', '0x1p2', 4); +testConst('f32', '0x10p2', 64); +testConst('f32', '0x100p2', 1024); +testConst('f32', '0x2p2', 8); +testConst('f32', '0x4p2', 16); +testConst('f32', '0x1p3', 8); +testConst('f32', '0x1p4', 16); +testConst('f32', '-0x1p+3', -8); +testConst('f32', '0x3p-2', .75); +testConst('f32', '-0x76.54p-32', -2.7550413506105542e-8); +testConst('f32', '0xf.ffffffffffffffffp+123', 170141183460469231731687303715884105728); +testConst('f32', '0xf.ffffffffffffffffp+124', Infinity); +testConst('f32', '1.1754943508222875e-38', 1.1754943508222875e-38); +testConst('f32', '3.4028234663852886e+38', 3.4028234663852886e+38); +testConst('f32', '1.1754943508222875e-35', 1.1754943508222875e-35); +testConst('f32', '3.4028234663852886e+35', 3.4028234346940236e+35); +testConst('f32', '1.1754943508222875e-30', 1.1754943508222875e-30); +testConst('f32', '3.4028234663852886e+30', 3.4028233462973677e+30); +testConst('f32', '4.0', 4); +testConst('f32', '-8.', -8); +testConst('f32', '-2.7550413506105542e-8', -2.7550413506105542e-8); +testConst('f32', '2.138260e+05', 2.138260e+05); +testConst('f32', '3.891074380317903e-33', 3.891074380317903e-33); +testConst('f32', '-9465807272673280.0', -9465807272673280); +testConst('f32', '1076.1376953125', 1076.1376953125); +testConst('f32', '-13364.1376953125', -13364.1376953125); +testConst('f32', '4.133607864379883', 4.133607864379883); +testConst('f32', '2.0791168212890625', 2.0791168212890625); +testConst('f32', '0.000002414453774690628', 0.000002414453774690628); +testConst('f32', '0.5312881469726562', 0.5312881469726562); +testConst('f32', '5.570960e+05', 5.570960e+05); +testConst('f32', '5.066758603788912e-7', 5.066758603788912e-7); +testConst('f32', '-5.066758603788912e-7', -5.066758603788912e-7); +testConst('f32', '1.875000e-01', 1.875000e-01); +testConst('f32', '-0x1.b021fb98e9a17p-104', -8.322574059965897e-32); +testConst('f32', '0x1.08de5bf3f784cp-129', 1.5202715065429227e-39); +testConst('f32', '0x1.d50b969fbbfb3p+388', Infinity); +testConst('f32', '0x3434.2p4', 2.138260e+05); +testConst('f32', '0x1434.2p-120', 3.891074380317903e-33); +testConst('f32', '-0x0434.234p43', -9465807272673280); +testConst('f32', '0x0434.234p0', 1076.1376953125); +testConst('f32', '-0x3434.234p0', -13364.1376953125); +testConst('f32', '0x4.22342p0', 4.133607864379883); +testConst('f32', '0x30000p-20', 1.875000e-01); +testConst('f32', '0x0.533fcccp-125', 7.645233588931088e-39); +testConst('f32', '0', 0); + +testConst('f64', '0.0', 0.0); +testConst('f64', '-0.0', -0.0); +testConst('f64', '-0', -0.0); +testConst('f64', '0x0.0', 0.0); +testConst('f64', '-0x0.0', -0.0); +testConst('f64', '-0x0', -0.0); +testConst('f64', '0x0.0p0', 0.0); +testConst('f64', '-0x0.0p0', -0.0); +testConst('f64', 'infinity', Infinity); +testConst('f64', '-infinity', -Infinity); +testConst('f64', '+infinity', Infinity); +testConst('f64', 'nan', NaN); +//testConst('f64', '-nan', NaN); // TODO: NYI +testConst('f64', '+nan', NaN); +//testConst('f64', 'nan:0x789', NaN); // TODO: NYI +//testConst('f64', '-nan:0x789', NaN); // TODO: NYI +//testConst('f64', '+nan:0x789', NaN); // TODO: NYI +testConst('f64', '0x01p-149', 1.401298464324817e-45); +testConst('f64', '0x1p-149', 1.401298464324817e-45); +testConst('f64', '0x1p-150', 7.006492321624085e-46); +testConst('f64', '0x2p-150', 1.401298464324817e-45); +testConst('f64', '0x1.2p-149', 1.5764607723654192e-45); +testConst('f64', '0x2.0p-149', 2.802596928649634e-45); +testConst('f64', '0x2.2p-149', 2.977759236690236e-45); +testConst('f64', '0x01p-148', 2.802596928649634e-45); +testConst('f64', '0x0.1p-148', 1.7516230804060213e-46); +testConst('f64', '0x0.1p-145', 1.401298464324817e-45); +testConst('f64', '0x1p-148', 2.802596928649634e-45); +testConst('f64', '0x1.111p-148', 2.9893911087085575e-45); +testConst('f64', '0x1.2p-148', 3.1529215447308384e-45); +testConst('f64', '0x2.0p-148', 5.605193857299268e-45); +testConst('f64', '0x2.2p-148', 5.955518473380473e-45); +testConst('f64', '0x1p-147', 5.605193857299268e-45); +testConst('f64', '0x1p-126', 1.1754943508222875e-38); +testConst('f64', '0x0.1fffffep+131', 3.4028234663852886e+38); +testConst('f64', '0x1.fffffep+127', 3.4028234663852886e+38); +testConst('f64', '0x2.0p+127', 3.402823669209385e+38); +testConst('f64', '0x1.fffffep+128', 6.805646932770577e+38); +testConst('f64', '0x0.1fffffep+128', 4.2535293329816107e+37); +testConst('f64', '0x1p2', 4); +testConst('f64', '0x10p2', 64); +testConst('f64', '0x100p2', 1024); +testConst('f64', '0x2p2', 8); +testConst('f64', '0x4p2', 16); +testConst('f64', '0x1p3', 8); +testConst('f64', '0x1p4', 16); +testConst('f64', '-0x1p+3', -8); +testConst('f64', '0x3p-2', .75); +testConst('f64', '-0x76.54p-32', -2.7550413506105542e-8); +testConst('f64', '1.1754943508222875e-38', 1.1754943508222875e-38); +testConst('f64', '3.4028234663852886e+38', 3.4028234663852886e+38); +testConst('f64', '1.1754943508222875e-35', 1.1754943508222875e-35); +testConst('f64', '3.4028234663852886e+35', 3.4028234663852886e+35); +testConst('f64', '1.1754943508222875e-30', 1.1754943508222875e-30); +testConst('f64', '3.4028234663852886e+30', 3.402823466385289e+30); +testConst('f64', '4.0', 4); +testConst('f64', '-8.', -8); +testConst('f64', '-2.7550413506105542e-8', -2.7550413506105542e-8); +testConst('f64', '2.138260e+05', 2.138260e+05); +testConst('f64', '3.891074380317903e-33', 3.891074380317903e-33); +testConst('f64', '-9465807272673280.0', -9465807272673280); +testConst('f64', '1076.1376953125', 1076.1376953125); +testConst('f64', '-13364.1376953125', -13364.1376953125); +testConst('f64', '4.133607864379883', 4.133607864379883); +testConst('f64', '2.0791168212890625', 2.0791168212890625); +testConst('f64', '0.000002414453774690628', 0.000002414453774690628); +testConst('f64', '0.5312881469726562', 0.5312881469726562); +testConst('f64', '5.570960e+05', 5.570960e+05); +testConst('f64', '5.066758603788912e-7', 5.066758603788912e-7); +testConst('f64', '-5.066758603788912e-7', -5.066758603788912e-7); +testConst('f64', '1.875000e-01', 1.875000e-01); +testConst('f64', '0x3434.2p4', 2.138260e+05); +testConst('f64', '0x1434.2p-120', 3.891074380317903e-33); +testConst('f64', '-0x0434.234p43', -9465807272673280); +testConst('f64', '0x0434.234p0', 1076.1376953125); +testConst('f64', '-0x3434.234p0', -13364.1376953125); +testConst('f64', '0x4.22342p0', 4.133607864379883); +testConst('f64', '0x4.2882000p-1', 2.0791168212890625); +testConst('f64', '0x30000p-20', 1.875000e-01); +testConst('f64', '0x2f05.000bef2113p-1036', 1.634717678224908e-308); +testConst('f64', '0x24c6.004d0deaa3p-1036', 1.2784941357502007e-308); +testConst('f64', '0', 0); + +testConstError('i32', ''); +testConstError('i32', '0.0'); +testConstError('i32', 'not an i32'); +testConstError('i32', '4294967296'); +testConstError('i32', '-2147483649'); + +testConstError('f32', ''); +testConstError('f32', 'not an f32'); +testConstError('f32', 'nan:'); +testConstError('f32', 'nan:0'); +testConstError('f32', 'nan:0x'); +testConstError('f32', 'nan:0x0'); + +testConstError('f64', ''); +testConstError('f64', 'not an f64'); +testConstError('f64', 'nan:'); +testConstError('f64', 'nan:0'); +testConstError('f64', 'nan:0x'); +testConstError('f64', 'nan:0x0'); diff --git a/js/src/jit-test/tests/wasm/control-flow.js b/js/src/jit-test/tests/wasm/control-flow.js new file mode 100644 index 000000000..fd4f8e4be --- /dev/null +++ b/js/src/jit-test/tests/wasm/control-flow.js @@ -0,0 +1,736 @@ +load(libdir + "wasm.js"); + +const RuntimeError = WebAssembly.RuntimeError; + +// ---------------------------------------------------------------------------- +// if + +// Condition is an int32 +wasmFailValidateText('(module (func (local f32) (if (get_local 0) (i32.const 1))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (local f32) (if (get_local 0) (i32.const 1) (i32.const 0))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (local f64) (if (get_local 0) (i32.const 1) (i32.const 0))))', mismatchError("f64", "i32")); +wasmEvalText('(module (func (local i32) (if (get_local 0) (nop))) (export "" 0))'); +wasmEvalText('(module (func (local i32) (if (get_local 0) (nop) (nop))) (export "" 0))'); + +// Expression values types are consistent +wasmFailValidateText('(module (func (result i32) (local f32) (if f32 (i32.const 42) (get_local 0) (i32.const 0))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (result i32) (local f64) (if i32 (i32.const 42) (i32.const 0) (get_local 0))))', mismatchError("f64", "i32")); +assertEq(wasmEvalText('(module (func (result i32) (if i32 (i32.const 42) (i32.const 1) (i32.const 2))) (export "" 0))').exports[""](), 1); +assertEq(wasmEvalText('(module (func (result i32) (if i32 (i32.const 0) (i32.const 1) (i32.const 2))) (export "" 0))').exports[""](), 2); + +// Even if we don't yield, sub expressions types still have to match. +wasmFailValidateText('(module (func (param f32) (if i32 (i32.const 42) (i32.const 1) (get_local 0))) (export "" 0))', mismatchError('f32', 'i32')); +wasmFailValidateText('(module (func (if i32 (i32.const 42) (i32.const 1) (i32.const 0))) (export "" 0))', /unused values not explicitly dropped by end of block/); +wasmFullPass('(module (func (drop (if i32 (i32.const 42) (i32.const 1) (i32.const 0)))) (export "run" 0))', undefined); +wasmFullPass('(module (func (param f32) (if (i32.const 42) (drop (i32.const 1)) (drop (get_local 0)))) (export "run" 0))', undefined, {}, 13.37); + +// Sub-expression values are returned +wasmFullPass(`(module + (func + (result i32) + (if i32 + (i32.const 42) + (block i32 + ( + if i32 + (block i32 + (drop (i32.const 3)) + (drop (i32.const 5)) + (i32.const 0) + ) + (i32.const 1) + (i32.const 2) + ) + ) + (i32.const 0) + ) + ) + (export "run" 0) +)`, 2); + +// The if (resp. else) branch is taken iff the condition is true (resp. false) +counter = 0; +var imports = { "":{inc() { counter++ }} }; +wasmFullPass(`(module + (import "" "inc" (result i32)) + (func + (result i32) + (if i32 + (i32.const 42) + (i32.const 1) + (call 0) + ) + ) + (export "run" 1) +)`, 1, imports); +assertEq(counter, 0); + +wasmFullPass(`(module + (import "" "inc" (result i32)) + (func + (result i32) + (if i32 + (i32.const 0) + (call 0) + (i32.const 1) + ) + ) + (export "run" 1) +)`, 1, imports); +assertEq(counter, 0); + +wasmFullPass(`(module + (import "" "inc" (result i32)) + (func + (if + (i32.const 0) + (drop (call 0)) + ) + ) + (export "run" 1) +)`, undefined, imports); +assertEq(counter, 0); + +assertEq(wasmEvalText(`(module + (import "" "inc" (result i32)) + (func + (if + (i32.const 1) + (drop (call 0)) + ) + ) + (export "" 1) +)`, imports).exports[""](), undefined); +assertEq(counter, 1); + +wasmFullPass(`(module + (func + (result i32) + (if i32 + (i32.const 0) + (br 0 (i32.const 0)) + (br 0 (i32.const 1)) + ) + ) + (export "run" 0) +)`, 1); +assertEq(counter, 1); + +wasmFullPass(`(module + (func + (if + (i32.const 1) + (br 0) + ) + ) + (export "run" 0) +)`, undefined); +assertEq(counter, 1); + +// One can chain if with if/if +counter = 0; +wasmFullPass(`(module + (import "" "inc" (result i32)) + (func + (result i32) + (if i32 + (i32.const 1) + (if i32 + (i32.const 2) + (if i32 + (i32.const 3) + (if i32 + (i32.const 0) + (call 0) + (i32.const 42) + ) + (call 0) + ) + (call 0) + ) + (call 0) + ) + ) + (export "run" 1) +)`, 42, imports); +assertEq(counter, 0); + +// "if" doesn't return an expression value +wasmFailValidateText('(module (func (result i32) (if i32 (i32.const 42) (i32.const 0))))', /if without else with a result value/); +wasmFailValidateText('(module (func (result i32) (if i32 (i32.const 42) (drop (i32.const 0)))))', mismatchError("void", "i32")); +wasmFailValidateText('(module (func (result i32) (if i32 (i32.const 1) (i32.const 0) (if i32 (i32.const 1) (i32.const 1)))))', /if without else with a result value/); +wasmFailValidateText('(module (func (result i32) (if i32 (i32.const 1) (drop (i32.const 0)) (if (i32.const 1) (drop (i32.const 1))))))', mismatchError("void", "i32")); +wasmFailValidateText('(module (func (if i32 (i32.const 1) (i32.const 0) (if i32 (i32.const 1) (i32.const 1)))))', /if without else with a result value/); +wasmFailValidateText('(module (func (if i32 (i32.const 1) (i32.const 0) (if (i32.const 1) (drop (i32.const 1))))))', mismatchError("void", "i32")); +wasmFailValidateText('(module (func (if (i32.const 1) (drop (i32.const 0)) (if i32 (i32.const 1) (i32.const 1)))))', /if without else with a result value/); +wasmEvalText('(module (func (if (i32.const 1) (drop (i32.const 0)) (if (i32.const 1) (drop (i32.const 1))))))'); + +// ---------------------------------------------------------------------------- +// return + +wasmFullPass('(module (func (return)) (export "run" 0))', undefined); +wasmFullPass('(module (func (result i32) (return (i32.const 1))) (export "run" 0))', 1); +wasmFullPass('(module (func (if (return) (i32.const 0))) (export "run" 0))', undefined); +wasmFailValidateText('(module (func (result i32) (return)) (export "" 0))', /popping value from empty stack/); +wasmFullPass('(module (func (return (i32.const 1))) (export "run" 0))', undefined); +wasmFailValidateText('(module (func (result f32) (return (i32.const 1))) (export "" 0))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (result i32) (return)) (export "" 0))', /popping value from empty stack/); + +// ---------------------------------------------------------------------------- +// br / br_if + +wasmFailValidateText('(module (func (result i32) (block (br 0))) (export "" 0))', mismatchError("void", "i32")); +wasmFailValidateText('(module (func (result i32) (br 0)) (export "" 0))', /popping value from empty stack/); +wasmFailValidateText('(module (func (result i32) (block (br_if 0 (i32.const 0)))) (export "" 0))', mismatchError("void", "i32")); + +const DEPTH_OUT_OF_BOUNDS = /branch depth exceeds current nesting level/; + +wasmFailValidateText('(module (func (br 1)))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (block (br 2))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (loop (br 2))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (if (i32.const 0) (br 2))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (if (i32.const 0) (br 1) (br 2))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (if (i32.const 0) (br 2) (br 1))))', DEPTH_OUT_OF_BOUNDS); + +wasmFailValidateText('(module (func (br_if 1 (i32.const 0))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (block (br_if 2 (i32.const 0)))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (loop (br_if 2 (i32.const 0)))))', DEPTH_OUT_OF_BOUNDS); + +wasmFailValidateText(`(module (func (result i32) + (block + (if + (br 0) + (i32.const 0) + (i32.const 2) + ) + ) +) (export "" 0))`, mismatchError("void", "i32")); + +wasmFullPass(`(module (func (block $out (br_if $out (br 0)))) (export "run" 0))`, undefined); + +wasmFullPass('(module (func (br 0)) (export "run" 0))', undefined); +wasmFullPass('(module (func (block (br 0))) (export "run" 0))', undefined); +wasmFullPass('(module (func (block $l (br $l))) (export "run" 0))', undefined); + +wasmFullPass('(module (func (block (block (br 1)))) (export "run" 0))', undefined); +wasmFullPass('(module (func (block $l (block (br $l)))) (export "run" 0))', undefined); + +wasmFullPass('(module (func (block $l (block $m (br $l)))) (export "run" 0))', undefined); +wasmFullPass('(module (func (block $l (block $m (br $m)))) (export "run" 0))', undefined); + +wasmFullPass(`(module (func (result i32) + (block + (br 0) + (return (i32.const 0)) + ) + (return (i32.const 1)) +) (export "run" 0))`, 1); + +wasmFullPass(`(module (func (result i32) + (block + (block + (br 0) + (return (i32.const 0)) + ) + (return (i32.const 1)) + ) + (return (i32.const 2)) +) (export "run" 0))`, 1); + +wasmFullPass(`(module (func (result i32) + (block $outer + (block $inner + (br $inner) + (return (i32.const 0)) + ) + (return (i32.const 1)) + ) + (return (i32.const 2)) +) (export "run" 0))`, 1); + +var notcalled = false; +var called = false; +var imports = {"": { + notcalled() {notcalled = true}, + called() {called = true} +}}; +wasmFullPass(`(module +(import "" "notcalled") +(import "" "called") +(func + (block + (return (br 0)) + (call 0) + ) + (call 1) +) (export "run" 2))`, undefined, imports); +assertEq(notcalled, false); +assertEq(called, true); + +wasmFullPass(`(module (func + (block + (i32.add + (i32.const 0) + (return (br 0)) + ) + ) + (return) +) (export "run" 0))`, undefined); + +wasmFullPass(`(module (func (result i32) + (block + (if + (i32.const 1) + (br 0) + (return (i32.const 0)) + ) + ) + (return (i32.const 1)) +) (export "run" 0))`, 1); + +wasmFullPass('(module (func (br_if 0 (i32.const 1))) (export "run" 0))', undefined); +wasmFullPass('(module (func (br_if 0 (i32.const 0))) (export "run" 0))', undefined); +wasmFullPass('(module (func (block (br_if 0 (i32.const 1)))) (export "run" 0))', undefined); +wasmFullPass('(module (func (block (br_if 0 (i32.const 0)))) (export "run" 0))', undefined); +wasmFullPass('(module (func (block $l (br_if $l (i32.const 1)))) (export "run" 0))', undefined); + +var isNonZero = wasmEvalText(`(module (func (result i32) (param i32) + (block + (br_if 0 (get_local 0)) + (return (i32.const 0)) + ) + (return (i32.const 1)) +) (export "" 0))`).exports[""]; + +assertEq(isNonZero(0), 0); +assertEq(isNonZero(1), 1); +assertEq(isNonZero(-1), 1); + +// branches with values +// br/br_if and block +wasmFailValidateText('(module (func (result i32) (br 0)))', /popping value from empty stack/); +wasmFailValidateText('(module (func (result i32) (br 0 (f32.const 42))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (result i32) (block (br 0))))', mismatchError("void", "i32")); +wasmFailValidateText('(module (func (result i32) (block f32 (br 0 (f32.const 42)))))', mismatchError("f32", "i32")); + +wasmFailValidateText(`(module (func (result i32) (param i32) (block (if i32 (get_local 0) (br 0 (i32.const 42))))) (export "" 0))`, /if without else with a result value/); +wasmFailValidateText(`(module (func (result i32) (param i32) (block i32 (if (get_local 0) (drop (i32.const 42))) (br 0 (f32.const 42)))) (export "" 0))`, mismatchError("f32", "i32")); + +wasmFullPass('(module (func (result i32) (br 0 (i32.const 42)) (i32.const 13)) (export "run" 0))', 42); +wasmFullPass('(module (func (result i32) (block i32 (br 0 (i32.const 42)) (i32.const 13))) (export "run" 0))', 42); + +wasmFailValidateText('(module (func) (func (block i32 (br 0 (call 0)) (i32.const 13))) (export "" 0))', /popping value from empty stack/); +wasmFailValidateText('(module (func) (func (block i32 (br_if 0 (call 0) (i32.const 1)) (i32.const 13))) (export "" 0))', /popping value from empty stack/); + +var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (if (get_local 0) (drop (i32.const 42))) (i32.const 43))) (export "" 0))`).exports[""]; +assertEq(f(0), 43); +assertEq(f(1), 43); + +wasmFailValidateText(`(module (func (result i32) (param i32) (block i32 (if i32 (get_local 0) (br 0 (i32.const 42))) (i32.const 43))) (export "" 0))`, /if without else with a result value/); + +var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (if (get_local 0) (br 1 (i32.const 42))) (i32.const 43))) (export "" 0))`).exports[""]; +assertEq(f(0), 43); +assertEq(f(1), 42); + +wasmFailValidateText(`(module (func (result i32) (param i32) (block (br_if 0 (i32.const 42) (get_local 0)) (i32.const 43))) (export "" 0))`, /unused values not explicitly dropped by end of block/); + +var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (drop (br_if 0 (i32.const 42) (get_local 0))) (i32.const 43))) (export "" 0))`).exports[""]; +assertEq(f(0), 43); +assertEq(f(1), 42); + +var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (if (get_local 0) (drop (i32.const 42))) (br 0 (i32.const 43)))) (export "" 0))`).exports[""]; +assertEq(f(0), 43); +assertEq(f(1), 43); + +wasmFailValidateText(`(module (func (result i32) (param i32) (block i32 (if i32 (get_local 0) (br 0 (i32.const 42))) (br 0 (i32.const 43)))) (export "" 0))`, /if without else with a result value/); + +var f = wasmEvalText(`(module (func (result i32) (param i32) (if (get_local 0) (br 1 (i32.const 42))) (br 0 (i32.const 43))) (export "" 0))`).exports[""]; +assertEq(f(0), 43); +assertEq(f(1), 42); + +var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (if (get_local 0) (br 1 (i32.const 42))) (br 0 (i32.const 43)))) (export "" 0))`).exports[""]; +assertEq(f(0), 43); +assertEq(f(1), 42); + +var f = wasmEvalText(`(module (func (result i32) (param i32) (br_if 0 (i32.const 42) (get_local 0)) (br 0 (i32.const 43))) (export "" 0))`).exports[""]; +assertEq(f(0), 43); +assertEq(f(1), 42); + +var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (br_if 0 (i32.const 42) (get_local 0)) (br 0 (i32.const 43)))) (export "" 0))`).exports[""]; +assertEq(f(0), 43); +assertEq(f(1), 42); + +var f = wasmEvalText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block i32 (if (get_local 0) (drop (i32.const 99))) (i32.const -1)))) (export "" 0))`).exports[""]; +assertEq(f(0), 0); +assertEq(f(1), 0); + +wasmFailValidateText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block i32 (if i32 (get_local 0) (br 0 (i32.const 99))) (i32.const -1)))) (export "" 0))`, /if without else with a result value/); + +var f = wasmEvalText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block i32 (if (get_local 0) (br 1 (i32.const 99))) (i32.const -1)))) (export "" 0))`).exports[""]; +assertEq(f(0), 0); +assertEq(f(1), 100); + +wasmFailValidateText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block (br_if 0 (i32.const 99) (get_local 0)) (i32.const -1)))) (export "" 0))`, /unused values not explicitly dropped by end of block/); + +var f = wasmEvalText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block i32 (drop (br_if 0 (i32.const 99) (get_local 0))) (i32.const -1)))) (export "" 0))`).exports[""]; +assertEq(f(0), 0); +assertEq(f(1), 100); + +wasmFullPass(`(module (func (result i32) (block i32 (br 0 (return (i32.const 42))) (i32.const 0))) (export "run" 0))`, 42); +wasmFullPass(`(module (func (result i32) (block i32 (return (br 0 (i32.const 42))))) (export "run" 0))`, 42); +wasmFullPass(`(module (func (result i32) (block i32 (return (br 0 (i32.const 42))) (i32.const 0))) (export "run" 0))`, 42); + +wasmFullPass(`(module (func (result f32) (drop (block i32 (br 0 (i32.const 0)))) (block f32 (br 0 (f32.const 42)))) (export "run" 0))`, 42); + +var called = 0; +var imports = { + sideEffects: { + ifTrue(x) {assertEq(x, 13); called++;}, + ifFalse(x) {assertEq(x, 37); called--;} + } +} +var f = wasmEvalText(`(module + (import "sideEffects" "ifTrue" (param i32)) + (import "sideEffects" "ifFalse" (param i32)) + (func + (param i32) (result i32) + (block $outer + (if + (get_local 0) + (block (call 0 (i32.const 13)) (br $outer)) + ) + (if + (i32.eqz (get_local 0)) + (block (call 1 (i32.const 37)) (br $outer)) + ) + ) + (i32.const 42) + ) +(export "" 2))`, imports).exports[""]; +assertEq(f(0), 42); +assertEq(called, -1); +assertEq(f(1), 42); +assertEq(called, 0); + +// br/br_if and loop +wasmFullPass(`(module (func (param i32) (result i32) (loop $out $in i32 (br $out (get_local 0)))) (export "run" 0))`, 1, {}, 1); +wasmFullPass(`(module (func (param i32) (result i32) (loop $in (br 1 (get_local 0)))) (export "run" 0))`, 1, {}, 1); +wasmFullPass(`(module (func (param i32) (result i32) (block $out i32 (loop $in i32 (br $out (get_local 0))))) (export "run" 0))`, 1, {}, 1); + +wasmFailValidateText(`(module (func (param i32) (result i32) + (loop $out $in + (if (get_local 0) (br $in (i32.const 1))) + (if (get_local 0) (br $in (f32.const 2))) + (if (get_local 0) (br $in (f64.const 3))) + (if (get_local 0) (br $in)) + (i32.const 7) + ) +) (export "" 0))`, /unused values not explicitly dropped by end of block/); + +wasmFullPass(`(module + (func + (result i32) + (local i32) + (block $out i32 + (loop $in + (set_local 0 (i32.add (get_local 0) (i32.const 1))) + (if (i32.ge_s (get_local 0) (i32.const 7)) (br $out (get_local 0))) + (br $in) + ) + ) + ) +(export "run" 0))`, 7); + +wasmFullPass(`(module + (func + (result i32) + (local i32) + (block $out i32 + (loop $in + (set_local 0 (i32.add (get_local 0) (i32.const 1))) + (br_if $out (get_local 0) (i32.ge_s (get_local 0) (i32.const 7))) + (br $in) + ) + ) + ) +(export "run" 0))`, 7); + +// ---------------------------------------------------------------------------- +// loop + +wasmFailValidateText('(module (func (loop (br 2))))', DEPTH_OUT_OF_BOUNDS); + +wasmFailValidateText('(module (func (result i32) (drop (loop (i32.const 2))) (i32.const 1)) (export "" 0))', /unused values not explicitly dropped by end of block/); +wasmFullPass('(module (func (loop)) (export "run" 0))', undefined); +wasmFullPass('(module (func (result i32) (loop (drop (i32.const 2))) (i32.const 1)) (export "run" 0))', 1); + +wasmFullPass('(module (func (loop (br 1))) (export "run" 0))', undefined); +wasmFullPass('(module (func (loop $a (br 1))) (export "run" 0))', undefined); +wasmFullPass('(module (func (loop $a (br_if $a (i32.const 0)))) (export "run" 0))', undefined); +wasmFullPass('(module (func (loop $a $b (br $a))) (export "run" 0))', undefined); +wasmFullPass('(module (func (block $a (loop $b (br $a)))) (export "run" 0))', undefined); +wasmFullPass('(module (func (result i32) (loop i32 (i32.const 1))) (export "run" 0))', 1); + +wasmFullPass(`(module (func (result i32) (local i32) + (loop + $break $continue + (if + (i32.gt_u (get_local 0) (i32.const 5)) + (br $break) + ) + (set_local 0 (i32.add (get_local 0) (i32.const 1))) + (br $continue) + ) + (return (get_local 0)) +) (export "run" 0))`, 6); + +wasmFullPass(`(module (func (result i32) (local i32) + (block + $break + (loop + $continue + (if + (i32.gt_u (get_local 0) (i32.const 5)) + (br $break) + ) + (set_local 0 (i32.add (get_local 0) (i32.const 1))) + (br $continue) + ) + ) + (return (get_local 0)) +) (export "run" 0))`, 6); + +wasmFullPass(`(module (func (result i32) (local i32) + (loop + $break $continue + (br_if + $break + (i32.gt_u (get_local 0) (i32.const 5)) + ) + (set_local 0 (i32.add (get_local 0) (i32.const 1))) + (br $continue) + ) + (return (get_local 0)) +) (export "run" 0))`, 6); + +wasmFullPass(`(module (func (result i32) (local i32) + (block + $break + (loop + $continue + (br_if + $break + (i32.gt_u (get_local 0) (i32.const 5)) + ) + (set_local 0 (i32.add (get_local 0) (i32.const 1))) + (br $continue) + ) + ) + (return (get_local 0)) +) (export "run" 0))`, 6); + +wasmFullPass(`(module (func (result i32) (local i32) + (loop + $break $continue + (set_local 0 (i32.add (get_local 0) (i32.const 1))) + (br_if + $continue + (i32.le_u (get_local 0) (i32.const 5)) + ) + ) + (return (get_local 0)) +) (export "run" 0))`, 6); + +wasmFullPass(`(module (func (result i32) (local i32) + (block + $break + (loop + $continue + (set_local 0 (i32.add (get_local 0) (i32.const 1))) + (br_if + $continue + (i32.le_u (get_local 0) (i32.const 5)) + ) + ) + ) + (return (get_local 0)) +) (export "run" 0))`, 6); + +wasmFullPass(`(module (func (result i32) (local i32) + (loop + $break $continue + (br_if + $break + (i32.gt_u (get_local 0) (i32.const 5)) + ) + (set_local 0 (i32.add (get_local 0) (i32.const 1))) + (loop + (br $continue) + ) + (return (i32.const 42)) + ) + (return (get_local 0)) +) (export "run" 0))`, 6); + +wasmFullPass(`(module (func (result i32) (local i32) + (block + $break + (loop + $continue + (br_if + $break + (i32.gt_u (get_local 0) (i32.const 5)) + ) + (set_local 0 (i32.add (get_local 0) (i32.const 1))) + (loop + (br $continue) + ) + (return (i32.const 42)) + ) + ) + (return (get_local 0)) +) (export "run" 0))`, 6); + +wasmFullPass(`(module (func (result i32) (local i32) + (loop + $break $continue + (set_local 0 (i32.add (get_local 0) (i32.const 1))) + (loop + (br_if + $continue + (i32.le_u (get_local 0) (i32.const 5)) + ) + ) + (br $break) + ) + (return (get_local 0)) +) (export "run" 0))`, 6); + +wasmFullPass(`(module (func (result i32) (local i32) + (block + $break + (loop + $continue + (set_local 0 (i32.add (get_local 0) (i32.const 1))) + (loop + (br_if + $continue + (i32.le_u (get_local 0) (i32.const 5)) + ) + ) + (br $break) + ) + ) + (return (get_local 0)) +) (export "run" 0))`, 6); + +// ---------------------------------------------------------------------------- +// br_table + +wasmFailValidateText('(module (func (br_table 1 (i32.const 0))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (br_table 1 0 (i32.const 0))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (br_table 0 1 (i32.const 0))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (block (br_table 2 0 (i32.const 0)))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (block (br_table 0 2 (i32.const 0)))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (block (br_table 0 (f32.const 0)))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (loop (br_table 2 0 (i32.const 0)))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (loop (br_table 0 2 (i32.const 0)))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (loop (br_table 0 (f32.const 0)))))', mismatchError("f32", "i32")); + +wasmFullPass(`(module (func (result i32) (param i32) + (block $default + (br_table $default (get_local 0)) + (return (i32.const 0)) + ) + (return (i32.const 1)) +) (export "run" 0))`, 1); + +wasmFullPass(`(module (func (result i32) (param i32) + (block $default + (br_table $default (return (i32.const 1))) + (return (i32.const 0)) + ) + (return (i32.const 2)) +) (export "run" 0))`, 1); + +wasmFullPass(`(module (func (result i32) (param i32) + (block $outer + (block $inner + (br_table $inner (get_local 0)) + (return (i32.const 0)) + ) + (return (i32.const 1)) + ) + (return (i32.const 2)) +) (export "run" 0))`, 1); + +var f = wasmEvalText(`(module (func (result i32) (param i32) + (block $0 + (block $1 + (block $2 + (block $default + (br_table $0 $1 $2 $default (get_local 0)) + ) + (return (i32.const -1)) + ) + (return (i32.const 2)) + ) + ) + (return (i32.const 0)) +) (export "" 0))`).exports[""]; + +assertEq(f(-2), -1); +assertEq(f(-1), -1); +assertEq(f(0), 0); +assertEq(f(1), 0); +assertEq(f(2), 2); +assertEq(f(3), -1); + +// br_table with values +wasmFailValidateText('(module (func (result i32) (block (br_table 0 (i32.const 0)))))', mismatchError("void", "i32")); +wasmFailValidateText('(module (func (result i32) (block i32 (br_table 0 (f32.const 0) (i32.const 0)))))', mismatchError("f32", "i32")); + +wasmFailValidateText(`(module + (func + (result i32) + (block $outer f32 + (block $inner f32 + (br_table $outer $inner (f32.const 13.37) (i32.const 1)) + ) + (br $outer (i32.const 42)) + ) + ) +(export "" 0))`, mismatchError("i32", "f32")); + +wasmFullPass(`(module (func (result i32) (block $default i32 (br_table $default (i32.const 42) (i32.const 1)))) (export "run" 0))`, 42); + +var f = wasmEvalText(`(module (func (param i32) (result i32) + (i32.add + (block $1 i32 + (drop (block $0 i32 + (drop (block $default i32 + (br_table $0 $1 $default (get_local 0) (get_local 0)) + )) + (tee_local 0 (i32.mul (i32.const 2) (get_local 0))) + )) + (tee_local 0 (i32.add (i32.const 4) (get_local 0))) + ) + (i32.const 1) + ) + ) (export "" 0))`).exports[""]; + +assertEq(f(0), 5); +assertEq(f(1), 2); +assertEq(f(2), 9); +assertEq(f(3), 11); +assertEq(f(4), 13); + +// ---------------------------------------------------------------------------- +// unreachable + +const UNREACHABLE = /unreachable/; +assertErrorMessage(wasmEvalText(`(module (func (unreachable)) (export "" 0))`).exports[""], RuntimeError, UNREACHABLE); +assertErrorMessage(wasmEvalText(`(module (func (if (unreachable) (i32.const 0))) (export "" 0))`).exports[""], RuntimeError, UNREACHABLE); +assertErrorMessage(wasmEvalText(`(module (func (block (br_if 0 (unreachable)))) (export "" 0))`).exports[""], RuntimeError, UNREACHABLE); +assertErrorMessage(wasmEvalText(`(module (func (block (br_table 0 (unreachable)))) (export "" 0))`).exports[""], RuntimeError, UNREACHABLE); +assertErrorMessage(wasmEvalText(`(module (func (result i32) (i32.add (i32.const 0) (unreachable))) (export "" 0))`).exports[""], RuntimeError, UNREACHABLE); diff --git a/js/src/jit-test/tests/wasm/conversion.js b/js/src/jit-test/tests/wasm/conversion.js new file mode 100644 index 000000000..056f62f67 --- /dev/null +++ b/js/src/jit-test/tests/wasm/conversion.js @@ -0,0 +1,272 @@ +load(libdir + "wasm.js"); + +function testConversion(resultType, opcode, paramType, op, expect) { + if (paramType === 'i64') { + // i64 cannot be imported, so we use a wrapper function. + wasmFullPass(`(module + (func (param i64) (result ${resultType}) (${resultType}.${opcode}/i64 (get_local 0))) + (export "run" 0))`, expect, {}, createI64(op)); + // The same, but now the input is a constant. + wasmFullPass(`(module + (func (result ${resultType}) (${resultType}.${opcode}/i64 (i64.const ${op}))) + (export "run" 0))`, expect); + } else if (resultType === 'i64') { + wasmFullPassI64(`(module + (func (param ${paramType}) (result i64) (i64.${opcode}/${paramType} (get_local 0))) + (export "run" 0))`, createI64(expect), {}, op); + // The same, but now the input is a constant. + wasmFullPassI64(`(module + (func (result i64) (i64.${opcode}/${paramType} (${paramType}.const ${op}))) + (export "run" 0))`, createI64(expect)); + } else { + wasmFullPass('(module (func (param ' + paramType + ') (result ' + resultType + ') (' + resultType + '.' + opcode + '/' + paramType + ' (get_local 0))) (export "run" 0))', expect, {}, op); + } + + let formerTestMode = getJitCompilerOptions()['wasm.test-mode']; + setJitCompilerOption('wasm.test-mode', 1); + for (var bad of ['i32', 'f32', 'f64', 'i64']) { + if (bad != resultType) { + wasmFailValidateText( + `(module (func (param ${paramType}) (result ${bad}) (${resultType}.${opcode}/${paramType} (get_local 0))))`, + mismatchError(resultType, bad) + ); + } + + if (bad != paramType) { + wasmFailValidateText( + `(module (func (param ${bad}) (result ${resultType}) (${resultType}.${opcode}/${paramType} (get_local 0))))`, + mismatchError(bad, paramType) + ); + } + } + setJitCompilerOption('wasm.test-mode', formerTestMode); +} + +function testTrap(resultType, opcode, paramType, op, expect) { + let func = wasmEvalText(`(module + (func + (param ${paramType}) + (result ${resultType}) + (${resultType}.${opcode}/${paramType} (get_local 0)) + ) + (export "" 0) + )`).exports[""]; + + let expectedError = op === 'nan' ? /invalid conversion to integer/ : /integer overflow/; + + assertErrorMessage(() => func(jsify(op)), Error, expectedError); +} + +{ + setJitCompilerOption('wasm.test-mode', 1); + + testConversion('i32', 'wrap', 'i64', '0x100000028', 40); + testConversion('i32', 'wrap', 'i64', -10, -10); + testConversion('i32', 'wrap', 'i64', "0xffffffff7fffffff", 0x7fffffff); + testConversion('i32', 'wrap', 'i64', "0xffffffff00000000", 0); + testConversion('i32', 'wrap', 'i64', "0xfffffffeffffffff", -1); + testConversion('i32', 'wrap', 'i64', "0x1234567801abcdef", 0x01abcdef); + testConversion('i32', 'wrap', 'i64', "0x8000000000000002", 2); + + testConversion('i64', 'extend_s', 'i32', 0, 0); + testConversion('i64', 'extend_s', 'i32', 1234, 1234); + testConversion('i64', 'extend_s', 'i32', -567, -567); + testConversion('i64', 'extend_s', 'i32', 0x7fffffff, "0x000000007fffffff"); + testConversion('i64', 'extend_s', 'i32', 0x80000000, "0xffffffff80000000"); + + testConversion('i64', 'extend_u', 'i32', 0, 0); + testConversion('i64', 'extend_u', 'i32', 1234, 1234); + testConversion('i64', 'extend_u', 'i32', -567, "0x00000000fffffdc9"); + testConversion('i64', 'extend_u', 'i32', -1, "0x00000000ffffffff"); + testConversion('i64', 'extend_u', 'i32', 0x7fffffff, "0x000000007fffffff"); + testConversion('i64', 'extend_u', 'i32', 0x80000000, "0x0000000080000000"); + + testConversion('f32', 'convert_s', 'i64', 1, 1.0); + testConversion('f32', 'convert_s', 'i64', -1, -1.0); + testConversion('f32', 'convert_s', 'i64', 0, 0.0); + testConversion('f32', 'convert_s', 'i64', "0x7fffffffffffffff", 9223372036854775807.0); + testConversion('f32', 'convert_s', 'i64', "0x8000000000000000", -9223372036854775808.0); + testConversion('f32', 'convert_s', 'i64', "0x11db9e76a2483", 314159275180032.0); + testConversion('f32', 'convert_s', 'i64', "0x7fffffff", 2147483648.0); // closesth approx. + testConversion('f32', 'convert_s', 'i64', "0x80000000", 2147483648.0); + testConversion('f32', 'convert_s', 'i64', "0x80000001", 2147483648.0); // closesth approx. + + testConversion('f64', 'convert_s', 'i64', 1, 1.0); + testConversion('f64', 'convert_s', 'i64', -1, -1.0); + testConversion('f64', 'convert_s', 'i64', 0, 0.0); + testConversion('f64', 'convert_s', 'i64', "0x7fffffffffffffff", 9223372036854775807.0); + testConversion('f64', 'convert_s', 'i64', "0x8000000000000000", -9223372036854775808.0); + testConversion('f64', 'convert_s', 'i64', "0x10969d374b968e", 4669201609102990); + testConversion('f64', 'convert_s', 'i64', "0x7fffffff", 2147483647.0); + testConversion('f64', 'convert_s', 'i64', "0x80000000", 2147483648.0); + testConversion('f64', 'convert_s', 'i64', "0x80000001", 2147483649.0); + + testConversion('f32', 'convert_u', 'i64', 1, 1.0); + testConversion('f32', 'convert_u', 'i64', 0, 0.0); + testConversion('f32', 'convert_u', 'i64', "0x7fffffffffffffff", 9223372036854775807.0); + testConversion('f32', 'convert_u', 'i64', "0x8000000000000000", 9223372036854775808.0); + testConversion('f32', 'convert_u', 'i64', -1, 18446744073709551616.0); + testConversion('f32', 'convert_u', 'i64', "0xffff0000ffff0000", 18446462598732840000.0); + + testConversion('f64', 'convert_u', 'i64', 1, 1.0); + testConversion('f64', 'convert_u', 'i64', 0, 0.0); + testConversion('f64', 'convert_u', 'i64', "0x7fffffffffffffff", 9223372036854775807.0); + testConversion('f64', 'convert_u', 'i64', "0x8000000000000000", 9223372036854775808.0); + testConversion('f64', 'convert_u', 'i64', -1, 18446744073709551616.0); + testConversion('f64', 'convert_u', 'i64', "0xffff0000ffff0000", 18446462603027743000.0); + + testConversion('i64', 'trunc_s', 'f64', 0.0, 0); + testConversion('i64', 'trunc_s', 'f64', "-0.0", 0); + testConversion('i64', 'trunc_s', 'f64', 1.0, 1); + testConversion('i64', 'trunc_s', 'f64', 1.1, 1); + testConversion('i64', 'trunc_s', 'f64', 1.5, 1); + testConversion('i64', 'trunc_s', 'f64', 1.99, 1); + testConversion('i64', 'trunc_s', 'f64', 40.1, 40); + testConversion('i64', 'trunc_s', 'f64', -1.0, -1); + testConversion('i64', 'trunc_s', 'f64', -1.1, -1); + testConversion('i64', 'trunc_s', 'f64', -1.5, -1); + testConversion('i64', 'trunc_s', 'f64', -1.99, -1); + testConversion('i64', 'trunc_s', 'f64', -2.0, -2); + testConversion('i64', 'trunc_s', 'f64', 4294967296.1, "0x100000000"); + testConversion('i64', 'trunc_s', 'f64', -4294967296.8, "0xffffffff00000000"); + testConversion('i64', 'trunc_s', 'f64', 9223372036854774784.8, "0x7ffffffffffffc00"); + testConversion('i64', 'trunc_s', 'f64', -9223372036854775808.3, "0x8000000000000000"); + + testConversion('i64', 'trunc_u', 'f64', 0.0, 0); + testConversion('i64', 'trunc_u', 'f64', "-0.0", 0); + testConversion('i64', 'trunc_u', 'f64', 1.0, 1); + testConversion('i64', 'trunc_u', 'f64', 1.1, 1); + testConversion('i64', 'trunc_u', 'f64', 1.5, 1); + testConversion('i64', 'trunc_u', 'f64', 1.99, 1); + testConversion('i64', 'trunc_u', 'f64', -0.9, 0); + testConversion('i64', 'trunc_u', 'f64', 40.1, 40); + testConversion('i64', 'trunc_u', 'f64', 4294967295, "0xffffffff"); + testConversion('i64', 'trunc_u', 'f64', 4294967296.1, "0x100000000"); + testConversion('i64', 'trunc_u', 'f64', 1e8, "0x5f5e100"); + testConversion('i64', 'trunc_u', 'f64', 1e16, "0x2386f26fc10000"); + testConversion('i64', 'trunc_u', 'f64', 9223372036854775808, "0x8000000000000000"); + testConversion('i64', 'trunc_u', 'f64', 18446744073709549568.1, -2048); + + testConversion('i64', 'trunc_s', 'f32', 0.0, 0); + testConversion('i64', 'trunc_s', 'f32', "-0.0", 0); + testConversion('i64', 'trunc_s', 'f32', 1.0, 1); + testConversion('i64', 'trunc_s', 'f32', 1.1, 1); + testConversion('i64', 'trunc_s', 'f32', 1.5, 1); + testConversion('i64', 'trunc_s', 'f32', 1.99, 1); + testConversion('i64', 'trunc_s', 'f32', 40.1, 40); + testConversion('i64', 'trunc_s', 'f32', -1.0, -1); + testConversion('i64', 'trunc_s', 'f32', -1.1, -1); + testConversion('i64', 'trunc_s', 'f32', -1.5, -1); + testConversion('i64', 'trunc_s', 'f32', -1.99, -1); + testConversion('i64', 'trunc_s', 'f32', -2.0, -2); + testConversion('i64', 'trunc_s', 'f32', 4294967296.1, "0x100000000"); + testConversion('i64', 'trunc_s', 'f32', -4294967296.8, "0xffffffff00000000"); + testConversion('i64', 'trunc_s', 'f32', 9223371487098961920.0, "0x7fffff8000000000"); + testConversion('i64', 'trunc_s', 'f32', -9223372036854775808.3, "0x8000000000000000"); + + testConversion('i64', 'trunc_u', 'f32', 0.0, 0); + testConversion('i64', 'trunc_u', 'f32', "-0.0", 0); + testConversion('i64', 'trunc_u', 'f32', 1.0, 1); + testConversion('i64', 'trunc_u', 'f32', 1.1, 1); + testConversion('i64', 'trunc_u', 'f32', 1.5, 1); + testConversion('i64', 'trunc_u', 'f32', 1.99, 1); + testConversion('i64', 'trunc_u', 'f32', -0.9, 0); + testConversion('i64', 'trunc_u', 'f32', 40.1, 40); + testConversion('i64', 'trunc_u', 'f32', 1e8, "0x5f5e100"); + testConversion('i64', 'trunc_u', 'f32', 4294967296, "0x100000000"); + testConversion('i64', 'trunc_u', 'f32', 18446742974197923840.0, "0xffffff0000000000"); + + testTrap('i64', 'trunc_s', 'f64', 9223372036854776000.0); + testTrap('i64', 'trunc_s', 'f64', -9223372036854778000.0); + testTrap('i64', 'trunc_s', 'f64', "nan"); + testTrap('i64', 'trunc_s', 'f64', "infinity"); + testTrap('i64', 'trunc_s', 'f64', "-infinity"); + + testTrap('i64', 'trunc_u', 'f64', -1); + testTrap('i64', 'trunc_u', 'f64', 18446744073709551616.0); + testTrap('i64', 'trunc_u', 'f64', "nan"); + testTrap('i64', 'trunc_u', 'f64', "infinity"); + testTrap('i64', 'trunc_u', 'f64', "-infinity"); + + testTrap('i64', 'trunc_s', 'f32', 9223372036854776000.0); + testTrap('i64', 'trunc_s', 'f32', -9223372586610630000.0); + testTrap('i64', 'trunc_s', 'f32', "nan"); + testTrap('i64', 'trunc_s', 'f32', "infinity"); + testTrap('i64', 'trunc_s', 'f32', "-infinity"); + + testTrap('i64', 'trunc_u', 'f32', 18446744073709551616.0); + testTrap('i64', 'trunc_u', 'f32', -1); + testTrap('i64', 'trunc_u', 'f32', "nan"); + testTrap('i64', 'trunc_u', 'f32', "infinity"); + testTrap('i64', 'trunc_u', 'f32', "-infinity"); + + testConversion('i64', 'reinterpret', 'f64', 40.09999999999968, "0x40440ccccccccca0"); + testConversion('f64', 'reinterpret', 'i64', "0x40440ccccccccca0", 40.09999999999968); + + setJitCompilerOption('wasm.test-mode', 0); +} + +// i32.trunc_s* : all values in ] -2**31 - 1; 2**31 [ are acceptable. +// f32: +var p = Math.pow; +testConversion('i32', 'trunc_s', 'f32', 40.1, 40); +testConversion('i32', 'trunc_s', 'f32', p(2, 31) - 128, p(2, 31) - 128); // last f32 value exactly representable < 2**31. +testConversion('i32', 'trunc_s', 'f32', -p(2, 31), -p(2,31)); // last f32 value exactly representable > -2**31 - 1. + +testTrap('i32', 'trunc_s', 'f32', 'nan'); +testTrap('i32', 'trunc_s', 'f32', 'infinity'); +testTrap('i32', 'trunc_s', 'f32', '-infinity'); +testTrap('i32', 'trunc_s', 'f32', p(2, 31)); +testTrap('i32', 'trunc_s', 'f32', -p(2,31) - 256); + +testConversion('i32', 'trunc_s', 'f64', 40.1, 40); +testConversion('i32', 'trunc_s', 'f64', p(2,31) - 0.001, p(2,31) - 1); // example value near the top. +testConversion('i32', 'trunc_s', 'f64', -p(2,31) - 0.999, -p(2,31)); // example value near the bottom. + +// f64: +testTrap('i32', 'trunc_s', 'f64', 'nan'); +testTrap('i32', 'trunc_s', 'f64', 'infinity'); +testTrap('i32', 'trunc_s', 'f64', '-infinity'); +testTrap('i32', 'trunc_s', 'f64', p(2,31)); +testTrap('i32', 'trunc_s', 'f64', -p(2,31) - 1); + +// i32.trunc_u* : all values in ] -1; 2**32 [ are acceptable. +// f32: +testConversion('i32', 'trunc_u', 'f32', 40.1, 40); +testConversion('i32', 'trunc_u', 'f32', p(2,31), p(2,31)|0); +testConversion('i32', 'trunc_u', 'f32', p(2,32) - 256, (p(2,32) - 256)|0); // last f32 value exactly representable < 2**32. +testConversion('i32', 'trunc_u', 'f32', -0.99, 0); // example value near the bottom. + +testTrap('i32', 'trunc_u', 'f32', 'nan'); +testTrap('i32', 'trunc_u', 'f32', 'infinity'); +testTrap('i32', 'trunc_u', 'f32', '-infinity'); +testTrap('i32', 'trunc_u', 'f32', -1); +testTrap('i32', 'trunc_u', 'f32', p(2,32)); + +// f64: +testConversion('i32', 'trunc_u', 'f64', 40.1, 40); +testConversion('i32', 'trunc_u', 'f64', p(2,32) - 0.001, (p(2,32) - 1)|0); // example value near the top. +testConversion('i32', 'trunc_u', 'f64', -0.99999, 0); // example value near the bottom. + +testTrap('i32', 'trunc_u', 'f32', 'nan'); +testTrap('i32', 'trunc_u', 'f32', 'infinity'); +testTrap('i32', 'trunc_u', 'f32', '-infinity'); +testTrap('i32', 'trunc_u', 'f32', -1); +testTrap('i32', 'trunc_u', 'f32', p(2,32)); + +// Other opcodes. +testConversion('i32', 'reinterpret', 'f32', 40.1, 1109419622); +testConversion('f32', 'reinterpret', 'i32', 40, 5.605193857299268e-44); + +testConversion('f32', 'convert_s', 'i32', 40, 40); +testConversion('f32', 'convert_u', 'i32', 40, 40); + +testConversion('f64', 'convert_s', 'i32', 40, 40); +testConversion('f64', 'convert_u', 'i32', 40, 40); + +testConversion('f32', 'demote', 'f64', 40.1, 40.099998474121094); +testConversion('f64', 'promote', 'f32', 40.1, 40.099998474121094); + +// Non-canonical NaNs. +wasmFullPass('(module (func (result i32) (i32.reinterpret/f32 (f32.demote/f64 (f64.const -nan:0x4444444444444)))) (export "run" 0))', -0x1dddde); +wasmFullPass('(module (func (result i32) (local i64) (set_local 0 (i64.reinterpret/f64 (f64.promote/f32 (f32.const -nan:0x222222)))) (i32.xor (i32.wrap/i64 (get_local 0)) (i32.wrap/i64 (i64.shr_u (get_local 0) (i64.const 32))))) (export "run" 0))', -0x4003bbbc); diff --git a/js/src/jit-test/tests/wasm/cross-global.js b/js/src/jit-test/tests/wasm/cross-global.js new file mode 100644 index 000000000..8f1d96b29 --- /dev/null +++ b/js/src/jit-test/tests/wasm/cross-global.js @@ -0,0 +1,12 @@ +load(libdir + "wasm.js"); + +const Module = WebAssembly.Module; + +// Create cross-compartment wrappers to typed arrays and array buffers. +var g = newGlobal(); +var code1 = g.eval("wasmTextToBinary('(module)')"); +var code2 = g.eval("wasmTextToBinary('(module)').buffer"); + +// Should get unwrapped. +assertEq(new Module(code1) instanceof Module, true); +assertEq(new Module(code2) instanceof Module, true); diff --git a/js/src/jit-test/tests/wasm/directives.txt b/js/src/jit-test/tests/wasm/directives.txt new file mode 100644 index 000000000..057bdf4c2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also-wasm-baseline diff --git a/js/src/jit-test/tests/wasm/drop.js b/js/src/jit-test/tests/wasm/drop.js new file mode 100644 index 000000000..bf65e587c --- /dev/null +++ b/js/src/jit-test/tests/wasm/drop.js @@ -0,0 +1,47 @@ +load(libdir + "wasm.js"); + +for (let type of ['i32', 'f32', 'f64']) { + assertEq(wasmEvalText(` + (module + (func $test (result ${type}) (param $p ${type}) (param $p2 ${type}) + get_local $p + get_local $p2 + (block) + drop + ) + (export "test" $test) + ) + `).exports.test(0x1337abc0, 0xffffffff), 0x1337abc0); +} + +assertEq(wasmEvalText(` + (module + (func $test (result i32) (param $p i32) (param $p2 f32) (param $p3 f64) (param $p4 i32) + get_local $p + get_local $p2 + get_local $p3 + get_local $p4 + (block) + drop + (block) + (block) + drop + drop + ) + (export "test" $test) + ) +`).exports.test(0x1337abc0, 0xffffffff), 0x1337abc0); + +setJitCompilerOption('wasm.test-mode', 1); + +assertEqI64(wasmEvalText(` + (module + (func $test (result i64) (param $p i64) (param $p2 i64) + get_local $p + get_local $p2 + (block) + drop + ) + (export "test" $test) + ) +`).exports.test(createI64(0x1337abc0), createI64(0xffffffff | 0)), createI64(0x1337abc0)); diff --git a/js/src/jit-test/tests/wasm/errors.js b/js/src/jit-test/tests/wasm/errors.js new file mode 100644 index 000000000..65eb1cc20 --- /dev/null +++ b/js/src/jit-test/tests/wasm/errors.js @@ -0,0 +1,155 @@ +load(libdir + "wasm.js"); +load(libdir + "wasm-binary.js"); + +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; +const RuntimeError = WebAssembly.RuntimeError; + +function isWasmFunction(name) { + return /^wasm-function\[\d*\]$/.test(name) +} + +function parseStack(stack) { + var frames = stack.split('\n'); + assertEq(frames[frames.length-1], ""); + frames.length--; + return frames.map(frame => { + var res = frame.match(/^(.*)@.*:(\d*):(\d*)$/); + assertEq(res !== null, true); + return {name: res[1], line: Number(res[2]), column: Number(res[3])}; + }); +} + +function testExn(opcode, binary, type, msg, exn) { + assertEq(exn instanceof type, true); + assertEq(msg.test(exn.message), true); + + var stack = parseStack(exn.stack); + assertEq(stack.length > 1, true); + var innermost = stack[0]; + assertEq(isWasmFunction(innermost.name), true); + assertEq(innermost.line, exn.lineNumber); + assertEq(innermost.column, exn.columnNumber); + + assertEq(exn.lineNumber > 0, true); + assertEq(exn.columnNumber, 1); + assertEq(binary[exn.lineNumber], opcode); + + return {stack, binary}; +} + +function test(opcode, text, type, msg) { + var binary = new Uint8Array(wasmTextToBinary(text)); + var exn; + try { + new Instance(new Module(binary)); + } catch (e) { + exn = e; + } + + return testExn(opcode, binary, type, msg, exn); +} + +function testAccess(opcode, text, width, type, msg) { + var binary = new Uint8Array(wasmTextToBinary(text)); + var instance = new Instance(new Module(binary)); + for (var base of [64 * 1024, 2 * 64 * 1024, Math.pow(2, 30), Math.pow(2, 31), Math.pow(2, 32) - 1]) { + for (var sub = 0; sub < width; sub++) { + var ptr = base - sub; + let exn = null; + try { + instance.exports[''](ptr); + } catch (e) { + exn = e; + } + testExn(opcode, binary, type, msg, exn); + } + } +} + +function testLoad(opcode, optext, width, type, msg) { + var text = `(module (memory 1) (func (export "") (param i32) (drop (${optext} (get_local 0)))))`; + testAccess(opcode, text, width, type, msg); +} + +function testStore(opcode, optext, consttext, width, type, msg) { + var text = `(module (memory 1) (func (export "") (param i32) (${optext} (get_local 0) (${consttext}.const 0))))`; + testAccess(opcode, text, width, type, msg); +} + +test(UnreachableCode, '(module (func unreachable) (start 0))', RuntimeError, /unreachable executed/); +test(I32DivSCode, '(module (func (drop (i32.div_s (i32.const 1) (i32.const 0)))) (start 0))', RuntimeError, /integer divide by zero/); +test(I32DivUCode, '(module (func (drop (i32.div_u (i32.const 1) (i32.const 0)))) (start 0))', RuntimeError, /integer divide by zero/); +test(I32RemSCode, '(module (func (drop (i32.rem_s (i32.const 1) (i32.const 0)))) (start 0))', RuntimeError, /integer divide by zero/); +test(I32RemUCode, '(module (func (drop (i32.rem_u (i32.const 1) (i32.const 0)))) (start 0))', RuntimeError, /integer divide by zero/); +test(I32RemUCode, '(module (func (drop (i32.rem_u (i32.const 1) (i32.const 0)))) (start 0))', RuntimeError, /integer divide by zero/); +test(I32TruncSF32Code, '(module (func (drop (i32.trunc_s/f32 (f32.const 1e30)))) (start 0))', RuntimeError, /integer overflow/); +test(I32TruncSF64Code, '(module (func (drop (i32.trunc_s/f64 (f64.const 1e30)))) (start 0))', RuntimeError, /integer overflow/); +test(I32TruncUF32Code, '(module (func (drop (i32.trunc_u/f32 (f32.const 1e30)))) (start 0))', RuntimeError, /integer overflow/); +test(I32TruncUF64Code, '(module (func (drop (i32.trunc_u/f64 (f64.const 1e30)))) (start 0))', RuntimeError, /integer overflow/); +test(I64TruncSF32Code, '(module (func (drop (i64.trunc_s/f32 (f32.const 1e30)))) (start 0))', RuntimeError, /integer overflow/); +test(I64TruncSF64Code, '(module (func (drop (i64.trunc_s/f64 (f64.const 1e30)))) (start 0))', RuntimeError, /integer overflow/); +test(I64TruncUF32Code, '(module (func (drop (i64.trunc_u/f32 (f32.const 1e30)))) (start 0))', RuntimeError, /integer overflow/); +test(I64TruncUF64Code, '(module (func (drop (i64.trunc_u/f64 (f64.const 1e30)))) (start 0))', RuntimeError, /integer overflow/); +test(I32TruncSF32Code, '(module (func (drop (i32.trunc_s/f32 (f32.const nan)))) (start 0))', RuntimeError, /invalid conversion to integer/); +test(I32TruncSF64Code, '(module (func (drop (i32.trunc_s/f64 (f64.const nan)))) (start 0))', RuntimeError, /invalid conversion to integer/); +test(I32TruncUF32Code, '(module (func (drop (i32.trunc_u/f32 (f32.const nan)))) (start 0))', RuntimeError, /invalid conversion to integer/); +test(I32TruncUF64Code, '(module (func (drop (i32.trunc_u/f64 (f64.const nan)))) (start 0))', RuntimeError, /invalid conversion to integer/); +test(I64TruncSF32Code, '(module (func (drop (i64.trunc_s/f32 (f32.const nan)))) (start 0))', RuntimeError, /invalid conversion to integer/); +test(I64TruncSF64Code, '(module (func (drop (i64.trunc_s/f64 (f64.const nan)))) (start 0))', RuntimeError, /invalid conversion to integer/); +test(I64TruncUF32Code, '(module (func (drop (i64.trunc_u/f32 (f32.const nan)))) (start 0))', RuntimeError, /invalid conversion to integer/); +test(I64TruncUF64Code, '(module (func (drop (i64.trunc_u/f64 (f64.const nan)))) (start 0))', RuntimeError, /invalid conversion to integer/); +test(CallIndirectCode, '(module (table 1 anyfunc) (func (call_indirect 0 (i32.const 0))) (start 0))', RuntimeError, /indirect call to null/); +test(CallIndirectCode, '(module (table 1 anyfunc) (func (call_indirect 0 (i32.const 1))) (start 0))', RuntimeError, /index out of bounds/); +test(CallIndirectCode, '(module (table anyfunc (elem $blah)) (func (call_indirect 0 (i32.const 0))) (func $blah (param i32)) (start 0))', RuntimeError, /indirect call signature mismatch/); +testLoad(I32Load8S, 'i32.load8_s', 1, RuntimeError, /index out of bounds/); +testLoad(I32Load8U, 'i32.load8_u', 1, RuntimeError, /index out of bounds/); +testLoad(I32Load16S, 'i32.load16_s', 2, RuntimeError, /index out of bounds/); +testLoad(I32Load16U, 'i32.load16_u', 2, RuntimeError, /index out of bounds/); +testLoad(I64Load8S, 'i64.load8_s', 1, RuntimeError, /index out of bounds/); +testLoad(I64Load8U, 'i64.load8_u', 1, RuntimeError, /index out of bounds/); +testLoad(I64Load16S, 'i64.load16_s', 2, RuntimeError, /index out of bounds/); +testLoad(I64Load16U, 'i64.load16_u', 2, RuntimeError, /index out of bounds/); +testLoad(I64Load32S, 'i64.load32_s', 4, RuntimeError, /index out of bounds/); +testLoad(I64Load32U, 'i64.load32_u', 4, RuntimeError, /index out of bounds/); +testLoad(I32Load, 'i32.load', 4, RuntimeError, /index out of bounds/); +testLoad(I64Load, 'i64.load', 8, RuntimeError, /index out of bounds/); +testLoad(F32Load, 'f32.load', 4, RuntimeError, /index out of bounds/); +testLoad(F64Load, 'f64.load', 8, RuntimeError, /index out of bounds/); +testStore(I32Store8, 'i32.store8', 'i32', 1, RuntimeError, /index out of bounds/); +testStore(I32Store16, 'i32.store16', 'i32', 2, RuntimeError, /index out of bounds/); +testStore(I64Store8, 'i64.store8', 'i64', 1, RuntimeError, /index out of bounds/); +testStore(I64Store16, 'i64.store16', 'i64', 2, RuntimeError, /index out of bounds/); +testStore(I64Store32, 'i64.store32', 'i64', 4, RuntimeError, /index out of bounds/); +testStore(I32Store, 'i32.store', 'i32', 4, RuntimeError, /index out of bounds/); +testStore(I64Store, 'i64.store', 'i64', 8, RuntimeError, /index out of bounds/); +testStore(F32Store, 'f32.store', 'f32', 4, RuntimeError, /index out of bounds/); +testStore(F64Store, 'f64.store', 'f64', 8, RuntimeError, /index out of bounds/); + +// Stack overflow isn't really a trap or part of the formally-specified +// semantics of call so use the same InternalError as JS and use the bytecode +// offset of the function body (which happens to start with the number of +// local entries). +test(4 /* = num locals */, '(module (func (local i32 i64 f32 f64) (call 0)) (start 0))', InternalError, /too much recursion/); + +// Test whole callstack. +var {stack, binary} = test(UnreachableCode, `(module + (type $v2v (func)) + (func $a unreachable) + (func $b call $a) + (func $c call $b) + (table anyfunc (elem $c)) + (func $d (call_indirect $v2v (i32.const 0))) + (func $e call $d) + (start $e) +)`, RuntimeError, /unreachable executed/); +const N = 5; +assertEq(stack.length > N, true); +var lastLine = stack[0].line; +for (var i = 1; i < N; i++) { + assertEq(isWasmFunction(stack[i].name), true); + assertEq(stack[i].line > lastLine, true); + lastLine = stack[i].line; + assertEq(binary[stack[i].line], i == 3 ? CallIndirectCode : CallCode); + assertEq(stack[i].column, 1); +} diff --git a/js/src/jit-test/tests/wasm/extract-code.js b/js/src/jit-test/tests/wasm/extract-code.js new file mode 100644 index 000000000..63b8624f4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/extract-code.js @@ -0,0 +1,14 @@ +load(libdir + "wasm.js"); + +var module = new WebAssembly.Module(wasmTextToBinary(`(module (func (nop)))`)); +var exp = wasmExtractCode(module); +assertEq(exp.code instanceof Uint8Array, true); +assertEq(Array.isArray(exp.segments), true); +var funcs = exp.segments.filter(s => s.kind === 0); +assertEq(funcs.length, 1); +assertEq(funcs[0].funcIndex, 0); +assertEq(funcs[0].begin >= 0, true); +assertEq(funcs[0].begin <= funcs[0].funcBodyBegin, true); +assertEq(funcs[0].funcBodyBegin < funcs[0].funcBodyEnd, true); +assertEq(funcs[0].funcBodyEnd <= funcs[0].end, true); +assertEq(funcs[0].end <= exp.code.length, true); diff --git a/js/src/jit-test/tests/wasm/fac.js b/js/src/jit-test/tests/wasm/fac.js new file mode 100644 index 000000000..d5847c957 --- /dev/null +++ b/js/src/jit-test/tests/wasm/fac.js @@ -0,0 +1,21 @@ +load(libdir + "wasm.js"); + +// This is fac-opt from fac.wast in the official testsuite, changed to use +// i32 instead of i64. +assertEq(wasmEvalText(`(module + (func $fac-opt (param i32) (result i32) + (local i32) + (set_local 1 (i32.const 1)) + (block + (br_if 0 (i32.lt_s (get_local 0) (i32.const 2))) + (loop + (set_local 1 (i32.mul (get_local 1) (get_local 0))) + (set_local 0 (i32.add (get_local 0) (i32.const -1))) + (br_if 0 (i32.gt_s (get_local 0) (i32.const 1))) + ) + ) + (get_local 1) + ) + + (export "" 0) +)`).exports[""](10), 3628800); diff --git a/js/src/jit-test/tests/wasm/float.js b/js/src/jit-test/tests/wasm/float.js new file mode 100644 index 000000000..b07a3e148 --- /dev/null +++ b/js/src/jit-test/tests/wasm/float.js @@ -0,0 +1,105 @@ +load(libdir + "wasm.js"); + +wasmFullPass('(module (func (result f32) (f32.const -1)) (export "run" 0))', -1); +wasmFullPass('(module (func (result f32) (f32.const 1)) (export "run" 0))', 1); +wasmFullPass('(module (func (result f64) (f64.const -2)) (export "run" 0))', -2); +wasmFullPass('(module (func (result f64) (f64.const 2)) (export "run" 0))', 2); +wasmFullPass('(module (func (result f64) (f64.const 4294967296)) (export "run" 0))', 4294967296); +wasmFullPass('(module (func (result f32) (f32.const 1.5)) (export "run" 0))', 1.5); +wasmFullPass('(module (func (result f64) (f64.const 2.5)) (export "run" 0))', 2.5); +wasmFullPass('(module (func (result f64) (f64.const 10e2)) (export "run" 0))', 10e2); +wasmFullPass('(module (func (result f32) (f32.const 10e2)) (export "run" 0))', 10e2); +wasmFullPass('(module (func (result f64) (f64.const -0x8000000000000000)) (export "run" 0))', -0x8000000000000000); +wasmFullPass('(module (func (result f64) (f64.const -9223372036854775808)) (export "run" 0))', -9223372036854775808); +wasmFullPass('(module (func (result f64) (f64.const 1797693134862315708145274e284)) (export "run" 0))', 1797693134862315708145274e284); + +function testUnary(type, opcode, op, expect) { + wasmFullPass('(module (func (param ' + type + ') (result ' + type + ') (' + type + '.' + opcode + ' (get_local 0))) (export "run" 0))', + expect, + {}, + op); +} + +function testBinary(type, opcode, lhs, rhs, expect) { + wasmFullPass('(module (func (param ' + type + ') (param ' + type + ') (result ' + type + ') (' + type + '.' + opcode + ' (get_local 0) (get_local 1))) (export "run" 0))', + expect, + {}, + lhs, rhs); +} + +function testComparison(type, opcode, lhs, rhs, expect) { + wasmFullPass('(module (func (param ' + type + ') (param ' + type + ') (result i32) (' + type + '.' + opcode + ' (get_local 0) (get_local 1))) (export "run" 0))', + expect, + {}, + lhs, rhs); +} + +testUnary('f32', 'abs', -40, 40); +testUnary('f32', 'neg', 40, -40); +testUnary('f32', 'floor', 40.9, 40); +testUnary('f32', 'ceil', 40.1, 41); +testUnary('f32', 'nearest', -41.5, -42); +testUnary('f32', 'trunc', -41.5, -41); +testUnary('f32', 'sqrt', 40, 6.324555397033691); + +testBinary('f32', 'add', 40, 2, 42); +testBinary('f32', 'sub', 40, 2, 38); +testBinary('f32', 'mul', 40, 2, 80); +testBinary('f32', 'div', 40, 3, 13.333333015441895); +testBinary('f32', 'min', 40, 2, 2); +testBinary('f32', 'max', 40, 2, 40); +testBinary('f32', 'copysign', 40, -2, -40); + +testComparison('f32', 'eq', 40, 40, 1); +testComparison('f32', 'ne', 40, 40, 0); +testComparison('f32', 'lt', 40, 40, 0); +testComparison('f32', 'le', 40, 40, 1); +testComparison('f32', 'gt', 40, 40, 0); +testComparison('f32', 'ge', 40, 40, 1); + +testUnary('f64', 'abs', -40, 40); +testUnary('f64', 'neg', 40, -40); +testUnary('f64', 'floor', 40.9, 40); +testUnary('f64', 'ceil', 40.1, 41); +testUnary('f64', 'nearest', -41.5, -42); +testUnary('f64', 'trunc', -41.5, -41); +testUnary('f64', 'sqrt', 40, 6.324555320336759); + +testBinary('f64', 'add', 40, 2, 42); +testBinary('f64', 'sub', 40, 2, 38); +testBinary('f64', 'mul', 40, 2, 80); +testBinary('f64', 'div', 40, 3, 13.333333333333334); +testBinary('f64', 'min', 40, 2, 2); +testBinary('f64', 'max', 40, 2, 40); +testBinary('f64', 'copysign', 40, -2, -40); + +testComparison('f64', 'eq', 40, 40, 1); +testComparison('f64', 'ne', 40, 40, 0); +testComparison('f64', 'lt', 40, 40, 0); +testComparison('f64', 'le', 40, 40, 1); +testComparison('f64', 'gt', 40, 40, 0); +testComparison('f64', 'ge', 40, 40, 1); + +wasmFailValidateText('(module (func (param i32) (result f32) (f32.sqrt (get_local 0))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param f32) (result i32) (f32.sqrt (get_local 0))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (param i32) (result i32) (f32.sqrt (get_local 0))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param i32) (result f64) (f64.sqrt (get_local 0))))', mismatchError("i32", "f64")); +wasmFailValidateText('(module (func (param f64) (result i32) (f64.sqrt (get_local 0))))', mismatchError("f64", "i32")); +wasmFailValidateText('(module (func (param i32) (result i32) (f64.sqrt (get_local 0))))', mismatchError("i32", "f64")); +wasmFailValidateText('(module (func (f32.sqrt (nop))))', /popping value from empty stack/); + +wasmFailValidateText('(module (func (param i32) (param f32) (result f32) (f32.add (get_local 0) (get_local 1))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param f32) (param i32) (result f32) (f32.add (get_local 0) (get_local 1))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param f32) (param f32) (result i32) (f32.add (get_local 0) (get_local 1))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (param i32) (param i32) (result i32) (f32.add (get_local 0) (get_local 1))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param i32) (param f64) (result f64) (f64.add (get_local 0) (get_local 1))))', mismatchError("i32", "f64")); +wasmFailValidateText('(module (func (param f64) (param i32) (result f64) (f64.add (get_local 0) (get_local 1))))', mismatchError("i32", "f64")); +wasmFailValidateText('(module (func (param f64) (param f64) (result i32) (f64.add (get_local 0) (get_local 1))))', mismatchError("f64", "i32")); +wasmFailValidateText('(module (func (param i32) (param i32) (result i32) (f64.add (get_local 0) (get_local 1))))', mismatchError("i32", "f64")); + +wasmFailValidateText('(module (func (param i32) (param f32) (result f32) (f32.eq (get_local 0) (get_local 1))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param f32) (param i32) (result f32) (f32.eq (get_local 0) (get_local 1))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param f32) (param f32) (result f32) (f32.eq (get_local 0) (get_local 1))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param i32) (param f64) (result f64) (f64.eq (get_local 0) (get_local 1))))', mismatchError("i32", "f64")); +wasmFailValidateText('(module (func (param f64) (param i32) (result f64) (f64.eq (get_local 0) (get_local 1))))', mismatchError("i32", "f64")); +wasmFailValidateText('(module (func (param f64) (param f64) (result f64) (f64.eq (get_local 0) (get_local 1))))', mismatchError("i32", "f64")); diff --git a/js/src/jit-test/tests/wasm/full-cycle.js b/js/src/jit-test/tests/wasm/full-cycle.js new file mode 100644 index 000000000..1ea8a653e --- /dev/null +++ b/js/src/jit-test/tests/wasm/full-cycle.js @@ -0,0 +1,111 @@ +load(libdir + "wasm.js"); + +wasmFullPass(`(module + (func $test (result i32) (param i32) (param i32) (i32.add (get_local 0) (get_local 1))) + (func $run (result i32) (call $test (i32.const 1) (i32.const ${Math.pow(2, 31) - 1}))) + (export "run" $run) +)`, -Math.pow(2, 31)); + +wasmFullPass(`(module + (func (result i32) + i32.const 1 + i32.const 42 + i32.add + return + unreachable + i32.const 0 + call 3 + i32.const 42 + f32.add + ) + (func) (func) (func) +(export "run" 0))`, 43); + +// Global section. +wasmFullPass(`(module + (import $imported "globals" "x" (global i32)) + (global $mut_local (mut i32) (i32.const 0)) + (global $imm_local i32 (i32.const 37)) + (global $imm_local_2 i32 (get_global 0)) + (func $get (result i32) + i32.const 13 + set_global $mut_local + get_global $imported + get_global $mut_local + i32.add + get_global $imm_local + i32.add + get_global $imm_local_2 + i32.add + ) + (export "run" $get) +)`, 13 + 42 + 37 + 42, { globals: {x: 42} }); + +// Memory. +wasmFullPass(`(module + (memory (export "memory") 1 2) + (data (i32.const 0) "\\00\\01\\02" "\\03\\04\\05") + (data (i32.const 6) "\\06") + (func (export "run") (result i32) + i32.const 1 + i32.load offset=2 + ) +)`, 0x06050403); + +let memory = new WebAssembly.Memory({ initial: 1, maximum: 2 }); + +wasmFullPass(`(module + (memory (import "" "memory") 1 2) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05") + (func (export "run") (result i32) + i32.const 1 + i32.load offset=2 + ) + (export "mem" memory) +)`, 0x050403, {"": {memory}}); + +// Tables. +wasmFullPass(`(module + (table (export "table") 3 anyfunc) + (type $t (func (result i32))) + (func $foo (result i32) (i32.const 1)) + (func $bar (result i32) (i32.const 2)) + (func $baz (result i32) (i32.const 3)) + (elem (i32.const 0) $baz $bar) + (elem (i32.const 2) $foo) + (func (export "run") (param i32) (result i32) + get_local 0 + call_indirect $t + ) +)`, 3, {}, 0); + +let table = new WebAssembly.Table({ element: 'anyfunc', initial: 3, maximum: 3 }); + +wasmFullPass(`(module + (table (import "" "table") 3 4 anyfunc) + (type $t (func (result i32))) + (func $foo (result i32) (i32.const 1)) + (func $bar (result i32) (i32.const 2)) + (func $baz (result i32) (i32.const 3)) + (elem (i32.const 0) $baz $bar) + (elem (i32.const 2) $foo) + (func (export "run") (param i32) (result i32) + get_local 0 + call_indirect $t + ) +)`, 3, {"":{table}}, 0); + +// Start function. +wasmFullPass(`(module + (global $g (mut i32) (i32.const 0)) + (func $start + get_global $g + i32.const 1 + i32.add + set_global $g + ) + (start $start) + (func (export "run") (result i32) + get_global $g + ) +)`, 1); diff --git a/js/src/jit-test/tests/wasm/globals.js b/js/src/jit-test/tests/wasm/globals.js new file mode 100644 index 000000000..1d37d0d38 --- /dev/null +++ b/js/src/jit-test/tests/wasm/globals.js @@ -0,0 +1,248 @@ +load(libdir + "wasm.js"); + +const { Instance, Module } = WebAssembly; + +// Locally-defined globals +assertErrorMessage(() => wasmEvalText(`(module (global))`), SyntaxError, /parsing/); +assertErrorMessage(() => wasmEvalText(`(module (global i32))`), SyntaxError, /parsing/); +assertErrorMessage(() => wasmEvalText(`(module (global (mut i32)))`), SyntaxError, /parsing/); + +// Initializer expressions. +wasmFailValidateText(`(module (global i32 (f32.const 13.37)))`, /type mismatch/); +wasmFailValidateText(`(module (global f64 (f32.const 13.37)))`, /type mismatch/); +wasmFailValidateText(`(module (global i32 (i32.add (i32.const 13) (i32.const 37))))`, /failed to read end/); + +wasmFailValidateText(`(module (global i32 (get_global 0)))`, /out of range/); +wasmFailValidateText(`(module (global i32 (get_global 1)) (global i32 (i32.const 1)))`, /out of range/); + +// Test a well-defined global section. +function testInner(type, initialValue, nextValue, coercion, assertFunc = assertEq) +{ + var module = wasmEvalText(`(module + (global (mut ${type}) (${type}.const ${initialValue})) + (global ${type} (${type}.const ${initialValue})) + + (func $get (result ${type}) (get_global 0)) + (func $set (param ${type}) (set_global 0 (get_local 0))) + + (func $get_cst (result ${type}) (get_global 1)) + + (export "get" $get) + (export "get_cst" $get_cst) + + (export "set" $set) + )`).exports; + + assertFunc(module.get(), coercion(initialValue)); + assertEq(module.set(coercion(nextValue)), undefined); + assertFunc(module.get(), coercion(nextValue)); + + assertFunc(module.get_cst(), coercion(initialValue)); +} + +testInner('i32', 13, 37, x => x|0); +testInner('f32', 13.37, 0.1989, Math.fround); +testInner('f64', 13.37, 0.1989, x => +x); + +// Semantic errors. +wasmFailValidateText(`(module (global (mut i32) (i32.const 1337)) (func (set_global 1 (i32.const 0))))`, /out of range/); +wasmFailValidateText(`(module (global i32 (i32.const 1337)) (func (set_global 0 (i32.const 0))))`, /can't write an immutable global/); + +// Big module with many variables: test that setting one doesn't overwrite the +// other ones. +function get_set(i, type) { + return ` + (func $get_${i} (result ${type}) (get_global ${i})) + (func $set_${i} (param ${type}) (set_global ${i} (get_local 0))) + `; +} + +var module = wasmEvalText(`(module + (global (mut i32) (i32.const 42)) + (global (mut i32) (i32.const 10)) + (global (mut f32) (f32.const 13.37)) + (global (mut f64) (f64.const 13.37)) + (global (mut i32) (i32.const -18)) + + ${get_set(0, 'i32')} + ${get_set(1, 'i32')} + ${get_set(2, 'f32')} + ${get_set(3, 'f64')} + ${get_set(4, 'i32')} + + (export "get0" $get_0) (export "set0" $set_0) + (export "get1" $get_1) (export "set1" $set_1) + (export "get2" $get_2) (export "set2" $set_2) + (export "get3" $get_3) (export "set3" $set_3) + (export "get4" $get_4) (export "set4" $set_4) +)`).exports; + +let values = [42, 10, Math.fround(13.37), 13.37, -18]; +let nextValues = [13, 37, Math.fround(-17.89), 9.3, -13]; +for (let i = 0; i < 5; i++) { + assertEq(module[`get${i}`](), values[i]); + assertEq(module[`set${i}`](nextValues[i]), undefined); + assertEq(module[`get${i}`](), nextValues[i]); + for (let j = 0; j < 5; j++) { + if (i === j) + continue; + assertEq(module[`get${j}`](), values[j]); + } + assertEq(module[`set${i}`](values[i]), undefined); + assertEq(module[`get${i}`](), values[i]); +} + +// Initializer expressions can also be used in elem section initializers. +wasmFailValidateText(`(module (import "globals" "a" (global f32)) (table 4 anyfunc) (elem (get_global 0) $f) (func $f))`, /type mismatch/); + +module = wasmEvalText(`(module + (import "globals" "a" (global i32)) + (table (export "tbl") 4 anyfunc) + (elem (get_global 0) $f) + (func $f) + (export "f" $f) +)`, { + globals: { + a: 1 + } +}).exports; +assertEq(module.f, module.tbl.get(1)); + +// Import/export rules. +wasmFailValidateText(`(module (import "globals" "x" (global (mut i32))))`, /can't import.* mutable globals in the MVP/); +wasmFailValidateText(`(module (global (mut i32) (i32.const 42)) (export "" global 0))`, /can't .*export mutable globals in the MVP/); + +// Import/export semantics. +module = wasmEvalText(`(module + (import $g "globals" "x" (global i32)) + (func $get (result i32) (get_global $g)) + (export "getter" $get) + (export "value" global 0) +)`, { globals: {x: 42} }).exports; + +assertEq(module.getter(), 42); +assertEq(module.value, 42); + +// Can only import numbers (no implicit coercions). +module = new WebAssembly.Module(wasmTextToBinary(`(module + (global (import "globs" "i32") i32) + (global (import "globs" "f32") f32) + (global (import "globs" "f64") f32) +)`)); + +const assertLinkFails = (m, imp, err) => { + assertErrorMessage(() => new WebAssembly.Instance(m, imp), TypeError, err); +} + +var imp = { + globs: { + i32: 0, + f32: Infinity, + f64: NaN + } +}; + +let i = new WebAssembly.Instance(module, imp); + +for (let v of [ + null, + {}, + "42", + /not a number/, + false, + undefined, + Symbol(), + { valueOf() { return 42; } } +]) { + imp.globs.i32 = v; + assertLinkFails(module, imp, /not a number/); + + imp.globs.i32 = 0; + imp.globs.f32 = v; + assertLinkFails(module, imp, /not a number/); + + imp.globs.f32 = Math.fround(13.37); + imp.globs.f64 = v; + assertLinkFails(module, imp, /not a number/); + + imp.globs.f64 = 13.37; +} + +// Imported globals and locally defined globals use the same index space. +module = wasmEvalText(`(module + (import "globals" "x" (global i32)) + (global i32 (i32.const 1337)) + (export "imported" global 0) + (export "defined" global 1) +)`, { globals: {x: 42} }).exports; + +assertEq(module.imported, 42); +assertEq(module.defined, 1337); + +// Initializer expressions can reference an imported immutable global. +wasmFailValidateText(`(module (global f32 (f32.const 13.37)) (global i32 (get_global 0)))`, /must reference a global immutable import/); +wasmFailValidateText(`(module (global (mut f32) (f32.const 13.37)) (global i32 (get_global 0)))`, /must reference a global immutable import/); +wasmFailValidateText(`(module (global (mut i32) (i32.const 0)) (global i32 (get_global 0)))`, /must reference a global immutable import/); + +wasmFailValidateText(`(module (import "globals" "a" (global f32)) (global i32 (get_global 0)))`, /type mismatch/); + +function testInitExpr(type, initialValue, nextValue, coercion, assertFunc = assertEq) { + var module = wasmEvalText(`(module + (import "globals" "a" (global ${type})) + + (global (mut ${type}) (get_global 0)) + (global ${type} (get_global 0)) + + (func $get0 (result ${type}) (get_global 0)) + + (func $get1 (result ${type}) (get_global 1)) + (func $set1 (param ${type}) (set_global 1 (get_local 0))) + + (func $get_cst (result ${type}) (get_global 2)) + + (export "get0" $get0) + (export "get1" $get1) + (export "get_cst" $get_cst) + + (export "set1" $set1) + )`, { + globals: { + a: coercion(initialValue) + } + }).exports; + + assertFunc(module.get0(), coercion(initialValue)); + assertFunc(module.get1(), coercion(initialValue)); + + assertEq(module.set1(coercion(nextValue)), undefined); + assertFunc(module.get1(), coercion(nextValue)); + assertFunc(module.get0(), coercion(initialValue)); + + assertFunc(module.get_cst(), coercion(initialValue)); +} + +testInitExpr('i32', 13, 37, x => x|0); +testInitExpr('f32', 13.37, 0.1989, Math.fround); +testInitExpr('f64', 13.37, 0.1989, x => +x); + +// Int64. +{ + wasmFailValidateText(`(module (import "globals" "x" (global i64)))`, /can't import.* an Int64 global/); + wasmFailValidateText(`(module (global i64 (i64.const 42)) (export "" global 0))`, /can't .*export an Int64 global/); + + setJitCompilerOption('wasm.test-mode', 1); + testInner('i64', '0x531642753864975F', '0x123456789abcdef0', createI64, assertEqI64); + testInitExpr('i64', '0x531642753864975F', '0x123456789abcdef0', createI64, assertEqI64); + + module = wasmEvalText(`(module + (import "globals" "x" (global i64)) + (global i64 (i64.const 0xFAFADADABABA)) + (export "imported" global 0) + (export "defined" global 1) + )`, { globals: {x: createI64('0x1234567887654321')} }).exports; + + assertEqI64(module.imported, createI64('0x1234567887654321')); + assertEqI64(module.defined, createI64('0xFAFADADABABA')); + + setJitCompilerOption('wasm.test-mode', 0); +} diff --git a/js/src/jit-test/tests/wasm/grow-memory.js b/js/src/jit-test/tests/wasm/grow-memory.js new file mode 100644 index 000000000..53dcfcc84 --- /dev/null +++ b/js/src/jit-test/tests/wasm/grow-memory.js @@ -0,0 +1,47 @@ +load(libdir + "wasm.js"); + +function linearModule(min, max, ops) { + var opsText = ops.map(function (op) { + if (op[0] == "CM") { + res = `(if i32 (i32.ne (current_memory) (i32.const ${op[1]})) + (i32.load offset=10 (i32.const 4294967295)) + (i32.const 0))` + } else if (op[0] == "GM") { + res = `(if i32 (i32.ne (grow_memory (i32.const ${op[1]})) (i32.const ${op[2]})) + (i32.load offset=10 (i32.const 4294967295)) + (i32.const 0))` + } else if (op[0] == "L") { + var type = op[1]; + var ext = op[2]; + var off = op[3]; + var loc = op[4] + var align = 0; + res = `(${type}.load${ext} offset=${off} (i32.const ${op[4]}))`; + } else if (op[0] == "S") { + var type = op[1]; + var ext = op[2]; + var off = op[3]; + var loc = op[4] + var align = 0; + res = `(${type}.store${ext} offset=${off} (i32.const ${op[4]}) (i32.const 42))`; + } + return res; + }).join("\n") + + let text = + `(module + (memory ${min} ${max}) + ` + (min != 0 ? `(data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff")` + : "") + + ` + (func (result i32) + (drop ` + opsText + `) + (current_memory) + ) (export "run" 0))`; + + return text; +} + +// Just grow some memory +wasmFullPass(linearModule(3,5, [["CM", 3]]), 3); diff --git a/js/src/jit-test/tests/wasm/import-export.js b/js/src/jit-test/tests/wasm/import-export.js new file mode 100644 index 000000000..036a794d2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/import-export.js @@ -0,0 +1,590 @@ +load(libdir + 'wasm.js'); + +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; +const Memory = WebAssembly.Memory; +const Table = WebAssembly.Table; + +const mem1Page = new Memory({initial:1}); +const mem1PageMax1 = new Memory({initial:1, maximum: 1}); +const mem2Page = new Memory({initial:2}); +const mem2PageMax2 = new Memory({initial:2, maximum: 2}); +const mem2PageMax3 = new Memory({initial:2, maximum: 3}); +const mem2PageMax4 = new Memory({initial:2, maximum: 4}); +const mem3Page = new Memory({initial:3}); +const mem3PageMax3 = new Memory({initial:3, maximum: 3}); +const mem4Page = new Memory({initial:4}); +const mem4PageMax4 = new Memory({initial:4, maximum: 4}); +const tab1Elem = new Table({initial:1, element:"anyfunc"}); +const tab2Elem = new Table({initial:2, element:"anyfunc"}); +const tab3Elem = new Table({initial:3, element:"anyfunc"}); +const tab4Elem = new Table({initial:4, element:"anyfunc"}); + +assertErrorMessage(() => new Memory({initial:2, maximum:1}), RangeError, /bad Memory maximum size/); + +const m1 = new Module(wasmTextToBinary('(module (import "foo" "bar") (import "baz" "quux"))')); +assertErrorMessage(() => new Instance(m1), TypeError, /second argument must be an object/); +assertErrorMessage(() => new Instance(m1, {foo:null}), TypeError, /import object field 'foo' is not an Object/); +assertErrorMessage(() => new Instance(m1, {foo:{bar:{}}}), TypeError, /import object field 'bar' is not a Function/); +assertErrorMessage(() => new Instance(m1, {foo:{bar:()=>{}}, baz:null}), TypeError, /import object field 'baz' is not an Object/); +assertErrorMessage(() => new Instance(m1, {foo:{bar:()=>{}}, baz:{}}), TypeError, /import object field 'quux' is not a Function/); +assertEq(new Instance(m1, {foo:{bar:()=>{}}, baz:{quux:()=>{}}}) instanceof Instance, true); + +const m2 = new Module(wasmTextToBinary('(module (import "x" "y" (memory 2 3)))')); +assertErrorMessage(() => new Instance(m2), TypeError, /second argument must be an object/); +assertErrorMessage(() => new Instance(m2, {x:null}), TypeError, /import object field 'x' is not an Object/); +assertErrorMessage(() => new Instance(m2, {x:{y:{}}}), TypeError, /import object field 'y' is not a Memory/); +assertErrorMessage(() => new Instance(m2, {x:{y:mem1Page}}), TypeError, /imported Memory with incompatible size/); +assertErrorMessage(() => new Instance(m2, {x:{y:mem1PageMax1}}), TypeError, /imported Memory with incompatible size/); +assertErrorMessage(() => new Instance(m2, {x:{y:mem4Page}}), TypeError, /imported Memory with incompatible size/); +assertErrorMessage(() => new Instance(m2, {x:{y:mem4PageMax4}}), TypeError, /imported Memory with incompatible size/); +assertErrorMessage(() => new Instance(m2, {x:{y:mem2Page}}), TypeError, /imported Memory with incompatible maximum size/); +assertEq(new Instance(m2, {x:{y:mem2PageMax2}}) instanceof Instance, true); +assertErrorMessage(() => new Instance(m2, {x:{y:mem3Page}}), TypeError, /imported Memory with incompatible maximum size/); +assertEq(new Instance(m2, {x:{y:mem3PageMax3}}) instanceof Instance, true); +assertEq(new Instance(m2, {x:{y:mem2PageMax3}}) instanceof Instance, true); +assertErrorMessage(() => new Instance(m2, {x:{y:mem2PageMax4}}), TypeError, /imported Memory with incompatible maximum size/); + +const m3 = new Module(wasmTextToBinary('(module (import "foo" "bar" (memory 1 1)) (import "baz" "quux"))')); +assertErrorMessage(() => new Instance(m3), TypeError, /second argument must be an object/); +assertErrorMessage(() => new Instance(m3, {foo:null}), TypeError, /import object field 'foo' is not an Object/); +assertErrorMessage(() => new Instance(m3, {foo:{bar:{}}}), TypeError, /import object field 'bar' is not a Memory/); +assertErrorMessage(() => new Instance(m3, {foo:{bar:mem1Page}, baz:null}), TypeError, /import object field 'baz' is not an Object/); +assertErrorMessage(() => new Instance(m3, {foo:{bar:mem1Page}, baz:{quux:mem1Page}}), TypeError, /import object field 'quux' is not a Function/); +assertErrorMessage(() => new Instance(m3, {foo:{bar:mem1Page}, baz:{quux:()=>{}}}), TypeError, /imported Memory with incompatible maximum size/); +assertEq(new Instance(m3, {foo:{bar:mem1PageMax1}, baz:{quux:()=>{}}}) instanceof Instance, true); + +const m4 = new Module(wasmTextToBinary('(module (import "baz" "quux") (import "foo" "bar" (memory 1 1)))')); +assertErrorMessage(() => new Instance(m4), TypeError, /second argument must be an object/); +assertErrorMessage(() => new Instance(m4, {baz:null}), TypeError, /import object field 'baz' is not an Object/); +assertErrorMessage(() => new Instance(m4, {baz:{quux:{}}}), TypeError, /import object field 'quux' is not a Function/); +assertErrorMessage(() => new Instance(m4, {baz:{quux:()=>{}}, foo:null}), TypeError, /import object field 'foo' is not an Object/); +assertErrorMessage(() => new Instance(m4, {baz:{quux:()=>{}}, foo:{bar:()=>{}}}), TypeError, /import object field 'bar' is not a Memory/); +assertErrorMessage(() => new Instance(m4, {baz:{quux:()=>{}}, foo:{bar:mem1Page}}), TypeError, /imported Memory with incompatible maximum size/); +assertEq(new Instance(m3, {baz:{quux:()=>{}}, foo:{bar:mem1PageMax1}}) instanceof Instance, true); + +const m5 = new Module(wasmTextToBinary('(module (import "a" "b" (memory 2)))')); +assertErrorMessage(() => new Instance(m5, {a:{b:mem1Page}}), TypeError, /imported Memory with incompatible size/); +assertEq(new Instance(m5, {a:{b:mem2Page}}) instanceof Instance, true); +assertEq(new Instance(m5, {a:{b:mem3Page}}) instanceof Instance, true); +assertEq(new Instance(m5, {a:{b:mem4Page}}) instanceof Instance, true); + +const m6 = new Module(wasmTextToBinary('(module (import "a" "b" (table 2 anyfunc)))')); +assertErrorMessage(() => new Instance(m6, {a:{b:tab1Elem}}), TypeError, /imported Table with incompatible size/); +assertEq(new Instance(m6, {a:{b:tab2Elem}}) instanceof Instance, true); +assertEq(new Instance(m6, {a:{b:tab3Elem}}) instanceof Instance, true); +assertEq(new Instance(m6, {a:{b:tab4Elem}}) instanceof Instance, true); + +const m7 = new Module(wasmTextToBinary('(module (import "a" "b" (table 2 3 anyfunc)))')); +assertErrorMessage(() => new Instance(m7, {a:{b:tab1Elem}}), TypeError, /imported Table with incompatible size/); +assertErrorMessage(() => new Instance(m7, {a:{b:tab2Elem}}), TypeError, /imported Table with incompatible maximum size/); +assertErrorMessage(() => new Instance(m7, {a:{b:tab3Elem}}), TypeError, /imported Table with incompatible maximum size/); +assertErrorMessage(() => new Instance(m7, {a:{b:tab4Elem}}), TypeError, /imported Table with incompatible size/); + +wasmFailValidateText('(module (memory 2 1))', /maximum length 1 is less than initial length 2/); +wasmFailValidateText('(module (import "a" "b" (memory 2 1)))', /maximum length 1 is less than initial length 2/); +wasmFailValidateText('(module (table 2 1 anyfunc))', /maximum length 1 is less than initial length 2/); +wasmFailValidateText('(module (import "a" "b" (table 2 1 anyfunc)))', /maximum length 1 is less than initial length 2/); + +// Import wasm-wasm type mismatch + +var e = wasmEvalText('(module (func $i2v (param i32)) (export "i2v" $i2v) (func $f2v (param f32)) (export "f2v" $f2v))').exports; +var i2vm = new Module(wasmTextToBinary('(module (import "a" "b" (param i32)))')); +var f2vm = new Module(wasmTextToBinary('(module (import "a" "b" (param f32)))')); +assertEq(new Instance(i2vm, {a:{b:e.i2v}}) instanceof Instance, true); +assertErrorMessage(() => new Instance(i2vm, {a:{b:e.f2v}}), TypeError, /imported function signature mismatch/); +assertErrorMessage(() => new Instance(f2vm, {a:{b:e.i2v}}), TypeError, /imported function signature mismatch/); +assertEq(new Instance(f2vm, {a:{b:e.f2v}}) instanceof Instance, true); + +// Import order: + +var arr = []; +var importObj = { + get foo() { arr.push("foo") }, + get baz() { arr.push("bad") }, +}; +assertErrorMessage(() => new Instance(m1, importObj), TypeError, /import object field 'foo' is not an Object/); +assertEq(arr.join(), "foo"); + +var arr = []; +var importObj = { + get foo() { + arr.push("foo"); + return { get bar() { arr.push("bar"); return null } } + }, + get baz() { arr.push("bad") }, +}; +assertErrorMessage(() => new Instance(m1, importObj), TypeError, /import object field 'bar' is not a Function/); +assertEq(arr.join(), "foo,bar"); + +var arr = []; +var importObj = { + get foo() { + arr.push("foo"); + return { get bar() { arr.push("bar"); return () => arr.push("bad") } } + }, + get baz() { + arr.push("baz"); + return { get quux() { arr.push("quux"); return () => arr.push("bad") } } + } +}; +assertEq(new Instance(m1, importObj) instanceof Instance, true); +assertEq(arr.join(), "foo,bar,baz,quux"); + +var arr = []; +var importObj = { + get foo() { + arr.push("foo"); + return { get bar() { arr.push("bar"); return new WebAssembly.Memory({initial:1, maximum:1}) } } + }, + get baz() { + arr.push("baz"); + return { get quux() { arr.push("quux"); return () => arr.push("bad") } } + } +}; +assertEq(new Instance(m3, importObj) instanceof Instance, true); +assertEq(arr.join(), "foo,bar,baz,quux"); +arr = []; +assertEq(new Instance(m4, importObj) instanceof Instance, true); +assertEq(arr.join(), "baz,quux,foo,bar"); + +// Export key order: + +var code = wasmTextToBinary('(module)'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).length, 0); + +var code = wasmTextToBinary('(module (func) (export "foo" 0))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "foo"); +assertEq(e.foo(), undefined); + +var code = wasmTextToBinary('(module (func) (export "foo" 0) (export "bar" 0))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "foo,bar"); +assertEq(e.foo(), undefined); +assertEq(e.bar(), undefined); +assertEq(e.foo, e.bar); + +var code = wasmTextToBinary('(module (memory 1 1) (export "memory" memory))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "memory"); + +var code = wasmTextToBinary('(module (memory 1 1) (export "foo" memory) (export "bar" memory))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "foo,bar"); +assertEq(e.foo, e.bar); +assertEq(e.foo instanceof Memory, true); +assertEq(e.foo.buffer.byteLength, 64*1024); + +var code = wasmTextToBinary('(module (memory 1 1) (func) (export "foo" 0) (export "bar" memory))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "foo,bar"); +assertEq(e.foo(), undefined); +assertEq(e.bar instanceof Memory, true); +assertEq(e.bar instanceof Memory, true); +assertEq(e.bar.buffer.byteLength, 64*1024); + +var code = wasmTextToBinary('(module (memory 1 1) (func) (export "bar" memory) (export "foo" 0))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "bar,foo"); +assertEq(e.foo(), undefined); +assertEq(e.bar.buffer.byteLength, 64*1024); + +var code = wasmTextToBinary('(module (memory 1 1) (export "" memory))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).length, 1); +assertEq(String(Object.keys(e)), ""); +assertEq(e[""] instanceof Memory, true); + +var code = wasmTextToBinary('(module (table 0 anyfunc) (export "tbl" table))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "tbl"); +assertEq(e.tbl instanceof Table, true); +assertEq(e.tbl.length, 0); + +var code = wasmTextToBinary('(module (table 2 anyfunc) (export "t1" table) (export "t2" table))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "t1,t2"); +assertEq(e.t1 instanceof Table, true); +assertEq(e.t2 instanceof Table, true); +assertEq(e.t1, e.t2); +assertEq(e.t1.length, 2); + +var code = wasmTextToBinary('(module (table 2 anyfunc) (memory 1 1) (func) (export "t" table) (export "m" memory) (export "f" 0))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "t,m,f"); +assertEq(e.f(), undefined); +assertEq(e.t instanceof Table, true); +assertEq(e.m instanceof Memory, true); +assertEq(e.t.length, 2); + +var code = wasmTextToBinary('(module (table 1 anyfunc) (memory 1 1) (func) (export "m" memory) (export "f" 0) (export "t" table))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "m,f,t"); +assertEq(e.f(), undefined); +assertEq(e.t instanceof Table, true); +assertEq(e.m instanceof Memory, true); ++assertEq(e.t.length, 1); + +var code = wasmTextToBinary('(module (table 0 anyfunc) (export "" table))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).length, 1); +assertEq(String(Object.keys(e)), ""); +assertEq(e[""] instanceof Table, true); ++assertEq(e[""].length, 0); + +// Table export function identity + +var text = `(module + (func $f (result i32) (i32.const 1)) + (func $g (result i32) (i32.const 2)) + (func $h (result i32) (i32.const 3)) + (table 4 anyfunc) + (elem (i32.const 0) $f) + (elem (i32.const 2) $g) + (export "f1" $f) + (export "tbl1" table) + (export "f2" $f) + (export "tbl2" table) + (export "f3" $h) + (func (export "run") (result i32) (call_indirect 0 (i32.const 2))) +)`; +wasmFullPass(text, 2); +var e = new Instance(new Module(wasmTextToBinary(text))).exports; +assertEq(String(Object.keys(e)), "f1,tbl1,f2,tbl2,f3,run"); +assertEq(e.f1, e.f2); +assertEq(e.f1(), 1); +assertEq(e.f3(), 3); +assertEq(e.tbl1, e.tbl2); +assertEq(e.tbl1.get(0), e.f1); +assertEq(e.tbl1.get(0), e.tbl1.get(0)); +assertEq(e.tbl1.get(0)(), 1); +assertEq(e.tbl1.get(1), null); +assertEq(e.tbl1.get(2), e.tbl1.get(2)); +assertEq(e.tbl1.get(2)(), 2); +assertEq(e.tbl1.get(3), null); +assertErrorMessage(() => e.tbl1.get(4), RangeError, /bad Table get index/); +assertEq(e.tbl1.get(1), null); +e.tbl1.set(1, e.f3); +assertEq(e.tbl1.get(1), e.f3); +e.tbl1.set(1, null); +assertEq(e.tbl1.get(1), null); +e.tbl1.set(3, e.f1); +assertEq(e.tbl1.get(0), e.tbl1.get(3)); + +// JS re-exports + +var args; +var m = new Module(wasmTextToBinary(`(module + (export "a" $a) (import $a "" "a" (param f32)) + (export "b" $b) (import $b "" "b" (param i32) (result i32)) + (export "c" $c) (import $c "" "c" (result i32)) + (export "d" $d) (import $d "" "d") +)`)); +var js = function() { args = arguments; return 42 } +var e = new Instance(m, {"":{a:js, b:js, c:js, d:js}}).exports; +assertEq(e.a.length, 1); +assertEq(e.a(), undefined); +assertEq(args.length, 1); +assertEq(args[0], NaN); +assertEq(e.a(99.5), undefined); +assertEq(args.length, 1); +assertEq(args[0], 99.5); +assertEq(e.b.length, 1); +assertEq(e.b(), 42); +assertEq(args.length, 1); +assertEq(args[0], 0); +assertEq(e.b(99.5), 42); +assertEq(args.length, 1); +assertEq(args[0], 99); +assertEq(e.c.length, 0); +assertEq(e.c(), 42); +assertEq(args.length, 0); +assertEq(e.c(99), 42); +assertEq(args.length, 0); +assertEq(e.d.length, 0); +assertEq(e.d(), undefined); +assertEq(args.length, 0); +assertEq(e.d(99), undefined); +assertEq(args.length, 0); + +// Re-exports and Identity: + +var code = wasmTextToBinary('(module (import "a" "b" (memory 1 1)) (export "foo" memory) (export "bar" memory))'); +var mem = new Memory({initial:1, maximum:1}); +var e = new Instance(new Module(code), {a:{b:mem}}).exports; +assertEq(mem, e.foo); +assertEq(mem, e.bar); + +var code = wasmTextToBinary('(module (import "a" "b" (table 1 1 anyfunc)) (export "foo" table) (export "bar" table))'); +var tbl = new Table({initial:1, maximum:1, element:"anyfunc"}); +var e = new Instance(new Module(code), {a:{b:tbl}}).exports; +assertEq(tbl, e.foo); +assertEq(tbl, e.bar); + +var code = wasmTextToBinary('(module (import "a" "b" (table 2 2 anyfunc)) (func $foo) (elem (i32.const 0) $foo) (export "foo" $foo))'); +var tbl = new Table({initial:2, maximum:2, element:"anyfunc"}); +var e1 = new Instance(new Module(code), {a:{b:tbl}}).exports; +assertEq(e1.foo, tbl.get(0)); +tbl.set(1, e1.foo); +assertEq(e1.foo, tbl.get(1)); +var e2 = new Instance(new Module(code), {a:{b:tbl}}).exports; +assertEq(e2.foo, tbl.get(0)); +assertEq(e1.foo, tbl.get(1)); +assertEq(tbl.get(0) === e1.foo, false); +assertEq(e1.foo === e2.foo, false); + +var m = new Module(wasmTextToBinary(`(module + (table 3 anyfunc) + (import $foo "" "foo" (result i32)) + (import $bar "" "bar" (result i32)) + (func $baz (result i32) (i32.const 13)) + (elem (i32.const 0) $foo $bar $baz) + (export "foo" $foo) + (export "bar" $bar) + (export "baz" $baz) + (export "tbl" table) +)`)); +var jsFun = () => 83; +var wasmFun = new Instance(new Module(wasmTextToBinary('(module (func (result i32) (i32.const 42)) (export "foo" 0))'))).exports.foo; +var e1 = new Instance(m, {"":{foo:jsFun, bar:wasmFun}}).exports; +assertEq(jsFun === e1.foo, false); +assertEq(wasmFun, e1.bar); +assertEq(e1.foo, e1.tbl.get(0)); +assertEq(e1.bar, e1.tbl.get(1)); +assertEq(e1.baz, e1.tbl.get(2)); +assertEq(e1.tbl.get(0)(), 83); +assertEq(e1.tbl.get(1)(), 42); +assertEq(e1.tbl.get(2)(), 13); +var e2 = new Instance(m, {"":{foo:jsFun, bar:jsFun}}).exports; +assertEq(jsFun === e2.foo, false); +assertEq(jsFun === e2.bar, false); +assertEq(e2.foo === e1.foo, false); +assertEq(e2.bar === e1.bar, false); +assertEq(e2.baz === e1.baz, false); +assertEq(e2.tbl === e1.tbl, false); +assertEq(e2.foo, e2.tbl.get(0)); +assertEq(e2.bar, e2.tbl.get(1)); +assertEq(e2.baz, e2.tbl.get(2)); +var e3 = new Instance(m, {"":{foo:wasmFun, bar:wasmFun}}).exports; +assertEq(wasmFun, e3.foo); +assertEq(wasmFun, e3.bar); +assertEq(e3.baz === e3.foo, false); +assertEq(e3.baz === e1.baz, false); +assertEq(e3.tbl === e1.tbl, false); +assertEq(e3.foo, e3.tbl.get(0)); +assertEq(e3.bar, e3.tbl.get(1)); +assertEq(e3.baz, e3.tbl.get(2)); +var e4 = new Instance(m, {"":{foo:e1.foo, bar:e1.foo}}).exports; +assertEq(e4.foo, e1.foo); +assertEq(e4.bar, e1.foo); +assertEq(e4.baz === e4.foo, false); +assertEq(e4.baz === e1.baz, false); +assertEq(e4.tbl === e1.tbl, false); +assertEq(e4.foo, e4.tbl.get(0)); +assertEq(e4.foo, e4.tbl.get(1)); +assertEq(e4.baz, e4.tbl.get(2)); + +// i64 is fully allowed for imported wasm functions + +var code1 = wasmTextToBinary('(module (func $exp (param i64) (result i64) (i64.add (get_local 0) (i64.const 10))) (export "exp" $exp))'); +var e1 = new Instance(new Module(code1)).exports; +var code2 = wasmTextToBinary('(module (import $i "a" "b" (param i64) (result i64)) (func $f (result i32) (i32.wrap/i64 (call $i (i64.const 42)))) (export "f" $f))'); +var e2 = new Instance(new Module(code2), {a:{b:e1.exp}}).exports; +assertEq(e2.f(), 52); + +// Non-existent export errors + +wasmFailValidateText('(module (export "a" 0))', /exported function index out of bounds/); +wasmFailValidateText('(module (export "a" global 0))', /exported global index out of bounds/); +wasmFailValidateText('(module (export "a" memory))', /exported memory index out of bounds/); +wasmFailValidateText('(module (export "a" table))', /exported table index out of bounds/); + +// Default memory/table rules + +wasmFailValidateText('(module (import "a" "b" (memory 1 1)) (memory 1 1))', /already have default memory/); +wasmFailValidateText('(module (import "a" "b" (memory 1 1)) (import "x" "y" (memory 2 2)))', /already have default memory/); +wasmFailValidateText('(module (import "a" "b" (table 1 1 anyfunc)) (table 1 1 anyfunc))', /already have default table/); +wasmFailValidateText('(module (import "a" "b" (table 1 1 anyfunc)) (import "x" "y" (table 2 2 anyfunc)))', /already have default table/); + +// Data segments on imports + +var m = new Module(wasmTextToBinary(` + (module + (import "a" "b" (memory 1 1)) + (data (i32.const 0) "\\0a\\0b") + (data (i32.const 100) "\\0c\\0d") + (func $get (param $p i32) (result i32) + (i32.load8_u (get_local $p))) + (export "get" $get)) +`)); +var mem = new Memory({initial:1, maximum:1}); +var {get} = new Instance(m, {a:{b:mem}}).exports; +assertEq(get(0), 0xa); +assertEq(get(1), 0xb); +assertEq(get(2), 0x0); +assertEq(get(100), 0xc); +assertEq(get(101), 0xd); +assertEq(get(102), 0x0); +var i8 = new Uint8Array(mem.buffer); +assertEq(i8[0], 0xa); +assertEq(i8[1], 0xb); +assertEq(i8[2], 0x0); +assertEq(i8[100], 0xc); +assertEq(i8[101], 0xd); +assertEq(i8[102], 0x0); + +// Data segments with imported offsets + +var m = new Module(wasmTextToBinary(` + (module + (import "glob" "a" (global i32)) + (memory 1) + (data (get_global 0) "\\0a\\0b")) +`)); +assertEq(new Instance(m, {glob:{a:0}}) instanceof Instance, true); +assertEq(new Instance(m, {glob:{a:(64*1024 - 2)}}) instanceof Instance, true); +assertErrorMessage(() => new Instance(m, {glob:{a:(64*1024 - 1)}}), RangeError, /data segment does not fit/); +assertErrorMessage(() => new Instance(m, {glob:{a:64*1024}}), RangeError, /data segment does not fit/); + +var m = new Module(wasmTextToBinary(` + (module + (memory 1) + (data (i32.const 0x10001) "\\0a\\0b")) +`)); +assertErrorMessage(() => new Instance(m), RangeError, /data segment does not fit/); + +var m = new Module(wasmTextToBinary(` + (module + (memory 0) + (data (i32.const 0x10001) "")) +`)); +assertEq(new Instance(m) instanceof Instance, true); + +// Errors during segment initialization do not have observable effects +// and are checked against the actual memory/table length, not the declared +// initial length. + +var m = new Module(wasmTextToBinary(` + (module + (import "a" "mem" (memory 1)) + (import "a" "tbl" (table 1 anyfunc)) + (import $memOff "a" "memOff" (global i32)) + (import $tblOff "a" "tblOff" (global i32)) + (func $f) + (func $g) + (data (i32.const 0) "\\01") + (elem (i32.const 0) $f) + (data (get_global $memOff) "\\02") + (elem (get_global $tblOff) $g) + (export "f" $f) + (export "g" $g)) +`)); + +var npages = 2; +var mem = new Memory({initial:npages}); +var mem8 = new Uint8Array(mem.buffer); +var tbl = new Table({initial:2, element:"anyfunc"}); + +assertErrorMessage(() => new Instance(m, {a:{mem, tbl, memOff:1, tblOff:2}}), RangeError, /elem segment does not fit/); +assertEq(mem8[0], 0); +assertEq(mem8[1], 0); +assertEq(tbl.get(0), null); + +assertErrorMessage(() => new Instance(m, {a:{mem, tbl, memOff:npages*64*1024, tblOff:1}}), RangeError, /data segment does not fit/); +assertEq(mem8[0], 0); +assertEq(tbl.get(0), null); +assertEq(tbl.get(1), null); + +var i = new Instance(m, {a:{mem, tbl, memOff:npages*64*1024-1, tblOff:1}}); +assertEq(mem8[0], 1); +assertEq(mem8[npages*64*1024-1], 2); +assertEq(tbl.get(0), i.exports.f); +assertEq(tbl.get(1), i.exports.g); + +// Elem segments on imported tables + +var m = new Module(wasmTextToBinary(` + (module + (import "a" "b" (table 10 anyfunc)) + (elem (i32.const 0) $one $two) + (elem (i32.const 3) $three $four) + (func $one (result i32) (i32.const 1)) + (func $two (result i32) (i32.const 2)) + (func $three (result i32) (i32.const 3)) + (func $four (result i32) (i32.const 4))) +`)); +var tbl = new Table({initial:10, element:"anyfunc"}); +new Instance(m, {a:{b:tbl}}); +assertEq(tbl.get(0)(), 1); +assertEq(tbl.get(1)(), 2); +assertEq(tbl.get(2), null); +assertEq(tbl.get(3)(), 3); +assertEq(tbl.get(4)(), 4); +for (var i = 5; i < 10; i++) + assertEq(tbl.get(i), null); + +var m = new Module(wasmTextToBinary(` + (module + (func $their1 (import "" "func") (result i32)) + (func $their2 (import "" "func")) + (table (import "" "table") 4 anyfunc) + (func $my (result i32) i32.const 13) + (elem (i32.const 1) $my) + (elem (i32.const 2) $their1) + (elem (i32.const 3) $their2) + ) +`)); +var tbl = new Table({initial:4, element:"anyfunc"}); +var f = () => 42; +new Instance(m, { "": { table: tbl, func: f} }); +assertEq(tbl.get(0), null); +assertEq(tbl.get(1)(), 13); +assertEq(tbl.get(2)(), 42); +assertEq(tbl.get(3)(), undefined); + +// Cross-instance calls + +var i1 = new Instance(new Module(wasmTextToBinary(`(module (func) (func (param i32) (result i32) (i32.add (get_local 0) (i32.const 1))) (func) (export "f" 1))`))); +var i2 = new Instance(new Module(wasmTextToBinary(`(module (import $imp "a" "b" (param i32) (result i32)) (func $g (result i32) (call $imp (i32.const 13))) (export "g" $g))`)), {a:{b:i1.exports.f}}); +assertEq(i2.exports.g(), 14); + +var i1 = new Instance(new Module(wasmTextToBinary(`(module + (memory 1 1) + (data (i32.const 0) "\\42") + (func $f (result i32) (i32.load (i32.const 0))) + (export "f" $f) +)`))); +var i2 = new Instance(new Module(wasmTextToBinary(`(module + (import $imp "a" "b" (result i32)) + (memory 1 1) + (data (i32.const 0) "\\13") + (table 2 2 anyfunc) + (elem (i32.const 0) $imp $def) + (func $def (result i32) (i32.load (i32.const 0))) + (type $v2i (func (result i32))) + (func $call (param i32) (result i32) (call_indirect $v2i (get_local 0))) + (export "call" $call) +)`)), {a:{b:i1.exports.f}}); +assertEq(i2.exports.call(0), 0x42); +assertEq(i2.exports.call(1), 0x13); + +var m = new Module(wasmTextToBinary(`(module + (import $val "a" "val" (global i32)) + (import $next "a" "next" (result i32)) + (memory 1) + (func $start (i32.store (i32.const 0) (get_global $val))) + (start $start) + (func $call (result i32) + (i32.add + (get_global $val) + (i32.add + (i32.load (i32.const 0)) + (call $next)))) + (export "call" $call) +)`)); +var e = {call:() => 1000}; +for (var i = 0; i < 10; i++) + e = new Instance(m, {a:{val:i, next:e.call}}).exports; +assertEq(e.call(), 1090); diff --git a/js/src/jit-test/tests/wasm/import-gc.js b/js/src/jit-test/tests/wasm/import-gc.js new file mode 100644 index 000000000..ca86fe1bc --- /dev/null +++ b/js/src/jit-test/tests/wasm/import-gc.js @@ -0,0 +1,64 @@ +// |jit-test| --no-baseline +// Turn off baseline and since it messes up the GC finalization assertions by +// adding spurious edges to the GC graph. + +load(libdir + 'wasm.js'); + +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; + +const m1 = new Module(wasmTextToBinary(`(module (func $f) (export "f" $f))`)); +const m2 = new Module(wasmTextToBinary(`(module (import "a" "f") (func $f) (export "g" $f))`)); + +// Imported instance objects should stay alive as long as any importer is alive. +resetFinalizeCount(); +var i1 = new Instance(m1); +var i2 = new Instance(m2, {a:i1.exports}); +var f = i1.exports.f; +var g = i2.exports.g; +i1.edge = makeFinalizeObserver(); +i2.edge = makeFinalizeObserver(); +f.edge = makeFinalizeObserver(); +g.edge = makeFinalizeObserver(); +gc(); +assertEq(finalizeCount(), 0); +i1.exports = null; +f = null; +gc(); +assertEq(finalizeCount(), 1); +i2 = null; +gc(); +assertEq(finalizeCount(), 1); +i1 = null; +gc(); +assertEq(finalizeCount(), 1); +g = null; +gc(); +assertEq(finalizeCount(), 4); + +// ...but the importee doesn't keep the importer alive. +resetFinalizeCount(); +var i1 = new Instance(m1); +var i2 = new Instance(m2, {a:i1.exports}); +var f = i1.exports.f; +var g = i2.exports.g; +i1.edge = makeFinalizeObserver(); +i2.edge = makeFinalizeObserver(); +f.edge = makeFinalizeObserver(); +g.edge = makeFinalizeObserver(); +gc(); +assertEq(finalizeCount(), 0); +i2.exports = null; +g = null; +gc(); +assertEq(finalizeCount(), 1); +i2 = null; +gc(); +assertEq(finalizeCount(), 2); +i1.exports = null; +f = null; +gc(); +assertEq(finalizeCount(), 3); +i1 = null; +gc(); +assertEq(finalizeCount(), 4); diff --git a/js/src/jit-test/tests/wasm/integer.js b/js/src/jit-test/tests/wasm/integer.js new file mode 100644 index 000000000..ba57e6535 --- /dev/null +++ b/js/src/jit-test/tests/wasm/integer.js @@ -0,0 +1,339 @@ +load(libdir + "wasm.js"); + +assertEq(wasmEvalText('(module (func (result i32) (i32.const -1)) (export "" 0))').exports[""](), -1); +assertEq(wasmEvalText('(module (func (result i32) (i32.const -2147483648)) (export "" 0))').exports[""](), -2147483648); +assertEq(wasmEvalText('(module (func (result i32) (i32.const 4294967295)) (export "" 0))').exports[""](), -1); + +function testUnary(type, opcode, op, expect) { + var fullPass = wasmFullPass; + if (type === 'i64') { + expect = createI64(expect); + fullPass = wasmFullPassI64; + } + + // Test with constant + fullPass(`(module (func (result ${type}) (${type}.${opcode} (${type}.const ${op}))) (export "run" 0))`, expect); + + if (type === 'i64') { + op = createI64(op); + } + + // Test with param + fullPass(`(module (func (param ${type}) (result ${type}) (${type}.${opcode} (get_local 0))) (export "run" 0))`, expect, {}, op); +} + +function testBinary64(opcode, lhs, rhs, expect) { + let lobj = createI64(lhs); + let robj = createI64(rhs); + expect = createI64(expect); + + wasmFullPassI64(`(module (func (param i64) (param i64) (result i64) (i64.${opcode} (get_local 0) (get_local 1))) (export "run" 0))`, expect, {}, lobj, robj); + // The same, but now the RHS is a constant. + wasmFullPassI64(`(module (func (param i64) (result i64) (i64.${opcode} (get_local 0) (i64.const ${rhs}))) (export "run" 0))`, expect, {}, lobj); + // LHS and RHS are constants. + wasmFullPassI64(`(module (func (result i64) (i64.${opcode} (i64.const ${lhs}) (i64.const ${rhs}))) (export "run" 0))`, expect); +} + +function testBinary32(opcode, lhs, rhs, expect) { + wasmFullPass(`(module (func (param i32) (param i32) (result i32) (i32.${opcode} (get_local 0) (get_local 1))) (export "run" 0))`, expect, {}, lhs, rhs); + // The same, but now the RHS is a constant. + wasmFullPass(`(module (func (param i32) (result i32) (i32.${opcode} (get_local 0) (i32.const ${rhs}))) (export "run" 0))`, expect, {}, lhs); + // LHS and RHS are constants. + wasmFullPass(`(module (func (result i32) (i32.${opcode} (i32.const ${lhs}) (i32.const ${rhs}))) (export "run" 0))`, expect); +} + +function testComparison32(opcode, lhs, rhs, expect) { + wasmFullPass(`(module (func (param i32) (param i32) (result i32) (i32.${opcode} (get_local 0) (get_local 1))) (export "run" 0))`, expect, {}, lhs, rhs); +} +function testComparison64(opcode, lhs, rhs, expect) { + let lobj = createI64(lhs); + let robj = createI64(rhs); + + wasmFullPass(`(module + (func (param i64) (param i64) (result i32) (i64.${opcode} (get_local 0) (get_local 1))) + (export "run" 0))`, expect, {}, lobj, robj); + + // Also test `if`, for the compare-and-branch path. + wasmFullPass(`(module + (func (param i64) (param i64) (result i32) + (if i32 (i64.${opcode} (get_local 0) (get_local 1)) + (i32.const 1) + (i32.const 0))) + (export "run" 0))`, expect, {}, lobj, robj); +} +function testI64Eqz(input, expect) { + wasmFullPass(`(module (func (result i32) (i64.eqz (i64.const ${input}))) (export "run" 0))`, expect, {}); + input = createI64(input); + wasmFullPass(`(module (func (param i64) (result i32) (i64.eqz (get_local 0))) (export "run" 0))`, expect, {}, input); +} + +function testTrap32(opcode, lhs, rhs, expect) { + assertErrorMessage(() => wasmEvalText(`(module (func (param i32) (param i32) (result i32) (i32.${opcode} (get_local 0) (get_local 1))) (export "" 0))`).exports[""](lhs, rhs), Error, expect); + // The same, but now the RHS is a constant. + assertErrorMessage(() => wasmEvalText(`(module (func (param i32) (result i32) (i32.${opcode} (get_local 0) (i32.const ${rhs}))) (export "" 0))`).exports[""](lhs), Error, expect); + // LHS and RHS are constants. + assertErrorMessage(wasmEvalText(`(module (func (result i32) (i32.${opcode} (i32.const ${lhs}) (i32.const ${rhs}))) (export "" 0))`).exports[""], Error, expect); +} + +function testTrap64(opcode, lhs, rhs, expect) { + let lobj = createI64(lhs); + let robj = createI64(rhs); + + assertErrorMessage(() => wasmEvalText(`(module (func (param i64) (param i64) (result i64) (i64.${opcode} (get_local 0) (get_local 1))) (export "" 0))`).exports[""](lobj, robj), Error, expect); + // The same, but now the RHS is a constant. + assertErrorMessage(() => wasmEvalText(`(module (func (param i64) (result i64) (i64.${opcode} (get_local 0) (i64.const ${rhs}))) (export "" 0))`).exports[""](lobj), Error, expect); + // LHS and RHS are constants. + assertErrorMessage(wasmEvalText(`(module (func (result i64) (i64.${opcode} (i64.const ${lhs}) (i64.const ${rhs}))) (export "" 0))`).exports[""], Error, expect); +} + +testUnary('i32', 'clz', 40, 26); +testUnary('i32', 'clz', 0, 32); +testUnary('i32', 'clz', 0xFFFFFFFF, 0); +testUnary('i32', 'clz', -2147483648, 0); + +testUnary('i32', 'ctz', 40, 3); +testUnary('i32', 'ctz', 0, 32); +testUnary('i32', 'ctz', -2147483648, 31); + +testUnary('i32', 'popcnt', 40, 2); +testUnary('i32', 'popcnt', 0, 0); +testUnary('i32', 'popcnt', 0xFFFFFFFF, 32); + +testUnary('i32', 'eqz', 0, 1); +testUnary('i32', 'eqz', 1, 0); +testUnary('i32', 'eqz', 0xFFFFFFFF, 0); + +testBinary32('add', 40, 2, 42); +testBinary32('sub', 40, 2, 38); +testBinary32('mul', 40, 2, 80); +testBinary32('div_s', -40, 2, -20); +testBinary32('div_u', -40, 2, 2147483628); +testBinary32('rem_s', 40, -3, 1); +testBinary32('rem_s', 0, -3, 0); +testBinary32('rem_u', 40, -3, 40); +testBinary32('and', 42, 6, 2); +testBinary32('or', 42, 6, 46); +testBinary32('xor', 42, 2, 40); +testBinary32('shl', 40, 2, 160); +testBinary32('shr_s', -40, 2, -10); +testBinary32('shr_u', -40, 2, 1073741814); + +testTrap32('div_s', 42, 0, /integer divide by zero/); +testTrap32('div_s', 0x80000000 | 0, -1, /integer overflow/); +testTrap32('div_u', 42, 0, /integer divide by zero/); +testTrap32('rem_s', 42, 0, /integer divide by zero/); +testTrap32('rem_u', 42, 0, /integer divide by zero/); + +testBinary32('rotl', 40, 2, 160); +testBinary32('rotl', 40, 34, 160); +testBinary32('rotr', 40, 2, 10); +testBinary32('rotr', 40, 34, 10); +testBinary32('rotr', 40, 0, 40); +testBinary32('rotl', 40, 0, 40); + +testComparison32('eq', 40, 40, 1); +testComparison32('ne', 40, 40, 0); +testComparison32('lt_s', 40, 40, 0); +testComparison32('lt_u', 40, 40, 0); +testComparison32('le_s', 40, 40, 1); +testComparison32('le_u', 40, 40, 1); +testComparison32('gt_s', 40, 40, 0); +testComparison32('gt_u', 40, 40, 0); +testComparison32('ge_s', 40, 40, 1); +testComparison32('ge_u', 40, 40, 1); + +// Test MTest's GVN branch inversion. +var testTrunc = wasmEvalText(`(module (func (param f32) (result i32) (if i32 (i32.eqz (i32.trunc_s/f32 (get_local 0))) (i32.const 0) (i32.const 1))) (export "" 0))`).exports[""]; +assertEq(testTrunc(0), 0); +assertEq(testTrunc(13.37), 1); + +{ + setJitCompilerOption('wasm.test-mode', 1); + + testBinary64('add', 40, 2, 42); + testBinary64('add', "0x1234567887654321", -1, "0x1234567887654320"); + testBinary64('add', "0xffffffffffffffff", 1, 0); + testBinary64('sub', 40, 2, 38); + testBinary64('sub', "0x1234567887654321", "0x123456789", "0x12345677641fdb98"); + testBinary64('sub', 3, 5, -2); + testBinary64('mul', 40, 2, 80); + testBinary64('mul', -1, 2, -2); + testBinary64('mul', 0x123456, "0x9876543210", "0xad77d2c5f941160"); + testBinary64('mul', 2, -1, -2); + testBinary64('mul', "0x80000000", -1, -2147483648); + testBinary64('mul', "0x7fffffff", -1, -2147483647); + testBinary64('mul', "0x7fffffffffffffff", -1, "0x8000000000000001"); + testBinary64('mul', 2, 2, 4); + testBinary64('mul', "0x80000000", 2, "0x100000000"); + testBinary64('mul', "0x7fffffff", 2, "0xfffffffe"); + testBinary64('div_s', -40, 2, -20); + testBinary64('div_s', "0x1234567887654321", 2, "0x91a2b3c43b2a190"); + testBinary64('div_s', "0x1234567887654321", "0x1000000000", "0x1234567"); + testBinary64('div_u', -40, 2, "0x7fffffffffffffec"); + testBinary64('div_u', "0x1234567887654321", 9, "0x205d0b80f0b4059"); + testBinary64('rem_s', 40, -3, 1); + testBinary64('rem_s', "0x1234567887654321", "0x1000000000", "0x887654321"); + testBinary64('rem_s', "0x7fffffffffffffff", -1, 0); + testBinary64('rem_s', "0x8000000000000001", 1000, -807); + testBinary64('rem_s', "0x8000000000000000", -1, 0); + testBinary64('rem_u', 40, -3, 40); + testBinary64('rem_u', "0x1234567887654321", "0x1000000000", "0x887654321"); + testBinary64('rem_u', "0x8000000000000000", -1, "0x8000000000000000"); + testBinary64('rem_u', "0x8ff00ff00ff00ff0", "0x100000001", "0x80000001"); + + testTrap64('div_s', 10, 0, /integer divide by zero/); + testTrap64('div_s', "0x8000000000000000", -1, /integer overflow/); + testTrap64('div_u', 0, 0, /integer divide by zero/); + testTrap64('rem_s', 10, 0, /integer divide by zero/); + testTrap64('rem_u', 10, 0, /integer divide by zero/); + + // Bitops. + testBinary64('or', 42, 6, 46); + testBinary64('or', "0x8765432112345678", "0xffff0000ffff0000", "0xffff4321ffff5678"); + + testBinary64('xor', 42, 2, 40); + testBinary64('xor', "0x8765432112345678", "0xffff0000ffff0000", "0x789a4321edcb5678"); + + testBinary64('shl', 0xff00ff, 28, "0x0ff00ff0000000"); + testBinary64('shl', 0xff00ff, 30, "0x3fc03fc0000000"); + testBinary64('shl', 0xff00ff, 31, "0x7f807f80000000"); + testBinary64('shl', 0xff00ff, 32, "0xff00ff00000000"); + testBinary64('shl', 1, 63, "0x8000000000000000"); + testBinary64('shl', 1, 64, 1); + testBinary64('shl', 40, 2, 160); + + testBinary64('shr_s', -40, 2, -10); + testBinary64('shr_s', "0xff00ff0000000", 28, 0xff00ff); + testBinary64('shr_s', "0xff00ff0000000", 30, 0x3fc03f); + testBinary64('shr_s', "0xff00ff0000000", 31, 0x1fe01f); + testBinary64('shr_s', "0xff00ff0000000", 32, 0x0ff00f); + + testBinary64('shr_u', -40, 2, "0x3ffffffffffffff6"); + testBinary64('shr_u', "0x8ffff00ff0000000", 30, "0x23fffc03f"); + testBinary64('shr_u', "0x8ffff00ff0000000", 31, "0x11fffe01f"); + testBinary64('shr_u', "0x8ffff00ff0000000", 32, "0x08ffff00f"); + testBinary64('shr_u', "0x8ffff00ff0000000", 56, 0x8f); + + testBinary64('and', 42, 0, 0); + testBinary64('and', 42, 6, 2); + testBinary64('and', "0x0000000012345678", "0xffff0000ffff0000", "0x0000000012340000"); + testBinary64('and', "0x8765432112345678", "0xffff0000ffff0000", "0x8765000012340000"); + + // Rotations. + testBinary64('rotl', 40, 0, 0x28); + testBinary64('rotl', 40, 2, 0xA0); + testBinary64('rotl', 40, 8, 0x2800); + testBinary64('rotl', 40, 30, "0xA00000000"); + testBinary64('rotl', 40, 31, "0x1400000000"); + testBinary64('rotl', 40, 32, "0x2800000000"); + + testBinary64('rotl', "0x1234567812345678", 4, "0x2345678123456781"); + testBinary64('rotl', "0x1234567812345678", 30, "0x048D159E048D159E"); + testBinary64('rotl', "0x1234567812345678", 31, "0x091A2B3C091A2B3C"); + testBinary64('rotl', "0x1234567812345678", 32, "0x1234567812345678"); + + testBinary64('rotl', "0x0000000000001000", 127, "0x0000000000000800"); + + testBinary64('rotr', 40, 0, 0x28); + testBinary64('rotr', 40, 2, 0x0A); + testBinary64('rotr', 40, 30, "0xA000000000"); + testBinary64('rotr', 40, 31, "0x5000000000"); + testBinary64('rotr', 40, 32, "0x2800000000"); + + testBinary64('rotr', "0x1234567812345678", 4, "0x8123456781234567"); + testBinary64('rotr', "0x1234567812345678", 30, "0x48D159E048D159E0"); + testBinary64('rotr', "0x1234567812345678", 31, "0x2468ACF02468ACF0"); + testBinary64('rotr', "0x1234567812345678", 32, "0x1234567812345678"); + testBinary64('rotr', "0x1234567812345678", 60, "0x2345678123456781"); + + // Comparisons. + testComparison64('eq', 40, 40, 1); + testComparison64('ne', 40, 40, 0); + testComparison64('lt_s', 40, 40, 0); + testComparison64('lt_u', 40, 40, 0); + testComparison64('le_s', 40, 40, 1); + testComparison64('le_u', 40, 40, 1); + testComparison64('gt_s', 40, 40, 0); + testComparison64('gt_u', 40, 40, 0); + testComparison64('ge_s', 40, 40, 1); + testComparison64('ge_u', 40, 40, 1); + testComparison64('eq', "0x400012345678", "0x400012345678", 1); + testComparison64('ne', "0x400012345678", "0x400012345678", 0); + testComparison64('ne', "0x400012345678", "0x500012345678", 1); + testComparison64('eq', "0xffffffffffffffff", -1, 1); + testComparison64('lt_s', "0x8000000012345678", "0x1", 1); + testComparison64('lt_u', "0x8000000012345678", "0x1", 0); + testComparison64('le_s', -1, 0, 1); + testComparison64('le_u', -1, -1, 1); + testComparison64('gt_s', 1, "0x8000000000000000", 1); + testComparison64('gt_u', 1, "0x8000000000000000", 0); + testComparison64('ge_s', 1, "0x8000000000000000", 1); + testComparison64('ge_u', 1, "0x8000000000000000", 0); + + testUnary('i64', 'clz', 40, 58); + testUnary('i64', 'clz', "0x8000000000000000", 0); + testUnary('i64', 'clz', "0x7fffffffffffffff", 1); + testUnary('i64', 'clz', "0x4000000000000000", 1); + testUnary('i64', 'clz', "0x3000000000000000", 2); + testUnary('i64', 'clz', "0x2000000000000000", 2); + testUnary('i64', 'clz', "0x1000000000000000", 3); + testUnary('i64', 'clz', "0x0030000000000000", 10); + testUnary('i64', 'clz', "0x0000800000000000", 16); + testUnary('i64', 'clz', "0x00000000ffffffff", 32); + testUnary('i64', 'clz', -1, 0); + testUnary('i64', 'clz', 0, 64); + + testUnary('i64', 'ctz', 40, 3); + testUnary('i64', 'ctz', "0x8000000000000000", 63); + testUnary('i64', 'ctz', "0x7fffffffffffffff", 0); + testUnary('i64', 'ctz', "0x4000000000000000", 62); + testUnary('i64', 'ctz', "0x3000000000000000", 60); + testUnary('i64', 'ctz', "0x2000000000000000", 61); + testUnary('i64', 'ctz', "0x1000000000000000", 60); + testUnary('i64', 'ctz', "0x0030000000000000", 52); + testUnary('i64', 'ctz', "0x0000800000000000", 47); + testUnary('i64', 'ctz', "0x00000000ffffffff", 0); + testUnary('i64', 'ctz', -1, 0); + testUnary('i64', 'ctz', 0, 64); + + testUnary('i64', 'popcnt', 40, 2); + testUnary('i64', 'popcnt', 0, 0); + testUnary('i64', 'popcnt', "0x8000000000000000", 1); + testUnary('i64', 'popcnt', "0x7fffffffffffffff", 63); + testUnary('i64', 'popcnt', "0x4000000000000000", 1); + testUnary('i64', 'popcnt', "0x3000000000000000", 2); + testUnary('i64', 'popcnt', "0x2000000000000000", 1); + testUnary('i64', 'popcnt', "0x1000000000000000", 1); + testUnary('i64', 'popcnt', "0x0030000000000000", 2); + testUnary('i64', 'popcnt', "0x0000800000000000", 1); + testUnary('i64', 'popcnt', "0x00000000ffffffff", 32); + testUnary('i64', 'popcnt', -1, 64); + testUnary('i64', 'popcnt', 0, 0); + + testI64Eqz(40, 0); + testI64Eqz(0, 1); + + assertEqI64(wasmEvalText(`(module (func (param i64) (result i64) (local i64) (set_local 1 (i64.shl (get_local 0) (get_local 0))) (i64.shl (get_local 1) (get_local 1))) (export "" 0))`).exports[""](createI64(2)), 2048); + + // Test MTest's GVN branch inversion. + var testTrunc = wasmEvalText(`(module (func (param f32) (result i32) (if i32 (i64.eqz (i64.trunc_s/f32 (get_local 0))) (i32.const 0) (i32.const 1))) (export "" 0))`).exports[""]; + assertEq(testTrunc(0), 0); + assertEq(testTrunc(13.37), 1); + + assertEqI64(wasmEvalText(`(module (func (result i64) (local i64) (set_local 0 (i64.rem_s (i64.const 1) (i64.const 0xf))) (i64.rem_s (get_local 0) (get_local 0))) (export "" 0))`).exports[""](), 0); + + setJitCompilerOption('wasm.test-mode', 0); +} + +wasmFailValidateText('(module (func (param f32) (result i32) (i32.clz (get_local 0))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (param i32) (result f32) (i32.clz (get_local 0))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param f32) (result f32) (i32.clz (get_local 0))))', mismatchError("f32", "i32")); + +wasmFailValidateText('(module (func (param f32) (param i32) (result i32) (i32.add (get_local 0) (get_local 1))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (param i32) (param f32) (result i32) (i32.add (get_local 0) (get_local 1))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (param i32) (param i32) (result f32) (i32.add (get_local 0) (get_local 1))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param f32) (param f32) (result f32) (i32.add (get_local 0) (get_local 1))))', mismatchError("f32", "i32")); + +wasmFailValidateText('(module (func (param f32) (param i32) (result i32) (i32.eq (get_local 0) (get_local 1))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (param i32) (param f32) (result i32) (i32.eq (get_local 0) (get_local 1))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (param i32) (param i32) (result f32) (i32.eq (get_local 0) (get_local 1))))', mismatchError("i32", "f32")); diff --git a/js/src/jit-test/tests/wasm/js-reexport.js b/js/src/jit-test/tests/wasm/js-reexport.js new file mode 100644 index 000000000..1a930ed7a --- /dev/null +++ b/js/src/jit-test/tests/wasm/js-reexport.js @@ -0,0 +1,64 @@ +load(libdir + "wasm.js"); + +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; +const Memory = WebAssembly.Memory; +const Table = WebAssembly.Table; + +function accum(...args) { + var sum = 0; + for (var i = 0; i < args.length; i++) + sum += args[i]; + return sum; +} + +var e = wasmEvalText(`(module + (import $a "" "a" (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) (result i32)) + (import $b "" "b" (param f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32) (result f32)) + (import $c "" "c" (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64)) + (import $d "" "d" (param i32 f32 f64 i32 f32 f64 i32 f32 f64 i32 f32 f64 i32 f32 f64 i32 f32 f64 i32 f32) (result f64)) + (func (export "a") (result i32) + i32.const 1 i32.const 2 i32.const 3 i32.const 4 i32.const 5 + i32.const 6 i32.const 7 i32.const 8 i32.const 9 i32.const 10 + i32.const 11 i32.const 12 i32.const 13 i32.const 14 i32.const 15 + i32.const 16 i32.const 17 i32.const 18 i32.const 19 i32.const 20 + call $a + ) + (func (export "b") (result f32) + f32.const 1.1 f32.const 2.1 f32.const 3.1 f32.const 4.1 f32.const 5.1 + f32.const 6.1 f32.const 7.1 f32.const 8.1 f32.const 9.1 f32.const 10.1 + f32.const 11.1 f32.const 12.1 f32.const 13.1 f32.const 14.1 f32.const 15.1 + f32.const 16.1 f32.const 17.1 f32.const 18.1 f32.const 19.1 f32.const 20.1 + call $b + ) + (func (export "c") (result f64) + f64.const 1.2 f64.const 2.2 f64.const 3.2 f64.const 4.2 f64.const 5.2 + f64.const 6.2 f64.const 7.2 f64.const 8.2 f64.const 9.2 f64.const 10.2 + f64.const 11.2 f64.const 12.2 f64.const 13.2 f64.const 14.2 f64.const 15.2 + f64.const 16.2 f64.const 17.2 f64.const 18.2 f64.const 19.2 f64.const 20.2 + call $c + ) + (func (export "d") (result f64) + i32.const 1 f32.const 2.3 f64.const 3.3 i32.const 4 f32.const 5.3 + f64.const 6.3 i32.const 7 f32.const 8.3 f64.const 9.3 i32.const 10 + f32.const 11.3 f64.const 12.3 i32.const 13 f32.const 14.3 f64.const 15.3 + i32.const 16 f32.const 17.3 f64.const 18.3 i32.const 19 f32.const 20.3 + call $d + ) +)`, {"":{a:accum, b:accum, c:accum, d:accum, e:accum}}).exports; + +const epsilon = .00001; +assertEq(e.a(), 210); +assertEq(Math.abs(e.b() - 212) < epsilon, true); +assertEq(Math.abs(e.c() - 214) < epsilon, true); +assertEq(Math.abs(e.d() - 213.9) < epsilon, true); + +setJitCompilerOption("baseline.warmup.trigger", 5); +setJitCompilerOption("ion.warmup.trigger", 10); + +var e = wasmEvalText(`(module + (import $a "" "a" (param i32 f64) (result f64)) + (export "a" $a) +)`, {"":{a:(a,b)=>a+b}}).exports; +for (var i = 0; i < 100; i++) + assertEq(e.a(1.5, 2.5), 3.5); diff --git a/js/src/jit-test/tests/wasm/jsapi.js b/js/src/jit-test/tests/wasm/jsapi.js new file mode 100644 index 000000000..8ac2c3ab3 --- /dev/null +++ b/js/src/jit-test/tests/wasm/jsapi.js @@ -0,0 +1,515 @@ +load(libdir + 'wasm.js'); + +const WasmPage = 64 * 1024; + +const emptyModuleBinary = wasmTextToBinary('(module)'); +const exportingModuleBinary = wasmTextToBinary('(module (func (export "f") (result i32) (i32.const 42)))'); +const importingModuleBinary = wasmTextToBinary('(module (func (import "" "f")))'); + +// 'WebAssembly' data property on global object +const wasmDesc = Object.getOwnPropertyDescriptor(this, 'WebAssembly'); +assertEq(typeof wasmDesc.value, "object"); +assertEq(wasmDesc.writable, true); +assertEq(wasmDesc.enumerable, false); +assertEq(wasmDesc.configurable, true); + +// 'WebAssembly' object +assertEq(WebAssembly, wasmDesc.value); +assertEq(String(WebAssembly), "[object WebAssembly]"); + +// 'WebAssembly.(Compile|Runtime)Error' data property +const compileErrorDesc = Object.getOwnPropertyDescriptor(WebAssembly, 'CompileError'); +const runtimeErrorDesc = Object.getOwnPropertyDescriptor(WebAssembly, 'RuntimeError'); +assertEq(typeof compileErrorDesc.value, "function"); +assertEq(typeof runtimeErrorDesc.value, "function"); +assertEq(compileErrorDesc.writable, true); +assertEq(runtimeErrorDesc.writable, true); +assertEq(compileErrorDesc.enumerable, false); +assertEq(runtimeErrorDesc.enumerable, false); +assertEq(compileErrorDesc.configurable, true); +assertEq(runtimeErrorDesc.configurable, true); + +// 'WebAssembly.(Compile|Runtime)Error' constructor function +const CompileError = WebAssembly.CompileError; +const RuntimeError = WebAssembly.RuntimeError; +assertEq(CompileError, compileErrorDesc.value); +assertEq(RuntimeError, runtimeErrorDesc.value); +assertEq(CompileError.length, 1); +assertEq(RuntimeError.length, 1); +assertEq(CompileError.name, "CompileError"); +assertEq(RuntimeError.name, "RuntimeError"); + +// 'WebAssembly.(Compile|Runtime)Error' instance objects +const compileError = new CompileError; +const runtimeError = new RuntimeError; +assertEq(compileError instanceof CompileError, true); +assertEq(runtimeError instanceof RuntimeError, true); +assertEq(compileError instanceof Error, true); +assertEq(runtimeError instanceof Error, true); +assertEq(compileError instanceof TypeError, false); +assertEq(runtimeError instanceof TypeError, false); +assertEq(compileError.message, ""); +assertEq(runtimeError.message, ""); +assertEq(new CompileError("hi").message, "hi"); +assertEq(new RuntimeError("hi").message, "hi"); + +// 'WebAssembly.Module' data property +const moduleDesc = Object.getOwnPropertyDescriptor(WebAssembly, 'Module'); +assertEq(typeof moduleDesc.value, "function"); +assertEq(moduleDesc.writable, true); +assertEq(moduleDesc.enumerable, false); +assertEq(moduleDesc.configurable, true); + +// 'WebAssembly.Module' constructor function +const Module = WebAssembly.Module; +assertEq(Module, moduleDesc.value); +assertEq(Module.length, 1); +assertEq(Module.name, "Module"); +assertErrorMessage(() => Module(), TypeError, /constructor without new is forbidden/); +assertErrorMessage(() => new Module(), TypeError, /requires more than 0 arguments/); +assertErrorMessage(() => new Module(undefined), TypeError, "first argument must be an ArrayBuffer or typed array object"); +assertErrorMessage(() => new Module(1), TypeError, "first argument must be an ArrayBuffer or typed array object"); +assertErrorMessage(() => new Module({}), TypeError, "first argument must be an ArrayBuffer or typed array object"); +assertErrorMessage(() => new Module(new Uint8Array()), CompileError, /failed to match magic number/); +assertErrorMessage(() => new Module(new ArrayBuffer()), CompileError, /failed to match magic number/); +assertEq(new Module(emptyModuleBinary) instanceof Module, true); +assertEq(new Module(emptyModuleBinary.buffer) instanceof Module, true); + +// 'WebAssembly.Module.prototype' data property +const moduleProtoDesc = Object.getOwnPropertyDescriptor(Module, 'prototype'); +assertEq(typeof moduleProtoDesc.value, "object"); +assertEq(moduleProtoDesc.writable, false); +assertEq(moduleProtoDesc.enumerable, false); +assertEq(moduleProtoDesc.configurable, false); + +// 'WebAssembly.Module.prototype' object +const moduleProto = Module.prototype; +assertEq(moduleProto, moduleProtoDesc.value); +assertEq(String(moduleProto), "[object Object]"); +assertEq(Object.getPrototypeOf(moduleProto), Object.prototype); + +// 'WebAssembly.Module' instance objects +const emptyModule = new Module(emptyModuleBinary); +const importingModule = new Module(importingModuleBinary); +const exportingModule = new Module(exportingModuleBinary); +assertEq(typeof emptyModule, "object"); +assertEq(String(emptyModule), "[object WebAssembly.Module]"); +assertEq(Object.getPrototypeOf(emptyModule), moduleProto); + +// 'WebAssembly.Module.imports' data property +const moduleImportsDesc = Object.getOwnPropertyDescriptor(Module, 'imports'); +assertEq(typeof moduleImportsDesc.value, "function"); +assertEq(moduleImportsDesc.writable, true); +assertEq(moduleImportsDesc.enumerable, false); +assertEq(moduleImportsDesc.configurable, true); + +// 'WebAssembly.Module.imports' method +const moduleImports = moduleImportsDesc.value; +assertEq(moduleImports.length, 1); +assertErrorMessage(() => moduleImports(), TypeError, /requires more than 0 arguments/); +assertErrorMessage(() => moduleImports(undefined), TypeError, /first argument must be a WebAssembly.Module/); +assertErrorMessage(() => moduleImports({}), TypeError, /first argument must be a WebAssembly.Module/); +var arr = moduleImports(new Module(wasmTextToBinary('(module)'))); +assertEq(arr instanceof Array, true); +assertEq(arr.length, 0); +var arr = moduleImports(new Module(wasmTextToBinary('(module (func (import "a" "b")) (memory (import "c" "d") 1) (table (import "e" "f") 1 anyfunc) (global (import "g" "âš¡") i32))'))); +assertEq(arr instanceof Array, true); +assertEq(arr.length, 4); +assertEq(arr[0].kind, "function"); +assertEq(arr[0].module, "a"); +assertEq(arr[0].name, "b"); +assertEq(arr[1].kind, "memory"); +assertEq(arr[1].module, "c"); +assertEq(arr[1].name, "d"); +assertEq(arr[2].kind, "table"); +assertEq(arr[2].module, "e"); +assertEq(arr[2].name, "f"); +assertEq(arr[3].kind, "global"); +assertEq(arr[3].module, "g"); +assertEq(arr[3].name, "âš¡"); + +// 'WebAssembly.Module.exports' data property +const moduleExportsDesc = Object.getOwnPropertyDescriptor(Module, 'exports'); +assertEq(typeof moduleExportsDesc.value, "function"); +assertEq(moduleExportsDesc.writable, true); +assertEq(moduleExportsDesc.enumerable, false); +assertEq(moduleExportsDesc.configurable, true); + +// 'WebAssembly.Module.exports' method +const moduleExports = moduleExportsDesc.value; +assertEq(moduleExports.length, 1); +assertErrorMessage(() => moduleExports(), TypeError, /requires more than 0 arguments/); +assertErrorMessage(() => moduleExports(undefined), TypeError, /first argument must be a WebAssembly.Module/); +assertErrorMessage(() => moduleExports({}), TypeError, /first argument must be a WebAssembly.Module/); +var arr = moduleExports(emptyModule); +assertEq(arr instanceof Array, true); +assertEq(arr.length, 0); +var arr = moduleExports(new Module(wasmTextToBinary('(module (func (export "a")) (memory (export "b") 1) (table (export "c") 1 anyfunc) (global (export "âš¡") i32 (i32.const 0)))'))); +assertEq(arr instanceof Array, true); +assertEq(arr.length, 4); +assertEq(arr[0].kind, "function"); +assertEq(arr[0].name, "a"); +assertEq(arr[1].kind, "memory"); +assertEq(arr[1].name, "b"); +assertEq(arr[2].kind, "table"); +assertEq(arr[2].name, "c"); +assertEq(arr[3].kind, "global"); +assertEq(arr[3].name, "âš¡"); + +// 'WebAssembly.Instance' data property +const instanceDesc = Object.getOwnPropertyDescriptor(WebAssembly, 'Instance'); +assertEq(typeof instanceDesc.value, "function"); +assertEq(instanceDesc.writable, true); +assertEq(instanceDesc.enumerable, false); +assertEq(instanceDesc.configurable, true); + +// 'WebAssembly.Instance' constructor function +const Instance = WebAssembly.Instance; +assertEq(Instance, instanceDesc.value); +assertEq(Instance.length, 1); +assertEq(Instance.name, "Instance"); +assertErrorMessage(() => Instance(), TypeError, /constructor without new is forbidden/); +assertErrorMessage(() => new Instance(1), TypeError, "first argument must be a WebAssembly.Module"); +assertErrorMessage(() => new Instance({}), TypeError, "first argument must be a WebAssembly.Module"); +assertErrorMessage(() => new Instance(emptyModule, null), TypeError, "second argument must be an object"); +assertEq(new Instance(emptyModule) instanceof Instance, true); +assertEq(new Instance(emptyModule, {}) instanceof Instance, true); + +// 'WebAssembly.Instance.prototype' data property +const instanceProtoDesc = Object.getOwnPropertyDescriptor(Instance, 'prototype'); +assertEq(typeof instanceProtoDesc.value, "object"); +assertEq(instanceProtoDesc.writable, false); +assertEq(instanceProtoDesc.enumerable, false); +assertEq(instanceProtoDesc.configurable, false); + +// 'WebAssembly.Instance.prototype' object +const instanceProto = Instance.prototype; +assertEq(instanceProto, instanceProtoDesc.value); +assertEq(String(instanceProto), "[object Object]"); +assertEq(Object.getPrototypeOf(instanceProto), Object.prototype); + +// 'WebAssembly.Instance' instance objects +const exportingInstance = new Instance(exportingModule); +assertEq(typeof exportingInstance, "object"); +assertEq(String(exportingInstance), "[object WebAssembly.Instance]"); +assertEq(Object.getPrototypeOf(exportingInstance), instanceProto); + +// 'WebAssembly.Instance' 'exports' data property +const instanceExportsDesc = Object.getOwnPropertyDescriptor(exportingInstance, 'exports'); +assertEq(typeof instanceExportsDesc.value, "object"); +assertEq(instanceExportsDesc.writable, true); +assertEq(instanceExportsDesc.enumerable, true); +assertEq(instanceExportsDesc.configurable, true); + +// 'WebAssembly.Instance' 'exports' object +const exportsObj = exportingInstance.exports; +assertEq(typeof exportsObj, "object"); +assertEq(Object.isExtensible(exportsObj), false); +assertEq(Object.getPrototypeOf(exportsObj), null); +assertEq(Object.keys(exportsObj).join(), "f"); +exportsObj.g = 1; +assertEq(Object.keys(exportsObj).join(), "f"); +assertErrorMessage(() => Object.setPrototypeOf(exportsObj, {}), TypeError, /can't set prototype of this object/); +assertEq(Object.getPrototypeOf(exportsObj), null); +assertErrorMessage(() => Object.defineProperty(exportsObj, 'g', {}), TypeError, /Object is not extensible/); +assertEq(Object.keys(exportsObj).join(), "f"); + +// Exported WebAssembly functions +const f = exportsObj.f; +assertEq(f instanceof Function, true); +assertEq(f.length, 0); +assertEq('name' in f, true); +assertEq(Function.prototype.call.call(f), 42); +assertErrorMessage(() => new f(), TypeError, /is not a constructor/); + +// 'WebAssembly.Memory' data property +const memoryDesc = Object.getOwnPropertyDescriptor(WebAssembly, 'Memory'); +assertEq(typeof memoryDesc.value, "function"); +assertEq(memoryDesc.writable, true); +assertEq(memoryDesc.enumerable, false); +assertEq(memoryDesc.configurable, true); + +// 'WebAssembly.Memory' constructor function +const Memory = WebAssembly.Memory; +assertEq(Memory, memoryDesc.value); +assertEq(Memory.length, 1); +assertEq(Memory.name, "Memory"); +assertErrorMessage(() => Memory(), TypeError, /constructor without new is forbidden/); +assertErrorMessage(() => new Memory(1), TypeError, "first argument must be a memory descriptor"); +assertErrorMessage(() => new Memory({initial:{valueOf() { throw new Error("here")}}}), Error, "here"); +assertErrorMessage(() => new Memory({initial:-1}), RangeError, /bad Memory initial size/); +assertErrorMessage(() => new Memory({initial:Math.pow(2,32)}), RangeError, /bad Memory initial size/); +assertErrorMessage(() => new Memory({initial:1, maximum: Math.pow(2,32)/Math.pow(2,14) }), RangeError, /bad Memory maximum size/); +assertErrorMessage(() => new Memory({initial:2, maximum:1 }), RangeError, /bad Memory maximum size/); +assertErrorMessage(() => new Memory({maximum: -1 }), RangeError, /bad Memory maximum size/); +assertEq(new Memory({initial:1}) instanceof Memory, true); +assertEq(new Memory({initial:1.5}).buffer.byteLength, WasmPage); + +// 'WebAssembly.Memory.prototype' data property +const memoryProtoDesc = Object.getOwnPropertyDescriptor(Memory, 'prototype'); +assertEq(typeof memoryProtoDesc.value, "object"); +assertEq(memoryProtoDesc.writable, false); +assertEq(memoryProtoDesc.enumerable, false); +assertEq(memoryProtoDesc.configurable, false); + +// 'WebAssembly.Memory.prototype' object +const memoryProto = Memory.prototype; +assertEq(memoryProto, memoryProtoDesc.value); +assertEq(String(memoryProto), "[object Object]"); +assertEq(Object.getPrototypeOf(memoryProto), Object.prototype); + +// 'WebAssembly.Memory' instance objects +const mem1 = new Memory({initial:1}); +assertEq(typeof mem1, "object"); +assertEq(String(mem1), "[object WebAssembly.Memory]"); +assertEq(Object.getPrototypeOf(mem1), memoryProto); + +// 'WebAssembly.Memory.prototype.buffer' accessor property +const bufferDesc = Object.getOwnPropertyDescriptor(memoryProto, 'buffer'); +assertEq(typeof bufferDesc.get, "function"); +assertEq(bufferDesc.set, undefined); +assertEq(bufferDesc.enumerable, false); +assertEq(bufferDesc.configurable, true); + +// 'WebAssembly.Memory.prototype.buffer' getter +const bufferGetter = bufferDesc.get; +assertErrorMessage(() => bufferGetter.call(), TypeError, /called on incompatible undefined/); +assertErrorMessage(() => bufferGetter.call({}), TypeError, /called on incompatible Object/); +assertEq(bufferGetter.call(mem1) instanceof ArrayBuffer, true); +assertEq(bufferGetter.call(mem1).byteLength, WasmPage); + +// 'WebAssembly.Memory.prototype.grow' data property +const memGrowDesc = Object.getOwnPropertyDescriptor(memoryProto, 'grow'); +assertEq(typeof memGrowDesc.value, "function"); +assertEq(memGrowDesc.enumerable, false); +assertEq(memGrowDesc.configurable, true); + +// 'WebAssembly.Memory.prototype.grow' method +const memGrow = memGrowDesc.value; +assertEq(memGrow.length, 1); +assertErrorMessage(() => memGrow.call(), TypeError, /called on incompatible undefined/); +assertErrorMessage(() => memGrow.call({}), TypeError, /called on incompatible Object/); +assertErrorMessage(() => memGrow.call(mem1, -1), RangeError, /bad Memory grow delta/); +assertErrorMessage(() => memGrow.call(mem1, Math.pow(2,32)), RangeError, /bad Memory grow delta/); +var mem = new Memory({initial:1, maximum:2}); +var buf = mem.buffer; +assertEq(buf.byteLength, WasmPage); +assertEq(mem.grow(0), 1); +assertEq(buf !== mem.buffer, true); +assertEq(buf.byteLength, 0); +buf = mem.buffer; +assertEq(buf.byteLength, WasmPage); +assertEq(mem.grow(1), 1); +assertEq(buf !== mem.buffer, true); +assertEq(buf.byteLength, 0); +buf = mem.buffer; +assertEq(buf.byteLength, 2 * WasmPage); +assertErrorMessage(() => mem.grow(1), Error, /failed to grow memory/); +assertEq(buf, mem.buffer); + +// 'WebAssembly.Table' data property +const tableDesc = Object.getOwnPropertyDescriptor(WebAssembly, 'Table'); +assertEq(typeof tableDesc.value, "function"); +assertEq(tableDesc.writable, true); +assertEq(tableDesc.enumerable, false); +assertEq(tableDesc.configurable, true); + +// 'WebAssembly.Table' constructor function +const Table = WebAssembly.Table; +assertEq(Table, tableDesc.value); +assertEq(Table.length, 1); +assertEq(Table.name, "Table"); +assertErrorMessage(() => Table(), TypeError, /constructor without new is forbidden/); +assertErrorMessage(() => new Table(1), TypeError, "first argument must be a table descriptor"); +assertErrorMessage(() => new Table({initial:1, element:1}), TypeError, /must be "anyfunc"/); +assertErrorMessage(() => new Table({initial:1, element:"any"}), TypeError, /must be "anyfunc"/); +assertErrorMessage(() => new Table({initial:1, element:{valueOf() { return "anyfunc" }}}), TypeError, /must be "anyfunc"/); +assertErrorMessage(() => new Table({initial:{valueOf() { throw new Error("here")}}, element:"anyfunc"}), Error, "here"); +assertErrorMessage(() => new Table({initial:-1, element:"anyfunc"}), RangeError, /bad Table initial size/); +assertErrorMessage(() => new Table({initial:Math.pow(2,32), element:"anyfunc"}), RangeError, /bad Table initial size/); +assertErrorMessage(() => new Table({initial:2, maximum:1, element:"anyfunc"}), RangeError, /bad Table maximum size/); +assertErrorMessage(() => new Table({initial:2, maximum:Math.pow(2,32), element:"anyfunc"}), RangeError, /bad Table maximum size/); +assertEq(new Table({initial:1, element:"anyfunc"}) instanceof Table, true); +assertEq(new Table({initial:1.5, element:"anyfunc"}) instanceof Table, true); +assertEq(new Table({initial:1, maximum:1.5, element:"anyfunc"}) instanceof Table, true); +assertEq(new Table({initial:1, maximum:Math.pow(2,32)-1, element:"anyfunc"}) instanceof Table, true); + +// 'WebAssembly.Table.prototype' data property +const tableProtoDesc = Object.getOwnPropertyDescriptor(Table, 'prototype'); +assertEq(typeof tableProtoDesc.value, "object"); +assertEq(tableProtoDesc.writable, false); +assertEq(tableProtoDesc.enumerable, false); +assertEq(tableProtoDesc.configurable, false); + +// 'WebAssembly.Table.prototype' object +const tableProto = Table.prototype; +assertEq(tableProto, tableProtoDesc.value); +assertEq(String(tableProto), "[object Object]"); +assertEq(Object.getPrototypeOf(tableProto), Object.prototype); + +// 'WebAssembly.Table' instance objects +const tbl1 = new Table({initial:2, element:"anyfunc"}); +assertEq(typeof tbl1, "object"); +assertEq(String(tbl1), "[object WebAssembly.Table]"); +assertEq(Object.getPrototypeOf(tbl1), tableProto); + +// 'WebAssembly.Table.prototype.length' accessor data property +const lengthDesc = Object.getOwnPropertyDescriptor(tableProto, 'length'); +assertEq(typeof lengthDesc.get, "function"); +assertEq(lengthDesc.set, undefined); +assertEq(lengthDesc.enumerable, false); +assertEq(lengthDesc.configurable, true); + +// 'WebAssembly.Table.prototype.length' getter +const lengthGetter = lengthDesc.get; +assertEq(lengthGetter.length, 0); +assertErrorMessage(() => lengthGetter.call(), TypeError, /called on incompatible undefined/); +assertErrorMessage(() => lengthGetter.call({}), TypeError, /called on incompatible Object/); +assertEq(typeof lengthGetter.call(tbl1), "number"); +assertEq(lengthGetter.call(tbl1), 2); + +// 'WebAssembly.Table.prototype.get' data property +const getDesc = Object.getOwnPropertyDescriptor(tableProto, 'get'); +assertEq(typeof getDesc.value, "function"); +assertEq(getDesc.enumerable, false); +assertEq(getDesc.configurable, true); + +// 'WebAssembly.Table.prototype.get' method +const get = getDesc.value; +assertEq(get.length, 1); +assertErrorMessage(() => get.call(), TypeError, /called on incompatible undefined/); +assertErrorMessage(() => get.call({}), TypeError, /called on incompatible Object/); +assertEq(get.call(tbl1, 0), null); +assertEq(get.call(tbl1, 1), null); +assertEq(get.call(tbl1, 1.5), null); +assertErrorMessage(() => get.call(tbl1, 2), RangeError, /bad Table get index/); +assertErrorMessage(() => get.call(tbl1, 2.5), RangeError, /bad Table get index/); +assertErrorMessage(() => get.call(tbl1, -1), RangeError, /bad Table get index/); +assertErrorMessage(() => get.call(tbl1, Math.pow(2,33)), RangeError, /bad Table get index/); +assertErrorMessage(() => get.call(tbl1, {valueOf() { throw new Error("hi") }}), Error, "hi"); + +// 'WebAssembly.Table.prototype.set' data property +const setDesc = Object.getOwnPropertyDescriptor(tableProto, 'set'); +assertEq(typeof setDesc.value, "function"); +assertEq(setDesc.enumerable, false); +assertEq(setDesc.configurable, true); + +// 'WebAssembly.Table.prototype.set' method +const set = setDesc.value; +assertEq(set.length, 2); +assertErrorMessage(() => set.call(), TypeError, /called on incompatible undefined/); +assertErrorMessage(() => set.call({}), TypeError, /called on incompatible Object/); +assertErrorMessage(() => set.call(tbl1, 0), TypeError, /requires more than 1 argument/); +assertErrorMessage(() => set.call(tbl1, 2, null), RangeError, /bad Table set index/); +assertErrorMessage(() => set.call(tbl1, -1, null), RangeError, /bad Table set index/); +assertErrorMessage(() => set.call(tbl1, Math.pow(2,33), null), RangeError, /bad Table set index/); +assertErrorMessage(() => set.call(tbl1, 0, undefined), TypeError, /can only assign WebAssembly exported functions to Table/); +assertErrorMessage(() => set.call(tbl1, 0, {}), TypeError, /can only assign WebAssembly exported functions to Table/); +assertErrorMessage(() => set.call(tbl1, 0, function() {}), TypeError, /can only assign WebAssembly exported functions to Table/); +assertErrorMessage(() => set.call(tbl1, 0, Math.sin), TypeError, /can only assign WebAssembly exported functions to Table/); +assertErrorMessage(() => set.call(tbl1, {valueOf() { throw Error("hai") }}, null), Error, "hai"); +assertEq(set.call(tbl1, 0, null), undefined); +assertEq(set.call(tbl1, 1, null), undefined); + +// 'WebAssembly.Table.prototype.grow' data property +const tblGrowDesc = Object.getOwnPropertyDescriptor(tableProto, 'grow'); +assertEq(typeof tblGrowDesc.value, "function"); +assertEq(tblGrowDesc.enumerable, false); +assertEq(tblGrowDesc.configurable, true); + +// 'WebAssembly.Table.prototype.grow' method +const tblGrow = tblGrowDesc.value; +assertEq(tblGrow.length, 1); +assertErrorMessage(() => tblGrow.call(), TypeError, /called on incompatible undefined/); +assertErrorMessage(() => tblGrow.call({}), TypeError, /called on incompatible Object/); +assertErrorMessage(() => tblGrow.call(tbl1, -1), RangeError, /bad Table grow delta/); +assertErrorMessage(() => tblGrow.call(tbl1, Math.pow(2,32)), RangeError, /bad Table grow delta/); +var tbl = new Table({element:"anyfunc", initial:1, maximum:2}); +assertEq(tbl.length, 1); +assertEq(tbl.grow(0), 1); +assertEq(tbl.length, 1); +assertEq(tbl.grow(1), 1); +assertEq(tbl.length, 2); +assertErrorMessage(() => tbl.grow(1), Error, /failed to grow table/); + +// 'WebAssembly.compile' data property +const compileDesc = Object.getOwnPropertyDescriptor(WebAssembly, 'compile'); +assertEq(typeof compileDesc.value, "function"); +assertEq(compileDesc.writable, true); +assertEq(compileDesc.enumerable, false); +assertEq(compileDesc.configurable, true); + +// 'WebAssembly.compile' function +const compile = WebAssembly.compile; +assertEq(compile, compileDesc.value); +assertEq(compile.length, 1); +assertEq(compile.name, "compile"); +function assertCompileError(args, err, msg) { + var error = null; + compile(...args).catch(e => error = e); + drainJobQueue(); + assertEq(error instanceof err, true); + assertEq(Boolean(error.stack.match("jsapi.js")), true); + assertEq(Boolean(error.message.match(msg)), true); +} +assertCompileError([], TypeError, /requires more than 0 arguments/); +assertCompileError([undefined], TypeError, /first argument must be an ArrayBuffer or typed array object/); +assertCompileError([1], TypeError, /first argument must be an ArrayBuffer or typed array object/); +assertCompileError([{}], TypeError, /first argument must be an ArrayBuffer or typed array object/); +assertCompileError([new Uint8Array()], CompileError, /failed to match magic number/); +assertCompileError([new ArrayBuffer()], CompileError, /failed to match magic number/); +function assertCompileSuccess(bytes) { + var module = null; + compile(bytes).then(m => module = m); + drainJobQueue(); + assertEq(module instanceof Module, true); +} +assertCompileSuccess(emptyModuleBinary); +assertCompileSuccess(emptyModuleBinary.buffer); + +// 'WebAssembly.instantiate' data property +const instantiateDesc = Object.getOwnPropertyDescriptor(WebAssembly, 'instantiate'); +assertEq(typeof instantiateDesc.value, "function"); +assertEq(instantiateDesc.writable, true); +assertEq(instantiateDesc.enumerable, false); +assertEq(instantiateDesc.configurable, true); + +// 'WebAssembly.instantiate' function +const instantiate = WebAssembly.instantiate; +assertEq(instantiate, instantiateDesc.value); +assertEq(instantiate.length, 2); +assertEq(instantiate.name, "instantiate"); +function assertInstantiateError(args, err, msg) { + var error = null; + instantiate(...args).catch(e => error = e); + drainJobQueue(); + assertEq(error instanceof err, true); + assertEq(Boolean(error.stack.match("jsapi.js")), true); + assertEq(Boolean(error.message.match(msg)), true); +} +assertInstantiateError([], TypeError, /requires more than 0 arguments/); +assertInstantiateError([undefined], TypeError, /first argument must be a WebAssembly.Module, ArrayBuffer or typed array object/); +assertInstantiateError([1], TypeError, /first argument must be a WebAssembly.Module, ArrayBuffer or typed array object/); +assertInstantiateError([{}], TypeError, /first argument must be a WebAssembly.Module, ArrayBuffer or typed array object/); +assertInstantiateError([new Uint8Array()], CompileError, /failed to match magic number/); +assertInstantiateError([new ArrayBuffer()], CompileError, /failed to match magic number/); +assertInstantiateError([importingModule], TypeError, /second argument must be an object/); +assertInstantiateError([importingModule, null], TypeError, /second argument must be an object/); +assertInstantiateError([importingModuleBinary, null], TypeError, /second argument must be an object/); +function assertInstantiateSuccess(module, imports) { + var result = null; + instantiate(module, imports).then(r => result = r); + drainJobQueue(); + if (module instanceof Module) { + assertEq(result instanceof Instance, true); + } else { + assertEq(result.module instanceof Module, true); + assertEq(result.instance instanceof Instance, true); + } +} +assertInstantiateSuccess(emptyModule); +assertInstantiateSuccess(emptyModuleBinary); +assertInstantiateSuccess(emptyModuleBinary.buffer); +assertInstantiateSuccess(importingModule, {"":{f:()=>{}}}); +assertInstantiateSuccess(importingModuleBinary, {"":{f:()=>{}}}); +assertInstantiateSuccess(importingModuleBinary.buffer, {"":{f:()=>{}}}); diff --git a/js/src/jit-test/tests/wasm/memory-aliasing.js b/js/src/jit-test/tests/wasm/memory-aliasing.js new file mode 100644 index 000000000..40837bcc5 --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory-aliasing.js @@ -0,0 +1,26 @@ +load(libdir + "wasm.js"); + +var i = wasmEvalText( +`(module + (memory 1) (data (i32.const 0) "\\01\\02\\03\\04\\05\\06\\07\\08") + (func $off1 (param $base i32) (result i32) + (i32.add + (i32.load8_u (get_local $base)) + (i32.load8_u offset=1 (get_local $base))) + ) + (export "off1" $off1) + (func $off2 (param $base i32) (result i32) + (i32.add + (i32.load8_u offset=1 (get_local $base)) + (i32.load8_u offset=2 (get_local $base))) + ) + (export "off2" $off2) +)`).exports; +assertEq(i.off1(0), 3); +assertEq(i.off1(1), 5); +assertEq(i.off1(2), 7); +assertEq(i.off1(3), 9); +assertEq(i.off2(0), 5); +assertEq(i.off2(1), 7); +assertEq(i.off2(2), 9); +assertEq(i.off2(3), 11); diff --git a/js/src/jit-test/tests/wasm/memory.js b/js/src/jit-test/tests/wasm/memory.js new file mode 100644 index 000000000..cd47b730c --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory.js @@ -0,0 +1,397 @@ +// |jit-test| test-also-wasm-check-bce +load(libdir + "wasm.js"); + +const RuntimeError = WebAssembly.RuntimeError; + +function loadModule(type, ext, offset, align) { + return wasmEvalText( + `(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (func (param i32) (result ${type}) + (${type}.load${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (get_local 0) + ) + ) (export "" 0))` + ).exports[""]; +} + +function storeModule(type, ext, offset, align) { + var load_ext = ext === '' ? '' : ext + '_s'; + return wasmEvalText( + `(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (func (param i32) (param ${type}) + (${type}.store${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (get_local 0) + (get_local 1) + ) + ) (export "store" 0) + (func (param i32) (result ${type}) + (${type}.load${load_ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (get_local 0) + ) + ) (export "load" 1))` + ).exports; +} + +function storeModuleCst(type, ext, offset, align, value) { + var load_ext = ext === '' ? '' : ext + '_s'; + return wasmEvalText( + `(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (func (param i32) + (${type}.store${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (get_local 0) + (${type}.const ${value}) + ) + ) (export "store" 0) + (func (param i32) (result ${type}) + (${type}.load${load_ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (get_local 0) + ) + ) (export "load" 1))` + ).exports; +} + +function testLoad(type, ext, base, offset, align, expect) { + if (type === 'i64') + assertEqI64(loadModule(type, ext, offset, align)(base), createI64(expect)); + else + assertEq(loadModule(type, ext, offset, align)(base), expect); +} + +function testLoadOOB(type, ext, base, offset, align) { + assertErrorMessage(() => loadModule(type, ext, offset, align)(base), RuntimeError, /index out of bounds/); +} + +function testStore(type, ext, base, offset, align, value) { + let module = storeModule(type, ext, offset, align); + let moduleCst = storeModuleCst(type, ext, offset, align, value); + if (type === 'i64') { + var i64 = createI64(value); + module.store(base, i64); + assertEqI64(module.load(base), i64); + moduleCst.store(base); + assertEqI64(moduleCst.load(base), i64); + } else { + module.store(base, value); + assertEq(module.load(base), value); + moduleCst.store(base); + assertEq(moduleCst.load(base), value); + } +} + +function testStoreOOB(type, ext, base, offset, align, value) { + if (type === 'i64') + value = createI64(value); + assertErrorMessage(() => storeModule(type, ext, offset, align).store(base, value), RuntimeError, /index out of bounds/); +} + +function badLoadModule(type, ext) { + wasmFailValidateText( `(module (func (param i32) (${type}.load${ext} (get_local 0))) (export "" 0))`, /can't touch memory/); +} + +function badStoreModule(type, ext) { + wasmFailValidateText(`(module (func (param i32) (${type}.store${ext} (get_local 0) (${type}.const 0))) (export "" 0))`, /can't touch memory/); +} + +// Can't touch memory. +for (let [type, ext] of [ + ['i32', ''], + ['i32', '8_s'], + ['i32', '8_u'], + ['i32', '16_s'], + ['i32', '16_u'], + ['i64', ''], + ['i64', '8_s'], + ['i64', '8_u'], + ['i64', '16_s'], + ['i64', '16_u'], + ['i64', '32_s'], + ['i64', '32_u'], + ['f32', ''], + ['f64', ''], +]) +{ + badLoadModule(type, ext); +} + +for (let [type, ext] of [ + ['i32', ''], + ['i32', '8'], + ['i32', '16'], + ['i64', ''], + ['i64', '8'], + ['i64', '16'], + ['i64', '32'], + ['f32', ''], + ['f64', ''], +]) +{ + badStoreModule(type, ext); +} + +assertEq(getJitCompilerOptions()['wasm.fold-offsets'], 1); + +for (var foldOffsets = 0; foldOffsets <= 1; foldOffsets++) { + setJitCompilerOption('wasm.fold-offsets', foldOffsets); + + testLoad('i32', '', 0, 0, 0, 0x03020100); + testLoad('i32', '', 1, 0, 1, 0x04030201); + testLoad('i32', '', 0, 4, 0, 0x07060504); + testLoad('i32', '', 1, 3, 4, 0x07060504); + testLoad('f32', '', 0, 0, 0, 3.820471434542632e-37); + testLoad('f32', '', 1, 0, 1, 1.539989614439558e-36); + testLoad('f32', '', 0, 4, 0, 1.0082513512365273e-34); + testLoad('f32', '', 1, 3, 4, 1.0082513512365273e-34); + testLoad('f64', '', 0, 0, 0, 7.949928895127363e-275); + testLoad('f64', '', 1, 0, 1, 5.447603722011605e-270); + testLoad('f64', '', 0, 8, 0, 3.6919162048650923e-236); + testLoad('f64', '', 1, 7, 8, 3.6919162048650923e-236); + + testLoad('i32', '8_s', 16, 0, 0, -0x10); + testLoad('i32', '8_u', 16, 0, 0, 0xf0); + testLoad('i32', '16_s', 16, 0, 0, -0xe10); + testLoad('i32', '16_u', 16, 0, 0, 0xf1f0); + + testStore('i32', '', 0, 0, 0, -0x3f3e2c2c); + testStore('i32', '', 1, 0, 1, -0x3f3e2c2c); + testStore('i32', '', 0, 1, 1, -0x3f3e2c2c); + testStore('i32', '', 1, 1, 4, -0x3f3e2c2c); + + testStore('f32', '', 0, 0, 0, 0.01234566979110241); + testStore('f32', '', 1, 0, 1, 0.01234566979110241); + testStore('f32', '', 0, 4, 0, 0.01234566979110241); + testStore('f32', '', 1, 3, 4, 0.01234566979110241); + testStore('f64', '', 0, 0, 0, 0.89012345); + testStore('f64', '', 1, 0, 1, 0.89012345); + testStore('f64', '', 0, 8, 0, 0.89012345); + testStore('f64', '', 1, 7, 8, 0.89012345); + + testStore('i32', '8', 0, 0, 0, 0x23); + testStore('i32', '16', 0, 0, 0, 0x2345); + + wasmFailValidateText('(module (memory 2 1))', /maximum length 1 is less than initial length 2/); + + // Test bounds checks and edge cases. + const align = 0; + + for (let offset of [0, 1, 2, 3, 4, 8, 16, 41, 0xfff8]) { + // Accesses of 1 byte. + let lastValidIndex = 0x10000 - 1 - offset; + + testLoad('i32', '8_s', lastValidIndex, offset, align, 0); + testLoadOOB('i32', '8_s', lastValidIndex + 1, offset, align); + + testLoad('i32', '8_u', lastValidIndex, offset, align, 0); + testLoadOOB('i32', '8_u', lastValidIndex + 1, offset, align); + + testStore('i32', '8', lastValidIndex, offset, align, -42); + testStoreOOB('i32', '8', lastValidIndex + 1, offset, align, -42); + + // Accesses of 2 bytes. + lastValidIndex = 0x10000 - 2 - offset; + + testLoad('i32', '16_s', lastValidIndex, offset, align, 0); + testLoadOOB('i32', '16_s', lastValidIndex + 1, offset, align); + + testLoad('i32', '16_u', lastValidIndex, offset, align, 0); + testLoadOOB('i32', '16_u', lastValidIndex + 1, offset, align); + + testStore('i32', '16', lastValidIndex, offset, align, -32768); + testStoreOOB('i32', '16', lastValidIndex + 1, offset, align, -32768); + + // Accesses of 4 bytes. + lastValidIndex = 0x10000 - 4 - offset; + + testLoad('i32', '', lastValidIndex, offset, align, 0); + testLoadOOB('i32', '', lastValidIndex + 1, offset, align); + + testLoad('f32', '', lastValidIndex, offset, align, 0); + testLoadOOB('f32', '', lastValidIndex + 1, offset, align); + + testStore('i32', '', lastValidIndex, offset, align, 1337); + testStoreOOB('i32', '', lastValidIndex + 1, offset, align, 1337); + + testStore('f32', '', lastValidIndex, offset, align, Math.fround(13.37)); + testStoreOOB('f32', '', lastValidIndex + 1, offset, align, Math.fround(13.37)); + + // Accesses of 8 bytes. + lastValidIndex = 0x10000 - 8 - offset; + + testLoad('f64', '', lastValidIndex, offset, align, 0); + testLoadOOB('f64', '', lastValidIndex + 1, offset, align); + + testStore('f64', '', lastValidIndex, offset, align, 1.23456789); + testStoreOOB('f64', '', lastValidIndex + 1, offset, align, 1.23456789); + } + + // Ensure wrapping doesn't apply. + offset = 0x7fffffff; // maximum allowed offset that doesn't always throw. + for (let index of [0, 1, 2, 3, 0x7fffffff, 0x80000000, 0x80000001]) { + testLoadOOB('i32', '8_s', index, offset, align); + testLoadOOB('i32', '16_s', index, offset, align); + testLoadOOB('i32', '', index, offset, align); + testLoadOOB('f32', '', index, offset, align); + testLoadOOB('f64', '', index, offset, align); + } + + // Ensure out of bounds when the offset is greater than the immediate range. + index = 0; + for (let offset of [0x80000000, 0xfffffffe, 0xffffffff]) { + testLoadOOB('i32', '8_s', index, offset, 1); + testLoadOOB('i32', '16_s', index, offset, 1); + testLoadOOB('i32', '16_s', index, offset, 2); + testLoadOOB('i32', '', index, offset, 1); + testLoadOOB('i32', '', index, offset, 4); + testLoadOOB('f32', '', index, offset, 1); + testLoadOOB('f32', '', index, offset, 4); + testLoadOOB('f64', '', index, offset, 1); + testLoadOOB('f64', '', index, offset, 8); + } + + wasmFailValidateText('(module (memory 1) (func (f64.store offset=0 (i32.const 0) (i32.const 0))))', mismatchError("i32", "f64")); + wasmFailValidateText('(module (memory 1) (func (f64.store offset=0 (i32.const 0) (f32.const 0))))', mismatchError("f32", "f64")); + + wasmFailValidateText('(module (memory 1) (func (f32.store offset=0 (i32.const 0) (i32.const 0))))', mismatchError("i32", "f32")); + wasmFailValidateText('(module (memory 1) (func (f32.store offset=0 (i32.const 0) (f64.const 0))))', mismatchError("f64", "f32")); + + wasmFailValidateText('(module (memory 1) (func (i32.store offset=0 (i32.const 0) (f32.const 0))))', mismatchError("f32", "i32")); + wasmFailValidateText('(module (memory 1) (func (i32.store offset=0 (i32.const 0) (f64.const 0))))', mismatchError("f64", "i32")); + + wasmEvalText('(module (memory 0 65535))') + wasmFailValidateText('(module (memory 0 65536))', /maximum memory size too big/); + + // Test high charge of registers + function testRegisters() { + assertEq(wasmEvalText( + `(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (func (param i32) (local i32 i32 i32 i32 f32 f64) (result i32) + (set_local 1 (i32.load8_s offset=4 (get_local 0))) + (set_local 2 (i32.load16_s (get_local 1))) + (i32.store8 offset=4 (get_local 0) (get_local 1)) + (set_local 3 (i32.load16_u (get_local 2))) + (i32.store16 (get_local 1) (get_local 2)) + (set_local 4 (i32.load (get_local 2))) + (i32.store (get_local 1) (get_local 2)) + (set_local 5 (f32.load (get_local 4))) + (f32.store (get_local 4) (get_local 5)) + (set_local 6 (f64.load (get_local 4))) + (f64.store (get_local 4) (get_local 6)) + (i32.add + (i32.add + (get_local 0) + (get_local 1) + ) + (i32.add + (i32.add + (get_local 2) + (get_local 3) + ) + (i32.add + (get_local 4) + (i32.reinterpret/f32 (get_local 5)) + ) + ) + ) + ) (export "" 0))` + ).exports[""](1), 50464523); + } + + testRegisters(); + + { + setJitCompilerOption('wasm.test-mode', 1); + + testLoad('i64', '', 0, 0, 0, '0x0706050403020100'); + testLoad('i64', '', 1, 0, 0, '0x0807060504030201'); + testLoad('i64', '', 0, 1, 0, '0x0807060504030201'); + testLoad('i64', '', 1, 1, 4, '0x0908070605040302'); + + testLoad('i64', '8_s', 16, 0, 0, -0x10); + testLoad('i64', '8_u', 16, 0, 0, 0xf0); + testLoad('i64', '16_s', 16, 0, 0, -0xe10); + testLoad('i64', '16_u', 16, 0, 0, 0xf1f0); + testLoad('i64', '32_s', 16, 0, 0, 0xf3f2f1f0 | 0); + testLoad('i64', '32_u', 16, 0, 0, '0xf3f2f1f0'); + + testStore('i64', '', 0, 0, 0, '0xc0c1d3d4e6e7090a'); + testStore('i64', '', 1, 0, 0, '0xc0c1d3d4e6e7090a'); + testStore('i64', '', 0, 1, 0, '0xc0c1d3d4e6e7090a'); + testStore('i64', '', 1, 1, 4, '0xc0c1d3d4e6e7090a'); + testStore('i64', '8', 0, 0, 0, 0x23); + testStore('i64', '16', 0, 0, 0, 0x23); + testStore('i64', '32', 0, 0, 0, 0x23); + + let align = 0; + for (let offset of [0, 1, 2, 3, 4, 8, 16, 41, 0xfff8]) { + // Accesses of 1 byte. + let lastValidIndex = 0x10000 - 1 - offset; + + testLoad('i64', '8_s', lastValidIndex, offset, align, 0); + testLoadOOB('i64', '8_s', lastValidIndex + 1, offset, align); + + testLoad('i64', '8_u', lastValidIndex, offset, align, 0); + testLoadOOB('i64', '8_u', lastValidIndex + 1, offset, align); + + testStore('i64', '8', lastValidIndex, offset, align, -42); + testStoreOOB('i64', '8', lastValidIndex + 1, offset, align, -42); + + // Accesses of 2 bytes. + lastValidIndex = 0x10000 - 2 - offset; + + testLoad('i64', '16_s', lastValidIndex, offset, align, 0); + testLoadOOB('i64', '16_s', lastValidIndex + 1, offset, align); + + testLoad('i64', '16_u', lastValidIndex, offset, align, 0); + testLoadOOB('i64', '16_u', lastValidIndex + 1, offset, align); + + testStore('i64', '16', lastValidIndex, offset, align, -32768); + testStoreOOB('i64', '16', lastValidIndex + 1, offset, align, -32768); + + // Accesses of 4 bytes. + lastValidIndex = 0x10000 - 4 - offset; + + testLoad('i64', '32_s', lastValidIndex, offset, align, 0); + testLoadOOB('i64', '32_s', lastValidIndex + 1, offset, align); + + testLoad('i64', '32_u', lastValidIndex, offset, align, 0); + testLoadOOB('i64', '32_u', lastValidIndex + 1, offset, align); + + testStore('i64', '32', lastValidIndex, offset, align, 0xf1231337 | 0); + testStoreOOB('i64', '32', lastValidIndex + 1, offset, align, 0xf1231337 | 0); + + // Accesses of 8 bytes. + lastValidIndex = 0x10000 - 8 - offset; + + testLoad('i64', '', lastValidIndex, offset, align, 0); + testLoadOOB('i64', '', lastValidIndex + 1, offset, align); + + testStore('i64', '', lastValidIndex, offset, align, '0x1234567887654321'); + testStoreOOB('i64', '', lastValidIndex + 1, offset, align, '0x1234567887654321'); + } + + setJitCompilerOption('wasm.test-mode', 0); + } +} + +setJitCompilerOption('wasm.fold-offsets', 1); diff --git a/js/src/jit-test/tests/wasm/nan-semantics.js b/js/src/jit-test/tests/wasm/nan-semantics.js new file mode 100644 index 000000000..d61d00fe8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/nan-semantics.js @@ -0,0 +1,177 @@ +load(libdir + "wasm.js"); + +var f64 = new Float64Array(2); +var f32 = new Float32Array(f64.buffer); +var u8 = new Uint8Array(f64.buffer); + +function assertSameBitPattern(from, to, offset) { + for (let i = from; i < to; i++) + assertEq(u8[i], u8[i + offset], 'non equality in assertSameBitPattern'); +} + +// Check that custom NaN can't escape to normal JS, in non-testing mode. +f32[0] = NaN; +f32[0] = f32[0]; // Force canonicalization. + +f32[1] = wasmEvalText('(module (func (result f32) (f32.const nan:0x123456)) (export "" 0))').exports[""](); +assertSameBitPattern(0, 4, 4); + +var checkBitPatterns = { + "": { + float32(x) { + f32[1] = x; + assertSameBitPattern(0, 4, 4); + }, + float64(x) { + f64[1] = x; + assertSameBitPattern(0, 8, 8); + } + } +} + +wasmEvalText('(module (import "" "float32" (param f32)) (func (call 0 (f32.const nan:0x123456))) (export "" 0))', checkBitPatterns).exports[""](); + +f64[0] = NaN; +f64[0] = f64[0]; // Force canonicalization. +f64[1] = wasmEvalText('(module (func (result f64) (f64.const nan:0x123456)) (export "" 0))').exports[""](); +assertSameBitPattern(0, 8, 8); + +wasmEvalText('(module (import "" "float64" (param f64)) (func (call 0 (f64.const nan:0x123456))) (export "" 0))', checkBitPatterns).exports[""](); + +// Enable test mode. +setJitCompilerOption('wasm.test-mode', 1); + +// SANITY CHECKS + +// There are two kinds of NaNs: signaling and quiet. Usually, the first bit of +// the payload is used to indicate whether it is quiet (1 for quiet, 0 for +// signaling). Most operations have to transform a signaling NaN into a quiet +// NaN, which prevents some optimizations in WebAssembly. + +// A float32 has 32 bits, 23 bits of them being reserved for the mantissa +// (= NaN payload). +var f32_nan_base = 0x7f800000; + +var f32_snan_code = '(f32.const nan:0x200000)'; +var f32_snan = wasmEvalText(`(module (func (result f32) ${f32_snan_code}) (export "" 0))`).exports[""](); +assertEqNaN(f32_snan, { nan_low: f32_nan_base | 0x200000 }); + +var f32_qnan_code = '(f32.const nan:0x600000)'; +var f32_qnan = wasmEvalText(`(module (func (result f32) ${f32_qnan_code}) (export "" 0))`).exports[""](); +assertEqNaN(f32_qnan, { nan_low: f32_nan_base | 0x600000 }); + +// A float64 has 64 bits, 1 for the sign, 11 for the exponent, the rest for the +// mantissa (payload). +var f64_nan_base_high = 0x7ff00000; + +var f64_snan_code = '(f64.const nan:0x4000000000000)'; +var f64_snan = wasmEvalText(`(module (func (result f64) ${f64_snan_code}) (export "" 0))`).exports[""](); +assertEqNaN(f64_snan, { nan_low: 0x0, nan_high: f64_nan_base_high | 0x40000 }); + +var f64_qnan_code = '(f64.const nan:0xc000000000000)'; +var f64_qnan = wasmEvalText(`(module (func (result f64) ${f64_qnan_code}) (export "" 0))`).exports[""](); +assertEqNaN(f64_qnan, { nan_low: 0x0, nan_high: f64_nan_base_high | 0xc0000 }); + +// Actual tests. + +// An example where a signaling nan gets transformed into a quiet nan: +// snan + 0.0 = qnan +var nan = wasmEvalText(`(module (func (result f32) (f32.add ${f32_snan_code} (f32.const 0))) (export "" 0))`).exports[""](); +assertEqNaN(nan, f32_qnan); + +// Globals. +var m = wasmEvalText(`(module + (import "globals" "x" (global f32)) + (func (result f32) (get_global 0)) + (export "global" global 0) + (export "test" 0)) +`, { globals: { x: f32_snan } }).exports; + +assertEqNaN(m.test(), f32_snan); +assertEqNaN(m.global, f32_snan); + +var m = wasmEvalText(`(module + (import "globals" "x" (global f64)) + (func (result f64) (get_global 0)) + (export "global" global 0) + (export "test" 0)) +`, { globals: { x: f64_snan } }).exports; + +assertEqNaN(m.test(), f64_snan); +assertEqNaN(m.global, f64_snan); + +// NaN propagation behavior. +var constantCache = new Map; +function getConstant(code) { + if (typeof code === 'number') + return code; + if (constantCache.has(code)) { + return constantCache.get(code); + } + let type = code.indexOf('f32') >= 0 ? 'f32' : 'f64'; + let val = wasmEvalText(`(module (func (result ${type}) ${code}) (export "" 0))`).exports[""](); + constantCache.set(code, val); + return val; +} + +function test(type, opcode, snan_code, rhs_code, qnan_val) { + var snan_val = getConstant(snan_code); + var rhs = getConstant(rhs_code); + + // Test all forms: + // - (constant, constant), + // - (constant, variable), + // - (variable, constant), + // - (variable, variable) + assertEqNaN(wasmEvalText(`(module (func (result ${type}) (${type}.${opcode} ${snan_code} ${rhs_code})) (export "" 0))`).exports[""](), qnan_val); + assertEqNaN(wasmEvalText(`(module (func (param ${type}) (result ${type}) (${type}.${opcode} (get_local 0) ${rhs_code})) (export "" 0))`).exports[""](snan_val), qnan_val); + assertEqNaN(wasmEvalText(`(module (func (param ${type}) (result ${type}) (${type}.${opcode} ${snan_code} (get_local 0))) (export "" 0))`).exports[""](rhs), qnan_val); + assertEqNaN(wasmEvalText(`(module (func (param ${type}) (param ${type}) (result ${type}) (${type}.${opcode} (get_local 0) (get_local 1))) (export "" 0))`).exports[""](snan_val, rhs), qnan_val); +} + +var f32_zero = '(f32.const 0)'; +var f64_zero = '(f64.const 0)'; + +var f32_one = '(f32.const 1)'; +var f64_one = '(f64.const 1)'; + +var f32_negone = '(f32.const -1)'; +var f64_negone = '(f64.const -1)'; + +// x - 0.0 doesn't get folded into x: +test('f32', 'sub', f32_snan_code, f32_zero, f32_qnan); +test('f64', 'sub', f64_snan_code, f64_zero, f64_qnan); + +// x * 1.0 doesn't get folded into x: +test('f32', 'mul', f32_snan_code, f32_one, f32_qnan); +test('f32', 'mul', f32_one, f32_snan_code, f32_qnan); + +test('f64', 'mul', f64_snan_code, f64_one, f64_qnan); +test('f64', 'mul', f64_one, f64_snan_code, f64_qnan); + +// x * -1.0 doesn't get folded into -x: +test('f32', 'mul', f32_snan_code, f32_negone, f32_qnan); +test('f32', 'mul', f32_negone, f32_snan_code, f32_qnan); + +test('f64', 'mul', f64_snan_code, f64_negone, f64_qnan); +test('f64', 'mul', f64_negone, f64_snan_code, f64_qnan); + +// x / -1.0 doesn't get folded into -1 * x: +test('f32', 'div', f32_snan_code, f32_negone, f32_qnan); +test('f64', 'div', f64_snan_code, f64_negone, f64_qnan); + +// min doesn't get folded when one of the operands is a NaN +test('f32', 'min', f32_snan_code, f32_zero, f32_qnan); +test('f32', 'min', f32_zero, f32_snan_code, f32_qnan); + +test('f64', 'min', f64_snan_code, f64_zero, f64_qnan); +test('f64', 'min', f64_zero, f64_snan_code, f64_qnan); + +// ditto for max +test('f32', 'max', f32_snan_code, f32_zero, f32_qnan); +test('f32', 'max', f32_zero, f32_snan_code, f32_qnan); + +test('f64', 'max', f64_snan_code, f64_zero, f64_qnan); +test('f64', 'max', f64_zero, f64_snan_code, f64_qnan); + +setJitCompilerOption('wasm.test-mode', 0); diff --git a/js/src/jit-test/tests/wasm/no-movwt.js b/js/src/jit-test/tests/wasm/no-movwt.js new file mode 100644 index 000000000..ce6ba064f --- /dev/null +++ b/js/src/jit-test/tests/wasm/no-movwt.js @@ -0,0 +1,8 @@ +setARMHwCapFlags('vfp'); + +if (typeof WebAssembly !== "undefined") { + var i = new WebAssembly.Instance( + new WebAssembly.Module( + wasmTextToBinary('(module (func (export "") (result i32) (i32.const 42)))'))); + assertEq(i.exports[""](), 42); +} diff --git a/js/src/jit-test/tests/wasm/profiling.js b/js/src/jit-test/tests/wasm/profiling.js new file mode 100644 index 000000000..c8bf8467e --- /dev/null +++ b/js/src/jit-test/tests/wasm/profiling.js @@ -0,0 +1,247 @@ +load(libdir + "wasm.js"); + +// Single-step profiling currently only works in the ARM simulator +if (!getBuildConfiguration()["arm-simulator"]) + quit(); + +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; +const Table = WebAssembly.Table; + +function normalize(stack) +{ + var wasmFrameTypes = [ + {re:/^entry trampoline \(in asm.js\)$/, sub:">"}, + {re:/^wasm-function\[(\d+)\] \(.*\)$/, sub:"$1"}, + {re:/^(fast|slow) FFI trampoline \(in asm.js\)$/, sub:"<"}, + {re:/ \(in asm.js\)$/, sub:""} + ]; + + var framesIn = stack.split(','); + var framesOut = []; + for (let frame of framesIn) { + for (let {re, sub} of wasmFrameTypes) { + if (re.test(frame)) { + framesOut.push(frame.replace(re, sub)); + break; + } + } + } + + return framesOut.join(','); +} + +function removeAdjacentDuplicates(array) { + if (array.length < 2) + return; + let i = 0; + for (let j = 1; j < array.length; j++) { + if (array[i] !== array[j]) + array[++i] = array[j]; + } + array.length = i + 1; +} + +function assertEqStacks(got, expect) +{ + for (let i = 0; i < got.length; i++) + got[i] = normalize(got[i]); + + removeAdjacentDuplicates(got); + + if (got.length != expect.length) { + print(`Got:\n${got.toSource()}\nExpect:\n${expect.toSource()}`); + assertEq(got.length, expect.length); + } + + for (let i = 0; i < got.length; i++) { + if (got[i] !== expect[i]) { + print(`On stack ${i}, Got:\n${got[i]}\nExpect:\n${expect[i]}`); + assertEq(got[i], expect[i]); + } + } +} + +function test(code, importObj, expect) +{ + enableSPSProfiling(); + + var f = wasmEvalText(code, importObj).exports[""]; + enableSingleStepProfiling(); + f(); + assertEqStacks(disableSingleStepProfiling(), expect); + + disableSPSProfiling(); +} + +test( +`(module + (func (result i32) (i32.const 42)) + (export "" 0) +)`, +{}, +["", ">", "0,>", ">", ""]); + +test( +`(module + (func (result i32) (i32.add (call 1) (i32.const 1))) + (func (result i32) (i32.const 42)) + (export "" 0) +)`, +{}, +["", ">", "0,>", "1,0,>", "0,>", ">", ""]); + +test( +`(module + (func $foo (call_indirect 0 (i32.const 0))) + (func $bar) + (table anyfunc (elem $bar)) + (export "" $foo) +)`, +{}, +["", ">", "0,>", "1,0,>", "0,>", ">", ""]); + +test( +`(module + (import $foo "" "foo") + (table anyfunc (elem $foo)) + (func $bar (call_indirect 0 (i32.const 0))) + (export "" $bar) +)`, +{"":{foo:()=>{}}}, +["", ">", "1,>", "0,1,>", "<,0,1,>", "0,1,>", "1,>", ">", ""]); + +function testError(code, error, expect) +{ + enableSPSProfiling(); + var f = wasmEvalText(code).exports[""]; + enableSingleStepProfiling(); + assertThrowsInstanceOf(f, error); + assertEqStacks(disableSingleStepProfiling(), expect); + disableSPSProfiling(); +} + +testError( +`(module + (func $foo (unreachable)) + (func (export "") (call $foo)) +)`, +WebAssembly.RuntimeError, +["", ">", "1,>", "0,1,>", "trap handling,0,1,>", "inline stub,0,1,>", ""]); + +testError( +`(module + (type $good (func)) + (type $bad (func (param i32))) + (func $foo (call_indirect $bad (i32.const 1) (i32.const 0))) + (func $bar (type $good)) + (table anyfunc (elem $bar)) + (export "" $foo) +)`, +WebAssembly.RuntimeError, +// Technically we have this one *one-instruction* interval where +// the caller is lost (the stack with "1,>"). It's annoying to fix and shouldn't +// mess up profiles in practice so we ignore it. +["", ">", "0,>", "1,0,>", "1,>", "trap handling,0,>", "inline stub,0,>", ""]); + +(function() { + var e = wasmEvalText(` + (module + (func $foo (result i32) (i32.const 42)) + (export "foo" $foo) + (func $bar (result i32) (i32.const 13)) + (table 10 anyfunc) + (elem (i32.const 0) $foo $bar) + (export "tbl" table) + )`).exports; + assertEq(e.foo(), 42); + assertEq(e.tbl.get(0)(), 42); + assertEq(e.tbl.get(1)(), 13); + + enableSPSProfiling(); + enableSingleStepProfiling(); + assertEq(e.tbl.get(0)(), 42); + assertEqStacks(disableSingleStepProfiling(), ["", ">", "0,>", ">", ""]); + disableSPSProfiling(); + + assertEq(e.foo(), 42); + assertEq(e.tbl.get(0)(), 42); + assertEq(e.tbl.get(1)(), 13); + + enableSPSProfiling(); + enableSingleStepProfiling(); + assertEq(e.tbl.get(1)(), 13); + assertEqStacks(disableSingleStepProfiling(), ["", ">", "1,>", ">", ""]); + disableSPSProfiling(); + + assertEq(e.tbl.get(0)(), 42); + assertEq(e.tbl.get(1)(), 13); + assertEq(e.foo(), 42); + + enableSPSProfiling(); + enableSingleStepProfiling(); + assertEq(e.foo(), 42); + assertEq(e.tbl.get(1)(), 13); + assertEqStacks(disableSingleStepProfiling(), ["", ">", "0,>", ">", "", ">", "1,>", ">", ""]); + disableSPSProfiling(); + + var e2 = wasmEvalText(` + (module + (type $v2i (func (result i32))) + (import "a" "b" (table 10 anyfunc)) + (elem (i32.const 2) $bar) + (func $bar (result i32) (i32.const 99)) + (func $baz (param $i i32) (result i32) (call_indirect $v2i (get_local $i))) + (export "baz" $baz) + )`, {a:{b:e.tbl}}).exports; + + enableSPSProfiling(); + enableSingleStepProfiling(); + assertEq(e2.baz(0), 42); + assertEqStacks(disableSingleStepProfiling(), ["", ">", "1,>", "0,1,>", "1,>", ">", ""]); + disableSPSProfiling(); + + enableSPSProfiling(); + enableSingleStepProfiling(); + assertEq(e2.baz(1), 13); + assertEqStacks(disableSingleStepProfiling(), ["", ">", "1,>", "1,1,>", "1,>", ">", ""]); + disableSPSProfiling(); + + enableSPSProfiling(); + enableSingleStepProfiling(); + assertEq(e2.baz(2), 99); + assertEqStacks(disableSingleStepProfiling(), ["", ">", "1,>", "0,1,>", "1,>", ">", ""]); + disableSPSProfiling(); +})(); + +(function() { + var m1 = new Module(wasmTextToBinary(`(module + (func $foo (result i32) (i32.const 42)) + (export "foo" $foo) + )`)); + var m2 = new Module(wasmTextToBinary(`(module + (import $foo "a" "foo" (result i32)) + (func $bar (result i32) (call $foo)) + (export "bar" $bar) + )`)); + + // Instantiate while not active: + var e1 = new Instance(m1).exports; + var e2 = new Instance(m2, {a:e1}).exports; + enableSPSProfiling(); + enableSingleStepProfiling(); + assertEq(e2.bar(), 42); + assertEqStacks(disableSingleStepProfiling(), ["", ">", "1,>", "0,1,>", "1,>", ">", ""]); + disableSPSProfiling(); + assertEq(e2.bar(), 42); + + // Instantiate while active: + enableSPSProfiling(); + var e3 = new Instance(m1).exports; + var e4 = new Instance(m2, {a:e3}).exports; + enableSingleStepProfiling(); + assertEq(e4.bar(), 42); + assertEqStacks(disableSingleStepProfiling(), ["", ">", "1,>", "0,1,>", "1,>", ">", ""]); + disableSPSProfiling(); + assertEq(e4.bar(), 42); +})(); diff --git a/js/src/jit-test/tests/wasm/regress/baseline-pop-along-edge.js b/js/src/jit-test/tests/wasm/regress/baseline-pop-along-edge.js new file mode 100644 index 000000000..75768f0d7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/baseline-pop-along-edge.js @@ -0,0 +1,68 @@ +// Bug 1316181 + +load(libdir + "wasm.js"); + +// There are locals with different values here to ensure that the +// get_local at the end picks up the right one even if the stack might +// have become unbalanced by a failure to adjust SP along the branch +// edge. The logic is that we use SP-relative addressing, and if the +// actual SP is not what the compiler thinks it is we will read +// something other than the expected value. + +var o = wasmEvalText( + `(module + (func (result i32) + (local $v0 i32) + (local $v1 i32) + (local $v2 i32) + (local $v3 i32) + (local $v4 i32) + (local $v5 i32) + (local $v6 i32) + (local $v7 i32) + (local $res i32) + (set_local $v0 (i32.const 0xDEADBEEF)) + (set_local $v1 (i32.const 0xFDEADBEE)) + (set_local $v2 (i32.const 0xEFDEADBE)) + (set_local $v3 (i32.const 0xEEFDEADB)) + (set_local $v4 (i32.const 0xBEEFDEAD)) + (set_local $v5 (i32.const 0xDBEEFDEA)) + (set_local $v6 (i32.const 0xADBEEFDE)) + (set_local $v7 (i32.const 0xEADBEEFD)) + (block $b + (set_local $res + (i32.add + (i32.add (i32.const 1) (i32.const 2)) + (i32.add + (i32.add (i32.const 3) (i32.const 4)) + (i32.add + (i32.add (i32.const 5) (i32.const 6)) + (i32.add + (i32.add (i32.const 7) (i32.const 8)) + (i32.add + (i32.add (i32.const 9) (i32.const 10)) + (i32.add + (i32.add (i32.const 11) (i32.const 12)) + (i32.add + (i32.add (i32.const 13) (i32.const 14)) + (i32.add + (i32.add (i32.const 15) (i32.const 16)) + (i32.add + (i32.add (i32.const 17) (i32.const 18)) + (i32.add + (i32.add (i32.const 19) (i32.const 20)) + (i32.add + (i32.add (i32.const 21) (i32.const 22)) + (i32.add + (i32.add (i32.const 23) (i32.const 24)) + (i32.add + (i32.add (i32.const 25) (i32.const 26)) + (i32.add + (i32.add (i32.const 27) (i32.const 28)) + (i32.add + (i32.add (i32.const 29) (i32.const 30)) + (br_if $b (i32.const 31) (i32.const 1))))))))))))))))))) + (return (get_local $v3))) + (export "a" 0))`).exports; + +assertEq(o["a"](), 0xEEFDEADB|0); diff --git a/js/src/jit-test/tests/wasm/regress/brtable-conditionblock-folding.js b/js/src/jit-test/tests/wasm/regress/brtable-conditionblock-folding.js new file mode 100644 index 000000000..a2f9b4e37 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/brtable-conditionblock-folding.js @@ -0,0 +1,19 @@ +load(libdir + "wasm.js"); + +assertEq(wasmEvalText(` +(module + (func $f (param $p i32) + block $out + i32.const 0 + if + i32.const 1 + tee_local $p + br_table $out $out + end + end + get_local $p + br_if 0 + ) + (export "f" $f) +) +`).exports.f(42), undefined); diff --git a/js/src/jit-test/tests/wasm/regress/bug1300546.js b/js/src/jit-test/tests/wasm/regress/bug1300546.js new file mode 100644 index 000000000..6ef35dc13 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1300546.js @@ -0,0 +1,34 @@ +load(libdir + "wasm.js"); + +setJitCompilerOption('wasm.test-mode', 1); + +try { + wasmEvalText(` + + (module + (type $type0 (func)) + (func $func0 + (nop) + (f64.load offset=59 align=1 (i32.const 0)) + (current_memory) + (current_memory) + (current_memory) + (current_memory) + (current_memory) + (current_memory) + (current_memory) + (current_memory) + (i64.rem_s (i64.const 17) (i64.xor (i64.const 17) (i64.xor (i64.const 17) (i64.xor (i64.xor (i64.const 17) (i64.const 17)) (i64.xor (i64.const 17) (i64.const 17)))))) + + (i64.rem_s + (i64.const 17) + (i64.xor + (i64.rem_s (i64.const 17) (i64.const 17)) + (i64.xor (i64.rem_s (i64.const 17) (i64.const 17)) (i64.xor (i64.const 17) (i64.const 17))))) + ) + (memory 1 1) + ) + + `)(createI64(41)); +} catch(e) { +} diff --git a/js/src/jit-test/tests/wasm/regress/bug1311019.js b/js/src/jit-test/tests/wasm/regress/bug1311019.js new file mode 100644 index 000000000..db977d108 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1311019.js @@ -0,0 +1,11 @@ +load(libdir + "wasm.js"); + +new WebAssembly.Module(wasmTextToBinary(`(module + (memory 1) + (func + (i64.trunc_s/f32 (f32.const 6.96875)) + (i32.load8_s (i32.const 0)) + (f32.const -7.66028056e-31) + (unreachable) + ) +)`)); diff --git a/js/src/jit-test/tests/wasm/regress/directives.txt b/js/src/jit-test/tests/wasm/regress/directives.txt new file mode 100644 index 000000000..057bdf4c2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also-wasm-baseline diff --git a/js/src/jit-test/tests/wasm/regress/gvn-unremovable-phi.js b/js/src/jit-test/tests/wasm/regress/gvn-unremovable-phi.js new file mode 100644 index 000000000..02b5fed5f --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/gvn-unremovable-phi.js @@ -0,0 +1,22 @@ +load(libdir + "wasm.js"); + +wasmEvalText(`(module + (type $type0 (func (param i32))) + (func $f (param $p i32) + (local $x i32) (local $y i32) + loop $top + get_local $x + get_local $p + get_local $x + br_if $top + i32.const 1 + tee_local $p + get_local $y + set_local $x + i32.add + call $f + br_if $top + return + end + ) +)`); diff --git a/js/src/jit-test/tests/wasm/regress/misc-control-flow.js b/js/src/jit-test/tests/wasm/regress/misc-control-flow.js new file mode 100644 index 000000000..81d44f278 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/misc-control-flow.js @@ -0,0 +1,226 @@ +load(libdir + "wasm.js"); + +wasmFailValidateText(`(module + (func (result i32) (param i32) + (loop (if (i32.const 0) (br 0)) (get_local 0))) + (export "" 0) +)`, /unused values not explicitly dropped by end of block/); + +wasmFailValidateText(`(module + (func (param i32) + (loop (if (i32.const 0) (br 0)) (get_local 0))) + (export "" 0) +)`, /unused values not explicitly dropped by end of block/); + +wasmFailValidateText(`(module + (func (result i32) (param i32) + (loop (if (i32.const 0) (br 0)) (drop (get_local 0)))) + (export "" 0) +)`, mismatchError("void", "i32")); + +assertEq(wasmEvalText(`(module + (func (result i32) (param i32) + (loop (if (i32.const 0) (br 0))) (get_local 0)) + (export "" 0) +)`).exports[""](42), 42); + +wasmEvalText(`(module (func $func$0 + (block (if (i32.const 1) (loop (br_table 0 (br 0))))) + ) +)`); + +wasmEvalText(`(module (func + (loop $out $in (br_table $out $out $in (i32.const 0))) + ) +)`); + +wasmEvalText(`(module (func (result i32) + (select + (block i32 + (drop (block i32 + (br_table + 1 + 0 + (i32.const 1) + (i32.const 0) + ) + )) + (i32.const 2) + ) + (i32.const 3) + (i32.const 4) + ) +)) +`); + +wasmEvalText(`(module + (func (result i32) (param i32) (param i32) (i32.const 0)) + (func (result i32) + (call 0 (i32.const 1) (call 0 (i32.const 2) (i32.const 3))) + (call 0 (unreachable) (i32.const 4)) + ) +)`); + +wasmEvalText(` +(module + + (func + (param i32) (param i32) (param i32) (param i32) + (result i32) + (i32.const 0) + ) + + (func (result i32) + (call 0 + (i32.const 42) + (i32.const 53) + (call 0 (i32.const 100) (i32.const 13) (i32.const 37) (i32.const 128)) + (return (i32.const 42)) + ) + ) + + (export "" 1) +) +`).exports[""](); + +wasmEvalText(` +(module + (import "check" "one" (param i32)) + (import "check" "two" (param i32) (param i32)) + (func (param i32) (call 0 (get_local 0))) + (func (param i32) (param i32) (call 1 (get_local 0) (get_local 1))) + (func + (call 1 + (i32.const 43) + (block $b i32 + (if (i32.const 1) + (call 0 + (block i32 + (call 0 (i32.const 42)) + (br $b (i32.const 10))))) + (i32.const 44)))) + (export "foo" 4)) +`, { + check: { + one(x) { + assertEq(x, 42); + }, + two(x, y) { + assertEq(x, 43); + assertEq(y, 10); + } + } +}).exports.foo(); + +assertEq(wasmEvalText(`(module (func + (return) + (select + (loop (i32.const 1)) + (loop (i32.const 2)) + (i32.const 3) + ) +) (export "" 0))`).exports[""](), undefined); + +wasmEvalText(`(module (func (result i32) + (return (i32.const 0)) + (select + (loop (i32.const 1)) + (loop (i32.const 2)) + (i32.const 3) + ) +))`); + +wasmEvalText(`(module (func + (block $return + (block $beforeReturn + (loop $out $in + (block $otherTable + (br_table + $return + $return + $otherTable + $beforeReturn + (i32.const 0) + ) + ) + (block $backTop + (br_table + $backTop + $backTop + $beforeReturn + (i32.const 0) + ) + ) + (br $in) + ) + ) + ) +))`); + +wasmFailValidateText( +`(module + (func $func$0 + (select + (if f32 + (i32.const 0) + (f32.const 0) + (i32.const 0) + ) + (if f32 + (i32.const 0) + (f32.const 0) + (i32.const 0) + ) + (i32.const 0) + ) + ) +)`, mismatchError("i32", "f32")); + +wasmEvalText(` +(module + (func (result i32) + (i32.add + (block $outer i32 + (drop (block $middle i32 + (block $inner i32 + (br_table $middle $outer $inner (i32.const 42) (i32.const 1)) + ) + (nop) + )) + (i32.const 0) + ) + (i32.const 13) + ) + ) +) +`); + +wasmFailValidateText(` +(module + (func (result i32) + (loop + (i32.const 0) + (br_table 1 0 (i32.const 15)) + ) + ) +)`, mismatchError("i32", "void")); + +wasmFailValidateText(` +(module + (func (result i32) + (loop i32 + (i32.const 0) + (br_table 1 0 (i32.const 15)) + ) + ) +)`, mismatchError("i32", "void")); + +wasmValidateText(` +(module + (func + (loop + (i32.const 0) + (br_table 1 0 (i32.const 15)) + ) + ) +)`); diff --git a/js/src/jit-test/tests/wasm/regress/movable-traps.js b/js/src/jit-test/tests/wasm/regress/movable-traps.js new file mode 100644 index 000000000..07a980a1e --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/movable-traps.js @@ -0,0 +1,40 @@ +load(libdir + "wasm.js"); + +let bodies = [ + ` + i32.const 1 + i32.const 0 + i32.div_s + `, + ` + i32.const 1 + i32.const 0 + i32.rem_s + `, + ` + f64.const 1797693134862315708145274e284 + i64.trunc_s/f64 + `, + ` + f32.const 1797693134862315708145274e284 + i32.trunc_s/f32 + ` +]; + +for (let body of bodies) { + wasmFullPass(` + (module + (func $f (param $x i32) (result i32) + loop $top + get_local $x + if + get_local $x + br 2 + end + ${body} + br $top + end + ) + (export "run" $f) + )`, 42, {}, 42); +} diff --git a/js/src/jit-test/tests/wasm/regress/null-metadata-filename.js b/js/src/jit-test/tests/wasm/regress/null-metadata-filename.js new file mode 100644 index 000000000..5d653062a --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/null-metadata-filename.js @@ -0,0 +1,14 @@ +if (typeof enableSPSProfiling === 'undefined' || !isAsmJSCompilationAvailable()) + quit(); + +evaluate(` +let f = evalReturningScope.bind(null, ''); + +(function(glob, stdlib) { + "use asm"; + var f = stdlib.f; + function _() { f(); } + return _; +})(this, { f })(); +`, { fileName: null }); + diff --git a/js/src/jit-test/tests/wasm/regress/oom-eval.js b/js/src/jit-test/tests/wasm/regress/oom-eval.js new file mode 100644 index 000000000..738a21857 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/oom-eval.js @@ -0,0 +1,12 @@ +// |jit-test| slow; allow-oom + +if (typeof oomTest !== 'function' || !wasmIsSupported()) { + print('Missing oomTest or wasm support in wasm/regress/oom-eval'); + quit(); +} + +function foo() { + var g = newGlobal(); + g.eval(`o = new WebAssembly.Instance(new WebAssemby.Module(wasmTextToBinary('(module (func) (export "" 0))')));`); +} +oomTest(foo); diff --git a/js/src/jit-test/tests/wasm/regress/oom-init.js b/js/src/jit-test/tests/wasm/regress/oom-init.js new file mode 100644 index 000000000..24719d316 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/oom-init.js @@ -0,0 +1,24 @@ +// |jit-test| slow; allow-oom + +if (typeof oomTest !== 'function' || !wasmIsSupported()) + quit(); + +Object.getOwnPropertyNames(this); +s = newGlobal(); +evalcx("\ + /x/;\ + oomTest(function() {\ + this[\"\"];\ + void 0;\ + Object.freeze(this);\ + l(undefined)();\ + O;\ + t;\ + 0;\ + ({e});\ + i;\ + 0;\ + ({ z: p ? 0 : 0});\ + s;\ + });\ +", s); diff --git a/js/src/jit-test/tests/wasm/regress/pass-stack-int64.js b/js/src/jit-test/tests/wasm/regress/pass-stack-int64.js new file mode 100644 index 000000000..0350f5ad8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/pass-stack-int64.js @@ -0,0 +1,17 @@ +load(libdir + "wasm.js"); + +var params = ''; +var locals = ''; +for (let i = 0; i < 20; i++) { + params += '(param i64) '; + locals += `(get_local ${i}) `; +} + +wasmEvalText(` +(module + (func + ${params} + (call 0 ${locals}) + ) +) +`); diff --git a/js/src/jit-test/tests/wasm/regress/regalloc-muli64.js b/js/src/jit-test/tests/wasm/regress/regalloc-muli64.js new file mode 100644 index 000000000..c90cd40e0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/regalloc-muli64.js @@ -0,0 +1,16 @@ +load(libdir + "wasm.js"); + +// Bug 1298808. +assertEq(wasmEvalText(`(module + (func + (result i32) + (i32.wrap/i64 + (i64.mul + ;; Conditions: rhs == lhs, rhs is not a constant. + (i64.add (i64.const 1) (i64.const 10)) + (i64.add (i64.const 1) (i64.const 10)) + ) + ) + ) + (export "" 0) +)`).exports[""](), 121); diff --git a/js/src/jit-test/tests/wasm/regress/reserve-enough.js b/js/src/jit-test/tests/wasm/regress/reserve-enough.js new file mode 100644 index 000000000..4866772b2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/reserve-enough.js @@ -0,0 +1,15 @@ +load(libdir + "wasm.js"); + +// Bug 1281131 - be sure to reserve enough stack space + +wasmEvalText( +`(module + (func $func0 + ${loopy(100)} + (nop)))`); + +function loopy(n) { + if (n == 0) + return "(nop)"; + return `(loop $out${n} $in${n} ${loopy(n-1)})`; +} diff --git a/js/src/jit-test/tests/wasm/regress/reserve-joinreg.js b/js/src/jit-test/tests/wasm/regress/reserve-joinreg.js new file mode 100644 index 000000000..354292a8a --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/reserve-joinreg.js @@ -0,0 +1,18 @@ +load(libdir + "wasm.js"); + +// Bug 1280933, excerpted from binary test case provided there. + +wasmEvalText( +`(module + (func $func0 (param $arg0 i32) (result i32) (local $var0 i64) + (set_local $var0 (i64.extend_u/i32 (get_local $arg0))) + (i32.wrap/i64 + (i64.add + (block i64 + (loop $label1 $label0 + (drop (block $label2 i64 + (br_table $label2 (i64.const 0) (get_local $arg0)))) + (set_local $var0 (i64.mul (i64.const 2) (get_local $var0)))) + (tee_local $var0 (i64.add (i64.const 4) (get_local $var0)))) + (i64.const 1)))) + (export "" 0))`); diff --git a/js/src/jit-test/tests/wasm/regress/select-any.js b/js/src/jit-test/tests/wasm/regress/select-any.js new file mode 100644 index 000000000..51b589d25 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/select-any.js @@ -0,0 +1,31 @@ +load(libdir + "wasm.js"); + +// Bug 1280921 + +var m1 = wasmEvalText( +`(module + (type $type0 (func)) + (func $func0 + (select (unreachable) (return (nop)) (loop (i32.const 1)))) + (export "" 0))`).exports[""]; + +try { + m1(); +} catch (e) { + if (!(e instanceof Error && e.message.match(/unreachable executed/))) + throw e; +} + +var m2 = wasmEvalText( +`(module + (type $type0 (func)) + (func $func0 + (select (i32.const 26) (unreachable) (i32.const 3))) + (export "" 0))`).exports[""]; + +try { + m2(); +} catch (e) { + if (!(e instanceof Error && e.message.match(/unreachable executed/))) + throw e; +} diff --git a/js/src/jit-test/tests/wasm/regress/shift-counts.js b/js/src/jit-test/tests/wasm/regress/shift-counts.js new file mode 100644 index 000000000..33e78ed7d --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/shift-counts.js @@ -0,0 +1,10 @@ +load(libdir + "wasm.js"); + +// Bug 1280926, extracted from binary + +wasmEvalText( +`(module + (type $type0 (func (result i32))) + (export "" $func0) + (func $func0 (result i32) + (i32.shr_s (i32.const -40) (i32.const 34))))`); diff --git a/js/src/jit-test/tests/wasm/regress/teavm-bugs.js b/js/src/jit-test/tests/wasm/regress/teavm-bugs.js new file mode 100644 index 000000000..d7403eaa0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/teavm-bugs.js @@ -0,0 +1,55 @@ +load(libdir + "wasm.js"); + +// Register allocation issue with LCompareI64AndBranch. +let params = ''; +let locals = ''; +let tests = '(i64.const 0)'; + +for (let i = 15; i --> 0;) { + params += `\n(param i64)`; + locals += `\n(local i64)`; + tests = ` + (if i64 + (i64.eq + (get_local ${i + 8}) + (get_local ${i}) + ) + (get_local ${i + 8}) + ${tests} + )`; +} + +let code = `(module + (func $i64 (result i64) + ${params} ${locals} + ${tests} + ) +)` + +wasmEvalText(code); + +// Bounds check elimination. +assertEq(wasmEvalText(`(module + (memory 1) + (func (param $p i32) (local $l i32) (result i32) + (set_local $l (i32.const 0)) + (if + (get_local $p) + (set_local $l + (i32.add + (get_local $l) + (i32.load8_s (get_local $p)) + ) + ) + ) + (set_local $l + (i32.add + (get_local $l) + (i32.load8_s (get_local $p)) + ) + ) + (get_local $l) + ) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (export "test" 0) +)`).exports["test"](3), 6); diff --git a/js/src/jit-test/tests/wasm/regress/too-large-frame.js b/js/src/jit-test/tests/wasm/regress/too-large-frame.js new file mode 100644 index 000000000..357cb0149 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/too-large-frame.js @@ -0,0 +1,29 @@ +load(libdir + "wasm.js"); + +// Bug 1280934, equivalent test case. + +try { + +wasmEvalText( +`(module + (func $func0 (result i32) ${locals()} + (i32.const 0)) + (export "" 0))`); + +} catch (e) { + // The wasm baseline compiler throws OOM on too-large frames, so + // handle that. + if (!String(e).match(/out of memory/)) + throw e; +} + +// The wasm baseline compiler cuts off frames at 256KB at the moment; +// the test case for bug 1280934 constructed a frame around 512KB so +// duplicate that here. + +function locals() { + var s = ""; + for ( var i=0 ; i < 64000 ; i++ ) + s += "(local f64)\n"; + return s; +} diff --git a/js/src/jit-test/tests/wasm/resizing.js b/js/src/jit-test/tests/wasm/resizing.js new file mode 100644 index 000000000..230416ca9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/resizing.js @@ -0,0 +1,233 @@ +load(libdir + "wasm.js"); + +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; +const Table = WebAssembly.Table; +const Memory = WebAssembly.Memory; +const RuntimeError = WebAssembly.RuntimeError; + +// ====== +// MEMORY +// ====== + +// Test for stale heap pointers after resize + +// Grow directly from builtin call: +wasmFullPass(`(module + (memory 1) + (func $test (result i32) + (i32.store (i32.const 0) (i32.const 1)) + (i32.store (i32.const 65532) (i32.const 10)) + (drop (grow_memory (i32.const 99))) + (i32.store (i32.const 6553596) (i32.const 100)) + (i32.add + (i32.load (i32.const 0)) + (i32.add + (i32.load (i32.const 65532)) + (i32.load (i32.const 6553596))))) + (export "run" $test) +)`, 111); + +// Grow during import call: +var exports = wasmEvalText(`(module + (import $imp "" "imp") + (memory 1) + (func $grow (drop (grow_memory (i32.const 99)))) + (export "grow" $grow) + (func $test (result i32) + (i32.store (i32.const 0) (i32.const 1)) + (i32.store (i32.const 65532) (i32.const 10)) + (call $imp) + (i32.store (i32.const 6553596) (i32.const 100)) + (i32.add + (i32.load (i32.const 0)) + (i32.add + (i32.load (i32.const 65532)) + (i32.load (i32.const 6553596))))) + (export "test" $test) +)`, {"":{imp() { exports.grow() }}}).exports; + +setJitCompilerOption("baseline.warmup.trigger", 2); +setJitCompilerOption("ion.warmup.trigger", 4); +for (var i = 0; i < 10; i++) + assertEq(exports.test(), 111); + +// Grow during call_indirect: +var mem = new Memory({initial:1}); +var tbl = new Table({initial:1, element:"anyfunc"}); +var exports1 = wasmEvalText(`(module + (import "" "mem" (memory 1)) + (func $grow + (i32.store (i32.const 65532) (i32.const 10)) + (drop (grow_memory (i32.const 99))) + (i32.store (i32.const 6553596) (i32.const 100))) + (export "grow" $grow) +)`, {"":{mem}}).exports; +var exports2 = wasmEvalText(`(module + (import "" "tbl" (table 1 anyfunc)) + (import "" "mem" (memory 1)) + (type $v2v (func)) + (func $test (result i32) + (i32.store (i32.const 0) (i32.const 1)) + (call_indirect $v2v (i32.const 0)) + (i32.add + (i32.load (i32.const 0)) + (i32.add + (i32.load (i32.const 65532)) + (i32.load (i32.const 6553596))))) + (export "test" $test) +)`, {"":{tbl, mem}}).exports; +tbl.set(0, exports1.grow); +assertEq(exports2.test(), 111); + +// Test for coherent length/contents + +var mem = new Memory({initial:1}); +new Int32Array(mem.buffer)[0] = 42; +var mod = new Module(wasmTextToBinary(`(module + (import "" "mem" (memory 1)) + (func $gm (param i32) (result i32) (grow_memory (get_local 0))) + (export "grow_memory" $gm) + (func $cm (result i32) (current_memory)) + (export "current_memory" $cm) + (func $ld (param i32) (result i32) (i32.load (get_local 0))) + (export "load" $ld) + (func $st (param i32) (param i32) (i32.store (get_local 0) (get_local 1))) + (export "store" $st) +)`)); +var exp1 = new Instance(mod, {"":{mem}}).exports; +var exp2 = new Instance(mod, {"":{mem}}).exports; +assertEq(exp1.current_memory(), 1); +assertEq(exp1.load(0), 42); +assertEq(exp2.current_memory(), 1); +assertEq(exp2.load(0), 42); +mem.grow(1); +assertEq(mem.buffer.byteLength, 2*64*1024); +new Int32Array(mem.buffer)[64*1024/4] = 13; +assertEq(exp1.current_memory(), 2); +assertEq(exp1.load(0), 42); +assertEq(exp1.load(64*1024), 13); +assertEq(exp2.current_memory(), 2); +assertEq(exp2.load(0), 42); +assertEq(exp2.load(64*1024), 13); +exp1.grow_memory(2); +assertEq(exp1.current_memory(), 4); +exp1.store(3*64*1024, 99); +assertEq(exp2.current_memory(), 4); +assertEq(exp2.load(3*64*1024), 99); +assertEq(mem.buffer.byteLength, 4*64*1024); +assertEq(new Int32Array(mem.buffer)[3*64*1024/4], 99); + +// Fail at maximum + +var mem = new Memory({initial:1, maximum:2}); +assertEq(mem.buffer.byteLength, 1 * 64*1024); +assertEq(mem.grow(1), 1); +assertEq(mem.buffer.byteLength, 2 * 64*1024); +assertErrorMessage(() => mem.grow(1), RangeError, /failed to grow memory/); +assertEq(mem.buffer.byteLength, 2 * 64*1024); + +// ====== +// TABLE +// ====== + +// Test for stale table base pointers after resize + +// Grow during import call: +var exports = wasmEvalText(`(module + (type $v2i (func (result i32))) + (import $grow "" "grow") + (table (export "tbl") 1 anyfunc) + (func $test (result i32) + (i32.add + (call_indirect $v2i (i32.const 0)) + (block i32 + (call $grow) + (call_indirect $v2i (i32.const 1))))) + (func $one (result i32) (i32.const 1)) + (elem (i32.const 0) $one) + (func $two (result i32) (i32.const 2)) + (export "test" $test) + (export "two" $two) +)`, {"":{grow() { exports.tbl.grow(1); exports.tbl.set(1, exports.two) }}}).exports; + +setJitCompilerOption("baseline.warmup.trigger", 2); +setJitCompilerOption("ion.warmup.trigger", 4); +for (var i = 0; i < 10; i++) + assertEq(exports.test(), 3); +assertEq(exports.tbl.length, 11); + +// Grow during call_indirect: +var exports1 = wasmEvalText(`(module + (import $grow "" "grow") + (func $exp (call $grow)) + (export "exp" $exp) +)`, {"":{grow() { exports2.tbl.grow(1); exports2.tbl.set(2, exports2.eleven) }}}).exports; +var exports2 = wasmEvalText(`(module + (type $v2v (func)) + (type $v2i (func (result i32))) + (import $imp "" "imp") + (elem (i32.const 0) $imp) + (table 2 anyfunc) + (func $test (result i32) + (i32.add + (call_indirect $v2i (i32.const 1)) + (block i32 + (call_indirect $v2v (i32.const 0)) + (call_indirect $v2i (i32.const 2))))) + (func $ten (result i32) (i32.const 10)) + (elem (i32.const 1) $ten) + (func $eleven (result i32) (i32.const 11)) + (export "tbl" table) + (export "test" $test) + (export "eleven" $eleven) +)`, {"":{imp:exports1.exp}}).exports; +assertEq(exports2.test(), 21); + +// Test for coherent length/contents + +var src = wasmEvalText(`(module + (func $one (result i32) (i32.const 1)) + (export "one" $one) + (func $two (result i32) (i32.const 2)) + (export "two" $two) + (func $three (result i32) (i32.const 3)) + (export "three" $three) +)`).exports; +var tbl = new Table({element:"anyfunc", initial:1}); +tbl.set(0, src.one); + +var mod = new Module(wasmTextToBinary(`(module + (type $v2i (func (result i32))) + (table (import "" "tbl") 1 anyfunc) + (func $ci (param i32) (result i32) (call_indirect $v2i (get_local 0))) + (export "call_indirect" $ci) +)`)); +var exp1 = new Instance(mod, {"":{tbl}}).exports; +var exp2 = new Instance(mod, {"":{tbl}}).exports; +assertEq(exp1.call_indirect(0), 1); +assertErrorMessage(() => exp1.call_indirect(1), RuntimeError, /index out of bounds/); +assertEq(exp2.call_indirect(0), 1); +assertErrorMessage(() => exp2.call_indirect(1), RuntimeError, /index out of bounds/); +assertEq(tbl.grow(1), 1); +assertEq(tbl.length, 2); +assertEq(exp1.call_indirect(0), 1); +assertErrorMessage(() => exp1.call_indirect(1), Error, /indirect call to null/); +tbl.set(1, src.two); +assertEq(exp1.call_indirect(1), 2); +assertErrorMessage(() => exp1.call_indirect(2), RuntimeError, /index out of bounds/); +assertEq(tbl.grow(2), 2); +assertEq(tbl.length, 4); +assertEq(exp2.call_indirect(0), 1); +assertEq(exp2.call_indirect(1), 2); +assertErrorMessage(() => exp2.call_indirect(2), Error, /indirect call to null/); +assertErrorMessage(() => exp2.call_indirect(3), Error, /indirect call to null/); + +// Fail at maximum + +var tbl = new Table({initial:1, maximum:2, element:"anyfunc"}); +assertEq(tbl.length, 1); +assertEq(tbl.grow(1), 1); +assertEq(tbl.length, 2); +assertErrorMessage(() => tbl.grow(1), RangeError, /failed to grow table/); +assertEq(tbl.length, 2); diff --git a/js/src/jit-test/tests/wasm/spec.js b/js/src/jit-test/tests/wasm/spec.js new file mode 100644 index 000000000..e8e965fcc --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec.js @@ -0,0 +1,555 @@ +load(libdir + "wasm.js"); + +// This is meant to be a small and dumb interpreter for wast files. Either it +// is imported by another script, which needs to define an array of arguments +// called importedArgs, or args need to be passed to the command line. +// +// Possible arguments include: +// -d enable debug verbose mode +// -c computes line numbers in wast files (disabled by default as it +// slows down the parser a lot) +// -s soft fail mode: if a test fails, don't abort but continue to +// the next one. +// * anything else is considered a relative path to the wast file to +// load and run. The path is relative to to the runner script, +// i.e. this file.. +// +// If there are no arguments, the wast interpreter will run sanity checks +// (testing that NaN payload comparisons works, e.g.). + +if (typeof assert === 'undefined') { + var assert = function(c, msg) { + assertEq(c, true, msg); + }; +} + +// Element list or string. +function Element(str, dollared, quoted) { + this.list = []; + this.str = str === undefined ? null : str; + this.dollared = !!dollared; + this.quoted = !!quoted; +} + +Element.prototype.toString = function() { + if (this.str !== null) { + if (this.dollared) { + return "$" + this.str; + } + if (this.quoted) { + return `"${this.str}"`; + } + return this.str; + } + return `(${this.list.map(x => x.toString()).join(" ")})`; +}; + +setJitCompilerOption('wasm.test-mode', 1); + +// Creates a tree of s-expressions. Ported from Binaryen's SExpressionParser. +function parseSExpression(text) { + var pos = 0; + + function isSpace(c) { + switch (c) { + case '\n': + case ' ': + case '\r': + case '\t': + case '\v': + case '\f': + return true; + default: + return false; + } + } + + function skip() { + while (true) { + let prevPos = pos; + + if (pos + 2 < text.length) { + + // Block comments. + if (text[pos] === '(' && text[pos + 1] === ';') + { + pos += 2; + let blockDepth = 1; + while (pos + 2 < text.length) { + if (text[pos] === '(' && text[pos + 1] === ';') { + pos += 2; + blockDepth++; + } else if (text[pos] === ';' && text[pos + 1] === ')') { + pos += 2; + if (!--blockDepth) + break; + } else { + pos++; + } + } + } + + // Inline comments. + if (text[pos] === ';' && text[pos + 1] === ';') { + pos += 2; + while (text[pos] !== '\n') + pos++; + } + } + + // Whitespaces. + while (isSpace(text[pos])) { + pos++; + } + + if (pos === prevPos) + break; + } + } + + function parse() { + skip(); + + if (text.length === pos || text[pos] === ')') + return null; + + if (text[pos] === '(') { + pos++; + var ret = parseInParens(); + skip(); + assert(text[pos] === ')', 'inner list ends with a )'); + pos++; + return ret; + } + + return parseString(); + } + + function parseInParens() { + skip(); + var start = pos; + var ret = new Element(); + while (true) { + var curr = parse(); + if (!curr) { + ret.lineno = countLines(text, pos); + return ret; + } + ret.list.push(curr); + } + } + + function parseString() { + var dollared = false; + var quoted = false; + if (text[pos] === '$') { + pos++; + dollared = true; + } + + var start = pos; + if (text[pos] === '"') { + quoted = true; + // Parse escaping \", but leave code escaped - we'll handle escaping in memory segments specifically. + pos++; + var str = ""; + while (true) { + if (text[pos] === '"') break; + if (text[pos] === '\\') { + str += text[pos]; + str += text[pos + 1]; + pos += 2; + continue; + } + str += text[pos]; + pos++; + } + pos++; + return new Element(str, dollared, quoted); + } + + while (pos < text.length && + !isSpace(text[pos]) && + text[pos] != ';' && + text[pos] != ')' && + text[pos] != '(') { + pos++; + } + + return new Element(text.substring(start, pos), dollared); + } + + var root = null; + while (!root) { // Keep parsing until we pass an initial comment. + root = parseInParens(); + } + return root; +} + +var imports = { + spectest: { + print, + global: 666, + table: new WebAssembly.Table({ initial: 10, maximum: 20, element: "anyfunc" }), + memory: new WebAssembly.Memory({ initial: 1, maximum: 2 }), + } +}; + +function handleNonStandard(exprName, e) +{ + if (exprName === 'quit') { + quit(); + } + if (exprName === 'print') { + print.apply(null, e.list.slice(1).map(exec)) + return true; + } + return false; +} + +function testNaNEqualityFunction() { + // Test NaN equality functions. + let u8 = new Uint8Array(16); + let i32 = new Int32Array(u8.buffer); + let f64 = new Float64Array(u8.buffer); + let f32 = new Float32Array(u8.buffer); + + // F64 NaN + let someNaN = wasmEvalText('(module (func (result f64) (f64.const -nan:0x12345678)) (export "" 0))').exports[""](); + i32[0] = someNaN.nan_low; + i32[1] = someNaN.nan_high; + assert(Number.isNaN(f64[0]), "we've stored a f64 NaN"); + + assertEq(u8[0], 0x78); + assertEq(u8[1], 0x56); + assertEq(u8[2], 0x34); + assertEq(u8[3], 0x12); + + assertEqNaN(someNaN, someNaN); + + // F32 NaN + someNaN = wasmEvalText('(module (func (result f32) (f32.const -nan:0x123456)) (export "" 0))').exports[""](); + i32[0] = someNaN.nan_low; + assert(Number.isNaN(f32[0]), "we've stored a f32 NaN"); + + assertEq(u8[0], 0x56); + assertEq(u8[1], 0x34); + assertEq(u8[2] & 0x7f, 0x12); + + assertEqNaN(someNaN, someNaN); + + // Compare a NaN value against another one. + let pNaN = wasmEvalText('(module (func (result f64) (f64.const nan)) (export "" 0))').exports[""](); + let nNaN = wasmEvalText('(module (func (result f64) (f64.const -nan)) (export "" 0))').exports[""](); + + i32[0] = pNaN.nan_low; + i32[1] = pNaN.nan_high; + i32[2] = nNaN.nan_low; + i32[3] = nNaN.nan_high; + + assertEq(f64[0], f64[1]); + assertErrorMessage(() => assertEqNaN(pNaN, nNaN), Error, /Assertion failed/); + assertEqNaN(pNaN, pNaN); + assertEqNaN(nNaN, nNaN); +} + +var constantCache = new Map; +var moduleCache = new Map; + +function getModuleAndField(e) { + let nextArgIndex = 1; + let nameExpr = e.list[nextArgIndex]; + let name = nameExpr.str; + + let moduleName = '__last_module__'; + if (nameExpr.dollared && !nameExpr.quoted) { + moduleName = name; + nextArgIndex += 1; + } + + if (!moduleCache.has(moduleName)) { + throw new Error('We should have a module here before trying to invoke things!'); + } + + let module = moduleCache.get(moduleName); + let fieldName = e.list[nextArgIndex++].str; + let rest = e.list.slice(nextArgIndex).map(exec); + + return [module, fieldName, rest]; +} + +// Recursively execute the expression. +function exec(e) { + var exprName = e.list[0].str; + + if (exprName === "module") { + let moduleText = e.toString(); + + let moduleName = null; + if (e.list && e.list.length >= 2 && e.list[1].str && e.list[1].dollared) { + moduleName = e.list[1].str; + moduleText = moduleText.replace(`$${moduleName}`, ''); + } + + let module = wasmEvalText(moduleText, imports).exports; + moduleCache.set('__last_module__', module); + if (moduleName) { + moduleCache.set(moduleName, module); + } + + return; + } + + if (exprName === "register") { + // (register IMPORT_NAME MODULE_NAME?) + assert(e.list[1].quoted, "first arg to register is quoted"); + let importName = e.list[1].str; + + let moduleName = '__last_module__'; + if (e.list.length > 2) { + moduleName = e.list[2].str; + } + + if (!moduleCache.has(moduleName)) { + throw new Error("can't register an unknown module for imports"); + } + + let module = moduleCache.get(moduleName); + + imports[importName] = {}; + + for (let [k, v] of Object.entries(module)) { + imports[importName][k] = v; + } + + return; + } + + if (exprName === "invoke") { + let [module, field, args] = getModuleAndField(e); + + let fn = null; + if (typeof module[field] === "function") { + fn = module[field]; + } else { + throw new Error("Exported function not found: " + e); + } + + return fn.apply(null, args); + } + + if (exprName === "get") { + let [module, field, args] = getModuleAndField(e); + return module[field]; + } + + if (exprName.indexOf(".const") > 0) { + // Eval the expression using a wasm module. + var type = exprName.substring(0, exprName.indexOf(".const")); + var key = e.toString(); + + if (constantCache.has(key)) { + return constantCache.get(key); + } + + var val = wasmEvalText(`(module (func (result ${type}) ${e}) (export "" 0))`).exports[""](); + constantCache.set(key, val); + return val; + } + + if (exprName === "assert_return") { + let lhs = exec(e.list[1]); + // There might be a value to test against. + if (e.list[2]) { + let rhs = exec(e.list[2]); + if (typeof lhs === 'number') { + assertEq(lhs, rhs); + } else if (typeof lhs.nan_low === 'number') { + assertEqNaN(lhs, rhs); + } else { + // Int64 are emulated with objects with shape: + // {low: Number, high: Number} + assert(typeof lhs.low === 'number', 'assert_return expects NaN, int64 or number'); + assert(typeof lhs.high === 'number', 'assert_return expects NaN, int64 or number'); + assertEq(lhs.low, rhs.low); + assertEq(lhs.high, rhs.high); + } + } + return; + } + + if (exprName === "assert_return_nan") { + let res = exec(e.list[1]); + if (typeof res === 'number') { + assertEq(res, NaN); + } else { + assert(typeof res.nan_low === 'number', + "assert_return_nan expects either a NaN number or a NaN custom object"); + + let f64 = new Float64Array(1); + let f32 = new Float32Array(f64.buffer); + let i32 = new Int32Array(f64.buffer); + + i32[0] = res.nan_low; + i32[1] = res.nan_high; + assert(Number.isNaN(f64[0]) || Number.isNaN(f32[0]), "assert_return_nan test failed."); + } + return; + } + + if (exprName === "assert_invalid" || exprName === "assert_malformed") { + let moduleText = e.list[1].toString(); + let errMsg = e.list[2]; + if (errMsg) { + assert(errMsg.quoted, "assert_invalid/malformed second argument must be a string"); + errMsg.quoted = false; + } + + // assert_invalid tests both the decoder *and* the parser itself. + let text; + try { + text = wasmTextToBinary(moduleText); + } catch(e) { + if (/wasm text error/.test(e.toString())) + return; + } + + assertEq(WebAssembly.validate(text), false, "assert_invalid failed"); + + let caught = false; + try { + new WebAssembly.Module(text) + } catch (e) { + caught = true; + debug("Caught", e.toString(), ", expected:", errMsg); + } + assertEq(caught, true); + return; + } + + if (exprName === "assert_soft_invalid") { + let moduleText = e.list[1].toString(); + let errMsg = e.list[2]; + if (errMsg) { + assert(errMsg.quoted, "assert_soft_invalid second argument must be a string"); + errMsg.quoted = false; + } + + try { + new WebAssembly.Module(wasmTextToBinary(moduleText)); + } catch(e) { + debug('assert_soft_invalid caught:\nExpected:', errMsg, '\nActual:', e.toString()); + } + + return; + } + + if (exprName === 'assert_trap') { + let caught = false; + let errMsg = e.list[2]; + assert(errMsg.quoted, "assert_trap second argument must be a string"); + errMsg.quoted = false; + try { + exec(e.list[1]); + } catch(err) { + caught = true; + if (err.toString().indexOf(errMsg) === -1) + warn(`expected error message "${errMsg}", got "${err}"`); + } + assert(caught, "assert_trap exception not caught"); + return; + } + + if (exprName === 'assert_unlinkable') { + let moduleText = e.list[1].toString(); + let errMsg = e.list[2]; + if (errMsg) { + assert(errMsg.quoted, "assert_invalid second argument must be a string"); + errMsg.quoted = false; + } + let module = new WebAssembly.Module(wasmTextToBinary(moduleText)); + let caught = false; + try { + new WebAssembly.Instance(module, imports); + } catch(err) { + caught = true; + if (err.toString().indexOf(errMsg) === -1) + warn(`expected error message "${errMsg}", got "${err}"`); + } + assert(caught, "assert_unlinkable exception not caught"); + return; + } + + if (!handleNonStandard(exprName, e)) { + assert(false, "NYI: " + e); + } +} + +var args = typeof importedArgs !== 'undefined' ? importedArgs : scriptArgs; + +// Whether we should keep on executing tests if one of them failed or throw. +var softFail = false; + +// Debug function +var debug = function() {}; +var debugImpl = print; + +var warn = print; + +// Count number of lines from start to `input` in `text. +var countLines = function() { return -1; } +var countLinesImpl = function(text, input) { + return text.substring(0, input).split('\n').length; +} + +// Specific tests to be run +var targets = []; +for (let arg of args) { + switch (arg) { + case '-c': + countLines = countLinesImpl; + break; + case '-d': + debug = debugImpl; + break; + case '-s': + softFail = true; + break; + default: + targets.push(arg); + break; + } +} + +if (!args.length) { + testNaNEqualityFunction(); +} + +top_loop: +for (var test of targets) { + module = null; + + debug(`Running test ${test}...`); + + let source = read(scriptdir + test); + + let root = new parseSExpression(source); + + let success = true; + for (let e of root.list) { + try { + exec(e); + } catch(err) { + success = false; + debug(`Error in ${test}:${e.lineno}: ${err.stack ? err.stack : ''}\n${err}`); + if (!softFail) { + throw err; + } + } + } + + if (success) + debug(`\n${test} PASSED`); + else + debug(`\n${test} FAILED`); +} diff --git a/js/src/jit-test/tests/wasm/spec/address.wast b/js/src/jit-test/tests/wasm/spec/address.wast new file mode 100644 index 000000000..4f8e34982 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/address.wast @@ -0,0 +1,34 @@ +(module + (import "spectest" "print" (func $print (param i32))) + + (memory 1) + (data (i32.const 0) "abcdefghijklmnopqrstuvwxyz") + + (func (export "good") (param $i i32) + (call $print (i32.load8_u offset=0 (get_local $i))) ;; 97 'a' + (call $print (i32.load8_u offset=1 (get_local $i))) ;; 98 'b' + (call $print (i32.load8_u offset=2 (get_local $i))) ;; 99 'c' + (call $print (i32.load8_u offset=25 (get_local $i))) ;; 122 'z' + + (call $print (i32.load16_u offset=0 (get_local $i))) ;; 25185 'ab' + (call $print (i32.load16_u align=1 (get_local $i))) ;; 25185 'ab' + (call $print (i32.load16_u offset=1 align=1 (get_local $i))) ;; 25442 'bc' + (call $print (i32.load16_u offset=2 (get_local $i))) ;; 25699 'cd' + (call $print (i32.load16_u offset=25 align=1 (get_local $i))) ;; 122 'z\0' + + (call $print (i32.load offset=0 (get_local $i))) ;; 1684234849 'abcd' + (call $print (i32.load offset=1 align=1 (get_local $i))) ;; 1701077858 'bcde' + (call $print (i32.load offset=2 align=2 (get_local $i))) ;; 1717920867 'cdef' + (call $print (i32.load offset=25 align=1 (get_local $i))) ;; 122 'z\0\0\0' + ) + + (func (export "bad") (param $i i32) + (drop (i32.load offset=4294967295 (get_local $i))) + ) +) + +(invoke "good" (i32.const 0)) +(invoke "good" (i32.const 65507)) +(assert_trap (invoke "good" (i32.const 65508)) "out of bounds memory access") +(assert_trap (invoke "bad" (i32.const 0)) "out of bounds memory access") +(assert_trap (invoke "bad" (i32.const 1)) "out of bounds memory access") diff --git a/js/src/jit-test/tests/wasm/spec/address.wast.js b/js/src/jit-test/tests/wasm/spec/address.wast.js new file mode 100644 index 000000000..0ee1f671a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/address.wast.js @@ -0,0 +1 @@ +var importedArgs = ['address.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/binary.wast b/js/src/jit-test/tests/wasm/spec/binary.wast new file mode 100644 index 000000000..177ca4235 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/binary.wast @@ -0,0 +1,15 @@ +(module "\00asm\0d\00\00\00") +(module "\00asm" "\0d\00\00\00") +(module $M1 "\00asm\0d\00\00\00") +(module $M2 "\00asm" "\0d\00\00\00") + +(assert_malformed (module "") "unexpected end") +(assert_malformed (module "\01") "unexpected end") +(assert_malformed (module "\00as") "unexpected end") +(assert_malformed (module "\01") "unexpected end") +(assert_malformed (module "asm\00") "magic header not detected") + +(assert_malformed (module "\00asm") "unexpected end") +(assert_malformed (module "\00asm\0d") "unexpected end") +(assert_malformed (module "\00asm\0d\00\00") "unexpected end") +(assert_malformed (module "\00asm\0e\00\00\00") "unknown binary version") diff --git a/js/src/jit-test/tests/wasm/spec/binary.wast.js b/js/src/jit-test/tests/wasm/spec/binary.wast.js new file mode 100644 index 000000000..fcb431e40 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/binary.wast.js @@ -0,0 +1 @@ +var importedArgs = ['binary.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/block.wast b/js/src/jit-test/tests/wasm/spec/block.wast new file mode 100644 index 000000000..3108f8cbf --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/block.wast @@ -0,0 +1,251 @@ +;; Test `block` operator + +(module + ;; Auxiliary definition + (func $dummy) + + (func (export "empty") + (block) + (block $l) + ) + + (func (export "singular") (result i32) + (block (nop)) + (block i32 (i32.const 7)) + ) + + (func (export "multi") (result i32) + (block (call $dummy) (call $dummy) (call $dummy) (call $dummy)) + (block i32 (call $dummy) (call $dummy) (call $dummy) (i32.const 8)) + ) + + (func (export "nested") (result i32) + (block i32 + (block (call $dummy) (block) (nop)) + (block i32 (call $dummy) (i32.const 9)) + ) + ) + + (func (export "deep") (result i32) + (block i32 (block i32 (block i32 (block i32 (block i32 (block i32 + (block i32 (block i32 (block i32 (block i32 (block i32 (block i32 + (block i32 (block i32 (block i32 (block i32 (block i32 (block i32 + (block i32 (block i32 (block i32 (block i32 (block i32 (block i32 + (block i32 (block i32 (block i32 (block i32 (block i32 (block i32 + (block i32 (block i32 (block i32 (block i32 (block i32 (block i32 + (block i32 (block i32 (call $dummy) (i32.const 150))) + )))))) + )))))) + )))))) + )))))) + )))))) + )))))) + ) + + (func (export "as-unary-operand") (result i32) + (i32.ctz (block i32 (call $dummy) (i32.const 13))) + ) + (func (export "as-binary-operand") (result i32) + (i32.mul + (block i32 (call $dummy) (i32.const 3)) + (block i32 (call $dummy) (i32.const 4)) + ) + ) + (func (export "as-test-operand") (result i32) + (i32.eqz (block i32 (call $dummy) (i32.const 13))) + ) + (func (export "as-compare-operand") (result i32) + (f32.gt + (block f32 (call $dummy) (f32.const 3)) + (block f32 (call $dummy) (f32.const 3)) + ) + ) + + (func (export "break-bare") (result i32) + (block (br 0) (unreachable)) + (block (br_if 0 (i32.const 1)) (unreachable)) + (block (br_table 0 (i32.const 0)) (unreachable)) + (block (br_table 0 0 0 (i32.const 1)) (unreachable)) + (i32.const 19) + ) + (func (export "break-value") (result i32) + (block i32 (br 0 (i32.const 18)) (i32.const 19)) + ) + (func (export "break-repeated") (result i32) + (block i32 + (br 0 (i32.const 18)) + (br 0 (i32.const 19)) + (drop (br_if 0 (i32.const 20) (i32.const 0))) + (drop (br_if 0 (i32.const 20) (i32.const 1))) + (br 0 (i32.const 21)) + (br_table 0 (i32.const 22) (i32.const 4)) + (br_table 0 0 0 (i32.const 23) (i32.const 1)) + (i32.const 21) + ) + ) + (func (export "break-inner") (result i32) + (local i32) + (set_local 0 (i32.const 0)) + (set_local 0 (i32.add (get_local 0) (block i32 (block i32 (br 1 (i32.const 0x1)))))) + (set_local 0 (i32.add (get_local 0) (block i32 (block (br 0)) (i32.const 0x2)))) + (set_local 0 + (i32.add (get_local 0) (block i32 (i32.ctz (br 0 (i32.const 0x4))))) + ) + (set_local 0 + (i32.add (get_local 0) (block i32 (i32.ctz (block i32 (br 1 (i32.const 0x8)))))) + ) + (get_local 0) + ) + + (func (export "effects") (result i32) + (local i32) + (block + (set_local 0 (i32.const 1)) + (set_local 0 (i32.mul (get_local 0) (i32.const 3))) + (set_local 0 (i32.sub (get_local 0) (i32.const 5))) + (set_local 0 (i32.mul (get_local 0) (i32.const 7))) + (br 0) + (set_local 0 (i32.mul (get_local 0) (i32.const 100))) + ) + (i32.eq (get_local 0) (i32.const -14)) + ) +) + +(assert_return (invoke "empty")) +(assert_return (invoke "singular") (i32.const 7)) +(assert_return (invoke "multi") (i32.const 8)) +(assert_return (invoke "nested") (i32.const 9)) +(assert_return (invoke "deep") (i32.const 150)) + +(assert_return (invoke "as-unary-operand") (i32.const 0)) +(assert_return (invoke "as-binary-operand") (i32.const 12)) +(assert_return (invoke "as-test-operand") (i32.const 0)) +(assert_return (invoke "as-compare-operand") (i32.const 0)) + +(assert_return (invoke "break-bare") (i32.const 19)) +(assert_return (invoke "break-value") (i32.const 18)) +(assert_return (invoke "break-repeated") (i32.const 18)) +(assert_return (invoke "break-inner") (i32.const 0xf)) + +(assert_return (invoke "effects") (i32.const 1)) + +(assert_invalid + (module (func $type-empty-i32 (result i32) (block))) + "type mismatch" +) +(assert_invalid + (module (func $type-empty-i64 (result i64) (block))) + "type mismatch" +) +(assert_invalid + (module (func $type-empty-f32 (result f32) (block))) + "type mismatch" +) +(assert_invalid + (module (func $type-empty-f64 (result f64) (block))) + "type mismatch" +) + +(assert_invalid + (module (func $type-value-num-vs-void + (block (i32.const 1)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-value-void-vs-num (result i32) + (block (nop)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-value-num-vs-num (result i32) + (block (f32.const 0)) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-break-last-void-vs-num (result i32) + (block i32 (br 0)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-break-void-vs-num (result i32) + (block i32 (br 0) (i32.const 1)) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-break-void-vs-num (result i32) + (block (br 0 (nop)) (i32.const 1)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-break-num-vs-num (result i32) + (block (br 0 (i64.const 1)) (i32.const 1)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-break-first-void-vs-num (result i32) + (block (br 0 (nop)) (br 0 (i32.const 1))) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-break-first-num-vs-num (result i32) + (block (br 0 (i64.const 1)) (br 0 (i32.const 1))) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-break-nested-num-vs-void + (block i32 (block i32 (br 1 (i32.const 1))) (br 0)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-break-nested-empty-vs-num (result i32) + (block (block (br 1)) (br 0 (i32.const 1))) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-break-nested-void-vs-num (result i32) + (block (block (br 1 (nop))) (br 0 (i32.const 1))) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-break-nested-num-vs-num (result i32) + (block (block (br 1 (i64.const 1))) (br 0 (i32.const 1))) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-break-operand-empty-vs-num (result i32) + (i32.ctz (block (br 0))) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-break-operand-void-vs-num (result i32) + (i64.ctz (block (br 0 (nop)))) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-break-operand-num-vs-num (result i32) + (i64.ctz (block (br 0 (i64.const 9)))) + )) + "type mismatch" +) + diff --git a/js/src/jit-test/tests/wasm/spec/block.wast.js b/js/src/jit-test/tests/wasm/spec/block.wast.js new file mode 100644 index 000000000..93ad7911f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/block.wast.js @@ -0,0 +1 @@ +var importedArgs = ['block.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/br.wast b/js/src/jit-test/tests/wasm/spec/br.wast new file mode 100644 index 000000000..829ff4559 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/br.wast @@ -0,0 +1,402 @@ +;; Test `br` operator + +(module + ;; Auxiliary definition + (func $dummy) + + (func (export "type-i32") (block (drop (i32.ctz (br 0))))) + (func (export "type-i64") (block (drop (i64.ctz (br 0))))) + (func (export "type-f32") (block (drop (f32.neg (br 0))))) + (func (export "type-f64") (block (drop (f64.neg (br 0))))) + + (func (export "type-i32-value") (result i32) + (block i32 (i32.ctz (br 0 (i32.const 1)))) + ) + (func (export "type-i64-value") (result i64) + (block i64 (i64.ctz (br 0 (i64.const 2)))) + ) + (func (export "type-f32-value") (result f32) + (block f32 (f32.neg (br 0 (f32.const 3)))) + ) + (func (export "type-f64-value") (result f64) + (block f64 (f64.neg (br 0 (f64.const 4)))) + ) + + (func (export "as-block-first") + (block (br 0) (call $dummy)) + ) + (func (export "as-block-mid") + (block (call $dummy) (br 0) (call $dummy)) + ) + (func (export "as-block-last") + (block (nop) (call $dummy) (br 0)) + ) + (func (export "as-block-value") (result i32) + (block i32 (nop) (call $dummy) (br 0 (i32.const 2))) + ) + + (func (export "as-loop-first") (result i32) + (block i32 (loop i32 (br 1 (i32.const 3)) (i32.const 2))) + ) + (func (export "as-loop-mid") (result i32) + (block i32 (loop i32 (call $dummy) (br 1 (i32.const 4)) (i32.const 2))) + ) + (func (export "as-loop-last") (result i32) + (block i32 (loop i32 (nop) (call $dummy) (br 1 (i32.const 5)))) + ) + + (func (export "as-br-value") (result i32) + (block i32 (br 0 (br 0 (i32.const 9)))) + ) + + (func (export "as-br_if-cond") + (block (br_if 0 (br 0))) + ) + (func (export "as-br_if-value") (result i32) + (block i32 + (drop (br_if 0 (br 0 (i32.const 8)) (i32.const 1))) (i32.const 7) + ) + ) + (func (export "as-br_if-value-cond") (result i32) + (block i32 + (drop (br_if 0 (i32.const 6) (br 0 (i32.const 9)))) (i32.const 7) + ) + ) + + (func (export "as-br_table-index") + (block (br_table 0 0 0 (br 0))) + ) + (func (export "as-br_table-value") (result i32) + (block i32 + (br_table 0 0 0 (br 0 (i32.const 10)) (i32.const 1)) (i32.const 7) + ) + ) + (func (export "as-br_table-value-index") (result i32) + (block i32 + (br_table 0 0 (i32.const 6) (br 0 (i32.const 11))) (i32.const 7) + ) + ) + + (func (export "as-return-value") (result i64) + (block i64 (return (br 0 (i64.const 7)))) + ) + + (func (export "as-if-cond") (result i32) + (block i32 (if i32 (br 0 (i32.const 2)) (i32.const 0) (i32.const 1))) + ) + (func (export "as-if-then") (param i32 i32) (result i32) + (block i32 (if i32 (get_local 0) (br 1 (i32.const 3)) (get_local 1))) + ) + (func (export "as-if-else") (param i32 i32) (result i32) + (block i32 (if i32 (get_local 0) (get_local 1) (br 1 (i32.const 4)))) + ) + + (func (export "as-select-first") (param i32 i32) (result i32) + (block i32 (select (br 0 (i32.const 5)) (get_local 0) (get_local 1))) + ) + (func (export "as-select-second") (param i32 i32) (result i32) + (block i32 (select (get_local 0) (br 0 (i32.const 6)) (get_local 1))) + ) + (func (export "as-select-cond") (result i32) + (block i32 (select (i32.const 0) (i32.const 1) (br 0 (i32.const 7)))) + ) + + (func $f (param i32 i32 i32) (result i32) (i32.const -1)) + (func (export "as-call-first") (result i32) + (block i32 (call $f (br 0 (i32.const 12)) (i32.const 2) (i32.const 3))) + ) + (func (export "as-call-mid") (result i32) + (block i32 (call $f (i32.const 1) (br 0 (i32.const 13)) (i32.const 3))) + ) + (func (export "as-call-last") (result i32) + (block i32 (call $f (i32.const 1) (i32.const 2) (br 0 (i32.const 14)))) + ) + + (type $sig (func (param i32 i32 i32) (result i32))) + (table anyfunc (elem $f)) + (func (export "as-call_indirect-func") (result i32) + (block i32 + (call_indirect $sig + (br 0 (i32.const 20)) + (i32.const 1) (i32.const 2) (i32.const 3) + ) + ) + ) + (func (export "as-call_indirect-first") (result i32) + (block i32 + (call_indirect $sig + (i32.const 0) + (br 0 (i32.const 21)) (i32.const 2) (i32.const 3) + ) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (block i32 + (call_indirect $sig + (i32.const 0) + (i32.const 1) (br 0 (i32.const 22)) (i32.const 3) + ) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (block i32 + (call_indirect $sig + (i32.const 0) + (i32.const 1) (i32.const 2) (br 0 (i32.const 23)) + ) + ) + ) + + (func (export "as-set_local-value") (result i32) (local f32) + (block i32 (set_local 0 (br 0 (i32.const 17))) (i32.const -1)) + ) + + (memory 1) + (func (export "as-load-address") (result f32) + (block f32 (f32.load (br 0 (f32.const 1.7)))) + ) + (func (export "as-loadN-address") (result i64) + (block i64 (i64.load8_s (br 0 (i64.const 30)))) + ) + + (func (export "as-store-address") (result i32) + (block i32 (f64.store (br 0 (i32.const 30)) (f64.const 7)) (i32.const -1)) + ) + (func (export "as-store-value") (result i32) + (block i32 (i64.store (i32.const 2) (br 0 (i32.const 31))) (i32.const -1)) + ) + + (func (export "as-storeN-address") (result i32) + (block i32 (i32.store8 (br 0 (i32.const 32)) (i32.const 7)) (i32.const -1)) + ) + (func (export "as-storeN-value") (result i32) + (block i32 (i64.store16 (i32.const 2) (br 0 (i32.const 33))) (i32.const -1)) + ) + + (func (export "as-unary-operand") (result f32) + (block f32 (f32.neg (br 0 (f32.const 3.4)))) + ) + + (func (export "as-binary-left") (result i32) + (block i32 (i32.add (br 0 (i32.const 3)) (i32.const 10))) + ) + (func (export "as-binary-right") (result i64) + (block i64 (i64.sub (i64.const 10) (br 0 (i64.const 45)))) + ) + + (func (export "as-test-operand") (result i32) + (block i32 (i32.eqz (br 0 (i32.const 44)))) + ) + + (func (export "as-compare-left") (result i32) + (block i32 (f64.le (br 0 (i32.const 43)) (f64.const 10))) + ) + (func (export "as-compare-right") (result i32) + (block i32 (f32.ne (f32.const 10) (br 0 (i32.const 42)))) + ) + + (func (export "as-convert-operand") (result i32) + (block i32 (i32.wrap/i64 (br 0 (i32.const 41)))) + ) + + (func (export "as-grow_memory-size") (result i32) + (block i32 (grow_memory (br 0 (i32.const 40)))) + ) + + (func (export "nested-block-value") (result i32) + (i32.add + (i32.const 1) + (block i32 + (call $dummy) + (i32.add (i32.const 4) (br 0 (i32.const 8))) + ) + ) + ) + + (func (export "nested-br-value") (result i32) + (i32.add + (i32.const 1) + (block i32 + (drop (i32.const 2)) + (drop + (block i32 + (drop (i32.const 4)) + (br 0 (br 1 (i32.const 8))) + ) + ) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_if-value") (result i32) + (i32.add + (i32.const 1) + (block i32 + (drop (i32.const 2)) + (drop + (block i32 + (drop (i32.const 4)) + (drop (br_if 0 (br 1 (i32.const 8)) (i32.const 1))) + (i32.const 32) + ) + ) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_if-value-cond") (result i32) + (i32.add + (i32.const 1) + (block i32 + (drop (i32.const 2)) + (drop (br_if 0 (i32.const 4) (br 0 (i32.const 8)))) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_table-value") (result i32) + (i32.add + (i32.const 1) + (block i32 + (drop (i32.const 2)) + (drop + (block i32 + (drop (i32.const 4)) + (br_table 0 (br 1 (i32.const 8)) (i32.const 1)) + ) + ) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_table-value-index") (result i32) + (i32.add + (i32.const 1) + (block i32 + (drop (i32.const 2)) + (br_table 0 (i32.const 4) (br 0 (i32.const 8))) + (i32.const 16) + ) + ) + ) +) + +(assert_return (invoke "type-i32")) +(assert_return (invoke "type-i64")) +(assert_return (invoke "type-f32")) +(assert_return (invoke "type-f64")) + +(assert_return (invoke "type-i32-value") (i32.const 1)) +(assert_return (invoke "type-i64-value") (i64.const 2)) +(assert_return (invoke "type-f32-value") (f32.const 3)) +(assert_return (invoke "type-f64-value") (f64.const 4)) + +(assert_return (invoke "as-block-first")) +(assert_return (invoke "as-block-mid")) +(assert_return (invoke "as-block-last")) +(assert_return (invoke "as-block-value") (i32.const 2)) + +(assert_return (invoke "as-loop-first") (i32.const 3)) +(assert_return (invoke "as-loop-mid") (i32.const 4)) +(assert_return (invoke "as-loop-last") (i32.const 5)) + +(assert_return (invoke "as-br-value") (i32.const 9)) + +(assert_return (invoke "as-br_if-cond")) +(assert_return (invoke "as-br_if-value") (i32.const 8)) +(assert_return (invoke "as-br_if-value-cond") (i32.const 9)) + +(assert_return (invoke "as-br_table-index")) +(assert_return (invoke "as-br_table-value") (i32.const 10)) +(assert_return (invoke "as-br_table-value-index") (i32.const 11)) + +(assert_return (invoke "as-return-value") (i64.const 7)) + +(assert_return (invoke "as-if-cond") (i32.const 2)) +(assert_return (invoke "as-if-then" (i32.const 1) (i32.const 6)) (i32.const 3)) +(assert_return (invoke "as-if-then" (i32.const 0) (i32.const 6)) (i32.const 6)) +(assert_return (invoke "as-if-else" (i32.const 0) (i32.const 6)) (i32.const 4)) +(assert_return (invoke "as-if-else" (i32.const 1) (i32.const 6)) (i32.const 6)) + +(assert_return (invoke "as-select-first" (i32.const 0) (i32.const 6)) (i32.const 5)) +(assert_return (invoke "as-select-first" (i32.const 1) (i32.const 6)) (i32.const 5)) +(assert_return (invoke "as-select-second" (i32.const 0) (i32.const 6)) (i32.const 6)) +(assert_return (invoke "as-select-second" (i32.const 1) (i32.const 6)) (i32.const 6)) +(assert_return (invoke "as-select-cond") (i32.const 7)) + +(assert_return (invoke "as-call-first") (i32.const 12)) +(assert_return (invoke "as-call-mid") (i32.const 13)) +(assert_return (invoke "as-call-last") (i32.const 14)) + +(assert_return (invoke "as-call_indirect-func") (i32.const 20)) +(assert_return (invoke "as-call_indirect-first") (i32.const 21)) +(assert_return (invoke "as-call_indirect-mid") (i32.const 22)) +(assert_return (invoke "as-call_indirect-last") (i32.const 23)) + +(assert_return (invoke "as-set_local-value") (i32.const 17)) + +(assert_return (invoke "as-load-address") (f32.const 1.7)) +(assert_return (invoke "as-loadN-address") (i64.const 30)) + +(assert_return (invoke "as-store-address") (i32.const 30)) +(assert_return (invoke "as-store-value") (i32.const 31)) +(assert_return (invoke "as-storeN-address") (i32.const 32)) +(assert_return (invoke "as-storeN-value") (i32.const 33)) + +(assert_return (invoke "as-unary-operand") (f32.const 3.4)) + +(assert_return (invoke "as-binary-left") (i32.const 3)) +(assert_return (invoke "as-binary-right") (i64.const 45)) + +(assert_return (invoke "as-test-operand") (i32.const 44)) + +(assert_return (invoke "as-compare-left") (i32.const 43)) +(assert_return (invoke "as-compare-right") (i32.const 42)) + +(assert_return (invoke "as-convert-operand") (i32.const 41)) + +(assert_return (invoke "as-grow_memory-size") (i32.const 40)) + +(assert_return (invoke "nested-block-value") (i32.const 9)) +(assert_return (invoke "nested-br-value") (i32.const 9)) +(assert_return (invoke "nested-br_if-value") (i32.const 9)) +(assert_return (invoke "nested-br_if-value-cond") (i32.const 9)) +(assert_return (invoke "nested-br_table-value") (i32.const 9)) +(assert_return (invoke "nested-br_table-value-index") (i32.const 9)) + +(assert_invalid + (module (func $type-arg-empty-vs-num (result i32) + (block (br 0) (i32.const 1)) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-arg-void-vs-num (result i32) + (block (br 0 (nop)) (i32.const 1)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-arg-num-vs-num (result i32) + (block (br 0 (i64.const 1)) (i32.const 1)) + )) + "type mismatch" +) + +(assert_invalid + (module (func $unbound-label (br 1))) + "unknown label" +) +(assert_invalid + (module (func $unbound-nested-label (block (block (br 5))))) + "unknown label" +) +(assert_invalid + (module (func $large-label (br 0x10000001))) + "unknown label" +) diff --git a/js/src/jit-test/tests/wasm/spec/br.wast.js b/js/src/jit-test/tests/wasm/spec/br.wast.js new file mode 100644 index 000000000..8b9f58010 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/br.wast.js @@ -0,0 +1 @@ +var importedArgs = ['br.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/br_if.wast b/js/src/jit-test/tests/wasm/spec/br_if.wast new file mode 100644 index 000000000..e6a2c79de --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/br_if.wast @@ -0,0 +1,291 @@ +;; Test `br_if` operator + +(module + (func $dummy) + + (func (export "as-block-first") (param i32) (result i32) + (block (br_if 0 (get_local 0)) (return (i32.const 2))) (i32.const 3) + ) + (func (export "as-block-mid") (param i32) (result i32) + (block (call $dummy) (br_if 0 (get_local 0)) (return (i32.const 2))) + (i32.const 3) + ) + (func (export "as-block-last") (param i32) + (block (call $dummy) (call $dummy) (br_if 0 (get_local 0))) + ) + (func (export "as-block-first-value") (param i32) (result i32) + (block i32 (drop (br_if 0 (i32.const 10) (get_local 0))) (return (i32.const 11))) + ) + (func (export "as-block-mid-value") (param i32) (result i32) + (block i32 (call $dummy) (drop (br_if 0 (i32.const 20) (get_local 0))) (return (i32.const 21))) + ) + (func (export "as-block-last-value") (param i32) (result i32) + (block i32 + (call $dummy) (call $dummy) (br_if 0 (i32.const 11) (get_local 0)) + ) + ) + + (func (export "as-loop-first") (param i32) (result i32) + (block (loop (br_if 1 (get_local 0)) (return (i32.const 2)))) (i32.const 3) + ) + (func (export "as-loop-mid") (param i32) (result i32) + (block (loop (call $dummy) (br_if 1 (get_local 0)) (return (i32.const 2)))) + (i32.const 4) + ) + (func (export "as-loop-last") (param i32) + (loop (call $dummy) (br_if 1 (get_local 0))) + ) + + (func (export "as-if-then") (param i32 i32) + (block (if (get_local 0) (br_if 1 (get_local 1)) (call $dummy))) + ) + (func (export "as-if-else") (param i32 i32) + (block (if (get_local 0) (call $dummy) (br_if 1 (get_local 1)))) + ) + + (func (export "nested-block-value") (param i32) (result i32) + (i32.add + (i32.const 1) + (block i32 + (drop (i32.const 2)) + (i32.add + (i32.const 4) + (block i32 + (drop (br_if 1 (i32.const 8) (get_local 0))) + (i32.const 16) + ) + ) + ) + ) + ) + + (func (export "nested-br-value") (param i32) (result i32) + (i32.add + (i32.const 1) + (block i32 + (drop (i32.const 2)) + (br 0 + (block i32 (drop (br_if 1 (i32.const 8) (get_local 0))) (i32.const 4)) + ) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_if-value") (param i32) (result i32) + (i32.add + (i32.const 1) + (block i32 + (drop (i32.const 2)) + (drop (br_if 0 + (block i32 (drop (br_if 1 (i32.const 8) (get_local 0))) (i32.const 4)) + (i32.const 1) + )) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_if-value-cond") (param i32) (result i32) + (i32.add + (i32.const 1) + (block i32 + (drop (i32.const 2)) + (drop (br_if 0 + (i32.const 4) + (block i32 (drop (br_if 1 (i32.const 8) (get_local 0))) (i32.const 1)) + )) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_table-value") (param i32) (result i32) + (i32.add + (i32.const 1) + (block i32 + (drop (i32.const 2)) + (br_table 0 + (block i32 (drop (br_if 1 (i32.const 8) (get_local 0))) (i32.const 4)) + (i32.const 1) + ) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_table-value-index") (param i32) (result i32) + (i32.add + (i32.const 1) + (block i32 + (drop (i32.const 2)) + (br_table 0 + (i32.const 4) + (block i32 (drop (br_if 1 (i32.const 8) (get_local 0))) (i32.const 1)) + ) + (i32.const 16) + ) + ) + ) +) + +(assert_return (invoke "as-block-first" (i32.const 0)) (i32.const 2)) +(assert_return (invoke "as-block-first" (i32.const 1)) (i32.const 3)) +(assert_return (invoke "as-block-mid" (i32.const 0)) (i32.const 2)) +(assert_return (invoke "as-block-mid" (i32.const 1)) (i32.const 3)) +(assert_return (invoke "as-block-last" (i32.const 0))) +(assert_return (invoke "as-block-last" (i32.const 1))) +(assert_return (invoke "as-block-last-value" (i32.const 0)) (i32.const 11)) +(assert_return (invoke "as-block-last-value" (i32.const 1)) (i32.const 11)) + +(assert_return (invoke "as-loop-first" (i32.const 0)) (i32.const 2)) +(assert_return (invoke "as-loop-first" (i32.const 1)) (i32.const 3)) +(assert_return (invoke "as-loop-mid" (i32.const 0)) (i32.const 2)) +(assert_return (invoke "as-loop-mid" (i32.const 1)) (i32.const 4)) +(assert_return (invoke "as-loop-last" (i32.const 0))) +(assert_return (invoke "as-loop-last" (i32.const 1))) + +(assert_return (invoke "as-if-then" (i32.const 0) (i32.const 0))) +(assert_return (invoke "as-if-then" (i32.const 4) (i32.const 0))) +(assert_return (invoke "as-if-then" (i32.const 0) (i32.const 1))) +(assert_return (invoke "as-if-then" (i32.const 4) (i32.const 1))) +(assert_return (invoke "as-if-else" (i32.const 0) (i32.const 0))) +(assert_return (invoke "as-if-else" (i32.const 3) (i32.const 0))) +(assert_return (invoke "as-if-else" (i32.const 0) (i32.const 1))) +(assert_return (invoke "as-if-else" (i32.const 3) (i32.const 1))) + +(assert_return (invoke "nested-block-value" (i32.const 0)) (i32.const 21)) +(assert_return (invoke "nested-block-value" (i32.const 1)) (i32.const 9)) +(assert_return (invoke "nested-br-value" (i32.const 0)) (i32.const 5)) +(assert_return (invoke "nested-br-value" (i32.const 1)) (i32.const 9)) +(assert_return (invoke "nested-br_if-value" (i32.const 0)) (i32.const 5)) +(assert_return (invoke "nested-br_if-value" (i32.const 1)) (i32.const 9)) +(assert_return (invoke "nested-br_if-value-cond" (i32.const 0)) (i32.const 5)) +(assert_return (invoke "nested-br_if-value-cond" (i32.const 1)) (i32.const 9)) +(assert_return (invoke "nested-br_table-value" (i32.const 0)) (i32.const 5)) +(assert_return (invoke "nested-br_table-value" (i32.const 1)) (i32.const 9)) +(assert_return (invoke "nested-br_table-value-index" (i32.const 0)) (i32.const 5)) +(assert_return (invoke "nested-br_table-value-index" (i32.const 1)) (i32.const 9)) + +(assert_invalid + (module (func $type-false-i32 (block (i32.ctz (br_if 0 (i32.const 0)))))) + "type mismatch" +) +(assert_invalid + (module (func $type-false-i64 (block (i64.ctz (br_if 0 (i32.const 0)))))) + "type mismatch" +) +(assert_invalid + (module (func $type-false-f32 (block (f32.neg (br_if 0 (i32.const 0)))))) + "type mismatch" +) +(assert_invalid + (module (func $type-false-f64 (block (f64.neg (br_if 0 (i32.const 0)))))) + "type mismatch" +) + +(assert_invalid + (module (func $type-true-i32 (block (i32.ctz (br_if 0 (i32.const 1)))))) + "type mismatch" +) +(assert_invalid + (module (func $type-true-i64 (block (i64.ctz (br_if 0 (i64.const 1)))))) + "type mismatch" +) +(assert_invalid + (module (func $type-true-f32 (block (f32.neg (br_if 0 (f32.const 1)))))) + "type mismatch" +) +(assert_invalid + (module (func $type-true-f64 (block (f64.neg (br_if 0 (i64.const 1)))))) + "type mismatch" +) + +(assert_invalid + (module (func $type-false-arg-void-vs-num (result i32) + (block i32 (br_if 0 (i32.const 0)) (i32.const 1)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-true-arg-void-vs-num (result i32) + (block i32 (br_if 0 (i32.const 1)) (i32.const 1)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-false-arg-num-vs-void + (block (br_if 0 (i32.const 0) (i32.const 0))) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-true-arg-num-vs-void + (block (br_if 0 (i32.const 0) (i32.const 1))) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-false-arg-void-vs-num (result i32) + (block i32 (br_if 0 (nop) (i32.const 0)) (i32.const 1)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-true-arg-void-vs-num (result i32) + (block i32 (br_if 0 (nop) (i32.const 1)) (i32.const 1)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-false-arg-num-vs-num (result i32) + (block i32 (drop (br_if 0 (i64.const 1) (i32.const 0))) (i32.const 1)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-true-arg-num-vs-num (result i32) + (block i32 (drop (br_if 0 (i64.const 1) (i32.const 0))) (i32.const 1)) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-cond-void-vs-i32 + (block (br_if 0 (nop))) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-cond-num-vs-i32 + (block (br_if 0 (i64.const 0))) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-arg-cond-void-vs-i32 (result i32) + (block i32 (br_if 0 (i32.const 0) (nop)) (i32.const 1)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-arg-cond-num-vs-i32 (result i32) + (block i32 (br_if 0 (i32.const 0) (i64.const 0)) (i32.const 1)) + )) + "type mismatch" +) + +(assert_invalid + (module (func $unbound-label (br_if 1 (i32.const 1)))) + "unknown label" +) +(assert_invalid + (module (func $unbound-nested-label (block (block (br_if 5 (i32.const 1)))))) + "unknown label" +) +(assert_invalid + (module (func $large-label (br_if 0x10000001 (i32.const 1)))) + "unknown label" +) + diff --git a/js/src/jit-test/tests/wasm/spec/br_if.wast.js b/js/src/jit-test/tests/wasm/spec/br_if.wast.js new file mode 100644 index 000000000..925d28638 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/br_if.wast.js @@ -0,0 +1 @@ +var importedArgs = ['br_if.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/br_table.wast b/js/src/jit-test/tests/wasm/spec/br_table.wast new file mode 100644 index 000000000..24f6ed2eb --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/br_table.wast @@ -0,0 +1,1467 @@ +;; Test `br_table` operator + +(module + ;; Auxiliary definition + (func $dummy) + + (func (export "type-i32") + (block (drop (i32.ctz (br_table 0 0 (i32.const 0))))) + ) + (func (export "type-i64") + (block (drop (i64.ctz (br_table 0 0 (i32.const 0))))) + ) + (func (export "type-f32") + (block (drop (f32.neg (br_table 0 0 (i32.const 0))))) + ) + (func (export "type-f64") + (block (drop (f64.neg (br_table 0 0 (i32.const 0))))) + ) + + (func (export "type-i32-value") (result i32) + (block i32 (i32.ctz (br_table 0 0 (i32.const 1) (i32.const 0)))) + ) + (func (export "type-i64-value") (result i64) + (block i64 (i64.ctz (br_table 0 0 (i64.const 2) (i32.const 0)))) + ) + (func (export "type-f32-value") (result f32) + (block f32 (f32.neg (br_table 0 0 (f32.const 3) (i32.const 0)))) + ) + (func (export "type-f64-value") (result f64) + (block f64 (f64.neg (br_table 0 0 (f64.const 4) (i32.const 0)))) + ) + + (func (export "empty") (param i32) (result i32) + (block (br_table 0 (get_local 0)) (return (i32.const 21))) + (i32.const 22) + ) + (func (export "empty-value") (param i32) (result i32) + (block i32 (br_table 0 (i32.const 33) (get_local 0)) (i32.const 31)) + ) + + (func (export "singleton") (param i32) (result i32) + (block + (block + (br_table 1 0 (get_local 0)) + (return (i32.const 21)) + ) + (return (i32.const 20)) + ) + (i32.const 22) + ) + + (func (export "singleton-value") (param i32) (result i32) + (block i32 + (drop + (block i32 + (br_table 0 1 (i32.const 33) (get_local 0)) + (return (i32.const 31)) + ) + ) + (i32.const 32) + ) + ) + + (func (export "multiple") (param i32) (result i32) + (block + (block + (block + (block + (block + (br_table 3 2 1 0 4 (get_local 0)) + (return (i32.const 99)) + ) + (return (i32.const 100)) + ) + (return (i32.const 101)) + ) + (return (i32.const 102)) + ) + (return (i32.const 103)) + ) + (i32.const 104) + ) + + (func (export "multiple-value") (param i32) (result i32) + (local i32) + (set_local 1 (block i32 + (set_local 1 (block i32 + (set_local 1 (block i32 + (set_local 1 (block i32 + (set_local 1 (block i32 + (br_table 3 2 1 0 4 (i32.const 200) (get_local 0)) + (return (i32.add (get_local 1) (i32.const 99))) + )) + (return (i32.add (get_local 1) (i32.const 10))) + )) + (return (i32.add (get_local 1) (i32.const 11))) + )) + (return (i32.add (get_local 1) (i32.const 12))) + )) + (return (i32.add (get_local 1) (i32.const 13))) + )) + (i32.add (get_local 1) (i32.const 14)) + ) + + (func (export "large") (param i32) (result i32) + (block + (block + (br_table + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + (get_local 0) + ) + (return (i32.const -1)) + ) + (return (i32.const 0)) + ) + (return (i32.const 1)) + ) + + (func (export "as-block-first") + (block (br_table 0 0 0 (i32.const 0)) (call $dummy)) + ) + (func (export "as-block-mid") + (block (call $dummy) (br_table 0 0 0 (i32.const 0)) (call $dummy)) + ) + (func (export "as-block-last") + (block (nop) (call $dummy) (br_table 0 0 0 (i32.const 0))) + ) + (func (export "as-block-value") (result i32) + (block i32 (nop) (call $dummy) (br_table 0 0 0 (i32.const 2) (i32.const 0))) + ) + + (func (export "as-loop-first") (result i32) + (loop i32 (br_table 1 1 (i32.const 3) (i32.const 0)) (i32.const 1)) + ) + (func (export "as-loop-mid") (result i32) + (loop i32 + (call $dummy) + (br_table 1 1 1 (i32.const 4) (i32.const -1)) + (i32.const 2) + ) + ) + (func (export "as-loop-last") (result i32) + (loop i32 (nop) (call $dummy) (br_table 1 1 1 (i32.const 5) (i32.const 1))) + ) + + (func (export "as-br-value") (result i32) + (block i32 (br 0 (br 0 (i32.const 9)))) + ) + + (func (export "as-br_if-cond") + (block (br_if 0 (br_table 0 0 0 (i32.const 1)))) + ) + (func (export "as-br_if-value") (result i32) + (block i32 + (drop (br_if 0 (br_table 0 (i32.const 8) (i32.const 0)) (i32.const 1))) + (i32.const 7) + ) + ) + (func (export "as-br_if-value-cond") (result i32) + (block i32 + (drop (br_if 0 (i32.const 6) (br_table 0 0 (i32.const 9) (i32.const 0)))) + (i32.const 7) + ) + ) + + (func (export "as-br_table-index") + (block (br_table 0 0 0 (br_table 0 (i32.const 1)))) + ) + (func (export "as-br_table-value") (result i32) + (block i32 + (br_table 0 0 0 (br_table 0 (i32.const 10) (i32.const 0)) (i32.const 1)) + (i32.const 7) + ) + ) + (func (export "as-br_table-value-index") (result i32) + (block i32 + (br_table 0 0 (i32.const 6) (br_table 0 (i32.const 11) (i32.const 1))) + (i32.const 7) + ) + ) + + (func (export "as-return-value") (result i64) + (block i64 (return (br_table 0 (i64.const 7) (i32.const 0)))) + ) + + (func (export "as-if-cond") (result i32) + (block i32 + (if i32 + (br_table 0 (i32.const 2) (i32.const 0)) + (i32.const 0) + (i32.const 1) + ) + ) + ) + (func (export "as-if-then") (param i32 i32) (result i32) + (block i32 + (if i32 + (get_local 0) + (br_table 1 (i32.const 3) (i32.const 0)) + (get_local 1) + ) + ) + ) + (func (export "as-if-else") (param i32 i32) (result i32) + (block i32 + (if i32 + (get_local 0) + (get_local 1) + (br_table 1 0 (i32.const 4) (i32.const 0)) + ) + ) + ) + + (func (export "as-select-first") (param i32 i32) (result i32) + (block i32 + (select + (br_table 0 (i32.const 5) (i32.const 0)) (get_local 0) (get_local 1) + ) + ) + ) + (func (export "as-select-second") (param i32 i32) (result i32) + (block i32 + (select + (get_local 0) (br_table 0 (i32.const 6) (i32.const 1)) (get_local 1) + ) + ) + ) + (func (export "as-select-cond") (result i32) + (block i32 + (select + (i32.const 0) (i32.const 1) (br_table 0 (i32.const 7) (i32.const 1)) + ) + ) + ) + + (func $f (param i32 i32 i32) (result i32) (i32.const -1)) + (func (export "as-call-first") (result i32) + (block i32 + (call $f + (br_table 0 (i32.const 12) (i32.const 1)) (i32.const 2) (i32.const 3) + ) + ) + ) + (func (export "as-call-mid") (result i32) + (block i32 + (call $f + (i32.const 1) (br_table 0 (i32.const 13) (i32.const 1)) (i32.const 3) + ) + ) + ) + (func (export "as-call-last") (result i32) + (block i32 + (call $f + (i32.const 1) (i32.const 2) (br_table 0 (i32.const 14) (i32.const 1)) + ) + ) + ) + + (type $sig (func (param i32 i32 i32) (result i32))) + (table anyfunc (elem $f)) + (func (export "as-call_indirect-first") (result i32) + (block i32 + (call_indirect $sig + (br_table 0 (i32.const 20) (i32.const 1)) (i32.const 1) (i32.const 2) + (i32.const 3) + ) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (block i32 + (call_indirect $sig + (i32.const 0) (br_table 0 (i32.const 21) (i32.const 1)) (i32.const 2) + (i32.const 3) + ) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (block i32 + (call_indirect $sig + (i32.const 0) (i32.const 1) (br_table 0 (i32.const 22) (i32.const 1)) + (i32.const 3) + ) + ) + ) + (func (export "as-call_indirect-func") (result i32) + (block i32 + (call_indirect $sig + (i32.const 0) (i32.const 1) (i32.const 2) + (br_table 0 (i32.const 23) (i32.const 1)) + ) + ) + ) + + (func (export "as-set_local-value") (result i32) + (local f32) + (block i32 + (set_local 0 (br_table 0 (i32.const 17) (i32.const 1))) + (i32.const -1) + ) + ) + + (memory 1) + (func (export "as-load-address") (result f32) + (block f32 (f32.load (br_table 0 (f32.const 1.7) (i32.const 1)))) + ) + (func (export "as-loadN-address") (result i64) + (block i64 (i64.load8_s (br_table 0 (i64.const 30) (i32.const 1)))) + ) + + (func (export "as-store-address") (result i32) + (block i32 + (f64.store (br_table 0 (i32.const 30) (i32.const 1)) (f64.const 7)) + (i32.const -1) + ) + ) + (func (export "as-store-value") (result i32) + (block i32 + (i64.store (i32.const 2) (br_table 0 (i32.const 31) (i32.const 1))) + (i32.const -1) + ) + ) + + (func (export "as-storeN-address") (result i32) + (block i32 + (i32.store8 (br_table 0 (i32.const 32) (i32.const 0)) (i32.const 7)) + (i32.const -1) + ) + ) + (func (export "as-storeN-value") (result i32) + (block i32 + (i64.store16 (i32.const 2) (br_table 0 (i32.const 33) (i32.const 0))) + (i32.const -1) + ) + ) + + (func (export "as-unary-operand") (result f32) + (block f32 (f32.neg (br_table 0 (f32.const 3.4) (i32.const 0)))) + ) + + (func (export "as-binary-left") (result i32) + (block i32 + (i32.add (br_table 0 0 (i32.const 3) (i32.const 0)) (i32.const 10)) + ) + ) + (func (export "as-binary-right") (result i64) + (block i64 + (i64.sub (i64.const 10) (br_table 0 (i64.const 45) (i32.const 0))) + ) + ) + + (func (export "as-test-operand") (result i32) + (block i32 (i32.eqz (br_table 0 (i32.const 44) (i32.const 0)))) + ) + + (func (export "as-compare-left") (result i32) + (block i32 + (f64.le (br_table 0 0 (i32.const 43) (i32.const 0)) (f64.const 10)) + ) + ) + (func (export "as-compare-right") (result i32) + (block i32 + (f32.ne (f32.const 10) (br_table 0 (i32.const 42) (i32.const 0))) + ) + ) + + (func (export "as-convert-operand") (result i32) + (block i32 (i32.wrap/i64 (br_table 0 (i32.const 41) (i32.const 0)))) + ) + + (func (export "as-grow_memory-size") (result i32) + (block i32 (grow_memory (br_table 0 (i32.const 40) (i32.const 0)))) + ) + + (func (export "nested-block-value") (param i32) (result i32) + (block i32 + (drop (i32.const -1)) + (i32.add + (i32.const 1) + (block i32 + (i32.add + (i32.const 2) + (block i32 + (drop (i32.const 4)) + (i32.add + (i32.const 8) + (br_table 0 1 2 (i32.const 16) (get_local 0)) + ) + ) + ) + ) + ) + ) + ) + + (func (export "nested-br-value") (param i32) (result i32) + (block i32 + (i32.add + (i32.const 1) + (block i32 + (drop (i32.const 2)) + (drop + (block i32 + (drop (i32.const 4)) + (br 0 (br_table 2 1 0 (i32.const 8) (get_local 0))) + ) + ) + (i32.const 16) + ) + ) + ) + ) + + (func (export "nested-br_if-value") (param i32) (result i32) + (block i32 + (i32.add + (i32.const 1) + (block i32 + (drop (i32.const 2)) + (drop + (block i32 + (drop (i32.const 4)) + (drop + (br_if 0 + (br_table 0 1 2 (i32.const 8) (get_local 0)) + (i32.const 1) + ) + ) + (i32.const 32) + ) + ) + (i32.const 16) + ) + ) + ) + ) + + (func (export "nested-br_if-value-cond") (param i32) (result i32) + (block i32 + (i32.add + (i32.const 1) + (block i32 + (drop (i32.const 2)) + (drop + (br_if 0 (i32.const 4) (br_table 0 1 0 (i32.const 8) (get_local 0))) + ) + (i32.const 16) + ) + ) + ) + ) + + (func (export "nested-br_table-value") (param i32) (result i32) + (block i32 + (i32.add + (i32.const 1) + (block i32 + (drop (i32.const 2)) + (drop + (block i32 + (drop (i32.const 4)) + (br_table 0 (br_table 0 1 2 (i32.const 8) (get_local 0)) (i32.const 1)) + (i32.const 32) + ) + ) + (i32.const 16) + ) + ) + ) + ) + + (func (export "nested-br_table-value-index") (param i32) (result i32) + (block i32 + (i32.add + (i32.const 1) + (block i32 + (drop (i32.const 2)) + (br_table 0 (i32.const 4) (br_table 0 1 0 (i32.const 8) (get_local 0))) + (i32.const 16) + ) + ) + ) + ) +) + +(assert_return (invoke "type-i32")) +(assert_return (invoke "type-i64")) +(assert_return (invoke "type-f32")) +(assert_return (invoke "type-f64")) + +(assert_return (invoke "type-i32-value") (i32.const 1)) +(assert_return (invoke "type-i64-value") (i64.const 2)) +(assert_return (invoke "type-f32-value") (f32.const 3)) +(assert_return (invoke "type-f64-value") (f64.const 4)) + +(assert_return (invoke "empty" (i32.const 0)) (i32.const 22)) +(assert_return (invoke "empty" (i32.const 1)) (i32.const 22)) +(assert_return (invoke "empty" (i32.const 11)) (i32.const 22)) +(assert_return (invoke "empty" (i32.const -1)) (i32.const 22)) +(assert_return (invoke "empty" (i32.const -100)) (i32.const 22)) +(assert_return (invoke "empty" (i32.const 0xffffffff)) (i32.const 22)) + +(assert_return (invoke "empty-value" (i32.const 0)) (i32.const 33)) +(assert_return (invoke "empty-value" (i32.const 1)) (i32.const 33)) +(assert_return (invoke "empty-value" (i32.const 11)) (i32.const 33)) +(assert_return (invoke "empty-value" (i32.const -1)) (i32.const 33)) +(assert_return (invoke "empty-value" (i32.const -100)) (i32.const 33)) +(assert_return (invoke "empty-value" (i32.const 0xffffffff)) (i32.const 33)) + +(assert_return (invoke "singleton" (i32.const 0)) (i32.const 22)) +(assert_return (invoke "singleton" (i32.const 1)) (i32.const 20)) +(assert_return (invoke "singleton" (i32.const 11)) (i32.const 20)) +(assert_return (invoke "singleton" (i32.const -1)) (i32.const 20)) +(assert_return (invoke "singleton" (i32.const -100)) (i32.const 20)) +(assert_return (invoke "singleton" (i32.const 0xffffffff)) (i32.const 20)) + +(assert_return (invoke "singleton-value" (i32.const 0)) (i32.const 32)) +(assert_return (invoke "singleton-value" (i32.const 1)) (i32.const 33)) +(assert_return (invoke "singleton-value" (i32.const 11)) (i32.const 33)) +(assert_return (invoke "singleton-value" (i32.const -1)) (i32.const 33)) +(assert_return (invoke "singleton-value" (i32.const -100)) (i32.const 33)) +(assert_return (invoke "singleton-value" (i32.const 0xffffffff)) (i32.const 33)) + +(assert_return (invoke "multiple" (i32.const 0)) (i32.const 103)) +(assert_return (invoke "multiple" (i32.const 1)) (i32.const 102)) +(assert_return (invoke "multiple" (i32.const 2)) (i32.const 101)) +(assert_return (invoke "multiple" (i32.const 3)) (i32.const 100)) +(assert_return (invoke "multiple" (i32.const 4)) (i32.const 104)) +(assert_return (invoke "multiple" (i32.const 5)) (i32.const 104)) +(assert_return (invoke "multiple" (i32.const 6)) (i32.const 104)) +(assert_return (invoke "multiple" (i32.const 10)) (i32.const 104)) +(assert_return (invoke "multiple" (i32.const -1)) (i32.const 104)) +(assert_return (invoke "multiple" (i32.const 0xffffffff)) (i32.const 104)) + +(assert_return (invoke "multiple-value" (i32.const 0)) (i32.const 213)) +(assert_return (invoke "multiple-value" (i32.const 1)) (i32.const 212)) +(assert_return (invoke "multiple-value" (i32.const 2)) (i32.const 211)) +(assert_return (invoke "multiple-value" (i32.const 3)) (i32.const 210)) +(assert_return (invoke "multiple-value" (i32.const 4)) (i32.const 214)) +(assert_return (invoke "multiple-value" (i32.const 5)) (i32.const 214)) +(assert_return (invoke "multiple-value" (i32.const 6)) (i32.const 214)) +(assert_return (invoke "multiple-value" (i32.const 10)) (i32.const 214)) +(assert_return (invoke "multiple-value" (i32.const -1)) (i32.const 214)) +(assert_return (invoke "multiple-value" (i32.const 0xffffffff)) (i32.const 214)) + +(assert_return (invoke "large" (i32.const 0)) (i32.const 0)) +(assert_return (invoke "large" (i32.const 1)) (i32.const 1)) +(assert_return (invoke "large" (i32.const 100)) (i32.const 0)) +(assert_return (invoke "large" (i32.const 101)) (i32.const 1)) +(assert_return (invoke "large" (i32.const 10000)) (i32.const 0)) +(assert_return (invoke "large" (i32.const 10001)) (i32.const 1)) +(assert_return (invoke "large" (i32.const 1000000)) (i32.const 1)) +(assert_return (invoke "large" (i32.const 1000001)) (i32.const 1)) + +(assert_return (invoke "as-block-first")) +(assert_return (invoke "as-block-mid")) +(assert_return (invoke "as-block-last")) +(assert_return (invoke "as-block-value") (i32.const 2)) + +(assert_return (invoke "as-loop-first") (i32.const 3)) +(assert_return (invoke "as-loop-mid") (i32.const 4)) +(assert_return (invoke "as-loop-last") (i32.const 5)) + +(assert_return (invoke "as-br-value") (i32.const 9)) + +(assert_return (invoke "as-br_if-cond")) +(assert_return (invoke "as-br_if-value") (i32.const 8)) +(assert_return (invoke "as-br_if-value-cond") (i32.const 9)) + +(assert_return (invoke "as-br_table-index")) +(assert_return (invoke "as-br_table-value") (i32.const 10)) +(assert_return (invoke "as-br_table-value-index") (i32.const 11)) + +(assert_return (invoke "as-return-value") (i64.const 7)) + +(assert_return (invoke "as-if-cond") (i32.const 2)) +(assert_return (invoke "as-if-then" (i32.const 1) (i32.const 6)) (i32.const 3)) +(assert_return (invoke "as-if-then" (i32.const 0) (i32.const 6)) (i32.const 6)) +(assert_return (invoke "as-if-else" (i32.const 0) (i32.const 6)) (i32.const 4)) +(assert_return (invoke "as-if-else" (i32.const 1) (i32.const 6)) (i32.const 6)) + +(assert_return (invoke "as-select-first" (i32.const 0) (i32.const 6)) (i32.const 5)) +(assert_return (invoke "as-select-first" (i32.const 1) (i32.const 6)) (i32.const 5)) +(assert_return (invoke "as-select-second" (i32.const 0) (i32.const 6)) (i32.const 6)) +(assert_return (invoke "as-select-second" (i32.const 1) (i32.const 6)) (i32.const 6)) +(assert_return (invoke "as-select-cond") (i32.const 7)) + +(assert_return (invoke "as-call-first") (i32.const 12)) +(assert_return (invoke "as-call-mid") (i32.const 13)) +(assert_return (invoke "as-call-last") (i32.const 14)) + +(assert_return (invoke "as-call_indirect-first") (i32.const 20)) +(assert_return (invoke "as-call_indirect-mid") (i32.const 21)) +(assert_return (invoke "as-call_indirect-last") (i32.const 22)) +(assert_return (invoke "as-call_indirect-func") (i32.const 23)) + +(assert_return (invoke "as-set_local-value") (i32.const 17)) + +(assert_return (invoke "as-load-address") (f32.const 1.7)) +(assert_return (invoke "as-loadN-address") (i64.const 30)) + +(assert_return (invoke "as-store-address") (i32.const 30)) +(assert_return (invoke "as-store-value") (i32.const 31)) +(assert_return (invoke "as-storeN-address") (i32.const 32)) +(assert_return (invoke "as-storeN-value") (i32.const 33)) + +(assert_return (invoke "as-unary-operand") (f32.const 3.4)) + +(assert_return (invoke "as-binary-left") (i32.const 3)) +(assert_return (invoke "as-binary-right") (i64.const 45)) + +(assert_return (invoke "as-test-operand") (i32.const 44)) + +(assert_return (invoke "as-compare-left") (i32.const 43)) +(assert_return (invoke "as-compare-right") (i32.const 42)) + +(assert_return (invoke "as-convert-operand") (i32.const 41)) + +(assert_return (invoke "as-grow_memory-size") (i32.const 40)) + +(assert_return (invoke "nested-block-value" (i32.const 0)) (i32.const 19)) +(assert_return (invoke "nested-block-value" (i32.const 1)) (i32.const 17)) +(assert_return (invoke "nested-block-value" (i32.const 2)) (i32.const 16)) +(assert_return (invoke "nested-block-value" (i32.const 10)) (i32.const 16)) +(assert_return (invoke "nested-block-value" (i32.const -1)) (i32.const 16)) +(assert_return (invoke "nested-block-value" (i32.const 100000)) (i32.const 16)) + +(assert_return (invoke "nested-br-value" (i32.const 0)) (i32.const 8)) +(assert_return (invoke "nested-br-value" (i32.const 1)) (i32.const 9)) +(assert_return (invoke "nested-br-value" (i32.const 2)) (i32.const 17)) +(assert_return (invoke "nested-br-value" (i32.const 11)) (i32.const 17)) +(assert_return (invoke "nested-br-value" (i32.const -4)) (i32.const 17)) +(assert_return (invoke "nested-br-value" (i32.const 10213210)) (i32.const 17)) + +(assert_return (invoke "nested-br_if-value" (i32.const 0)) (i32.const 17)) +(assert_return (invoke "nested-br_if-value" (i32.const 1)) (i32.const 9)) +(assert_return (invoke "nested-br_if-value" (i32.const 2)) (i32.const 8)) +(assert_return (invoke "nested-br_if-value" (i32.const 9)) (i32.const 8)) +(assert_return (invoke "nested-br_if-value" (i32.const -9)) (i32.const 8)) +(assert_return (invoke "nested-br_if-value" (i32.const 999999)) (i32.const 8)) + +(assert_return (invoke "nested-br_if-value-cond" (i32.const 0)) (i32.const 9)) +(assert_return (invoke "nested-br_if-value-cond" (i32.const 1)) (i32.const 8)) +(assert_return (invoke "nested-br_if-value-cond" (i32.const 2)) (i32.const 9)) +(assert_return (invoke "nested-br_if-value-cond" (i32.const 3)) (i32.const 9)) +(assert_return (invoke "nested-br_if-value-cond" (i32.const -1000000)) (i32.const 9)) +(assert_return (invoke "nested-br_if-value-cond" (i32.const 9423975)) (i32.const 9)) + +(assert_return (invoke "nested-br_table-value" (i32.const 0)) (i32.const 17)) +(assert_return (invoke "nested-br_table-value" (i32.const 1)) (i32.const 9)) +(assert_return (invoke "nested-br_table-value" (i32.const 2)) (i32.const 8)) +(assert_return (invoke "nested-br_table-value" (i32.const 9)) (i32.const 8)) +(assert_return (invoke "nested-br_table-value" (i32.const -9)) (i32.const 8)) +(assert_return (invoke "nested-br_table-value" (i32.const 999999)) (i32.const 8)) + +(assert_return (invoke "nested-br_table-value-index" (i32.const 0)) (i32.const 9)) +(assert_return (invoke "nested-br_table-value-index" (i32.const 1)) (i32.const 8)) +(assert_return (invoke "nested-br_table-value-index" (i32.const 2)) (i32.const 9)) +(assert_return (invoke "nested-br_table-value-index" (i32.const 3)) (i32.const 9)) +(assert_return (invoke "nested-br_table-value-index" (i32.const -1000000)) (i32.const 9)) +(assert_return (invoke "nested-br_table-value-index" (i32.const 9423975)) (i32.const 9)) + +(assert_invalid + (module (func $type-arg-void-vs-num (result i32) + (block (br_table 0 (i32.const 1)) (i32.const 1)) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-arg-void-vs-num (result i32) + (block i32 (br_table 0 (nop) (i32.const 1)) (i32.const 1)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-arg-num-vs-num (result i32) + (block i32 (br_table 0 0 0 (i64.const 1) (i32.const 1)) (i32.const 1)) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-index-void-vs-i32 + (block (br_table 0 0 0 (nop))) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-index-num-vs-i32 + (block (br_table 0 (i64.const 0))) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-arg-index-void-vs-i32 (result i32) + (block i32 (br_table 0 0 (i32.const 0) (nop)) (i32.const 1)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-arg-index-num-vs-i32 (result i32) + (block i32 (br_table 0 0 (i32.const 0) (i64.const 0)) (i32.const 1)) + )) + "type mismatch" +) + +(assert_invalid + (module (func $unbound-label + (block (br_table 2 1 (i32.const 1))) + )) + "unknown label" +) +(assert_invalid + (module (func $unbound-nested-label + (block (block (br_table 0 5 (i32.const 1)))) + )) + "unknown label" +) +(assert_invalid + (module (func $large-label + (block (br_table 0 0x10000001 0 (i32.const 1))) + )) + "unknown label" +) + +(assert_invalid + (module (func $unbound-label-default + (block (br_table 1 2 (i32.const 1))) + )) + "unknown label" +) +(assert_invalid + (module (func $unbound-nested-label-default + (block (block (br_table 0 5 (i32.const 1)))) + )) + "unknown label" +) +(assert_invalid + (module (func $large-label-default + (block (br_table 0 0 0x10000001 (i32.const 1))) + )) + "unknown label" +) + diff --git a/js/src/jit-test/tests/wasm/spec/br_table.wast.js b/js/src/jit-test/tests/wasm/spec/br_table.wast.js new file mode 100644 index 000000000..0778df309 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/br_table.wast.js @@ -0,0 +1 @@ +var importedArgs = ['br_table.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/break-drop.wast b/js/src/jit-test/tests/wasm/spec/break-drop.wast new file mode 100644 index 000000000..e10df6671 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/break-drop.wast @@ -0,0 +1,9 @@ +(module + (func (export "br") (block (br 0))) + (func (export "br_if") (block (br_if 0 (i32.const 1)))) + (func (export "br_table") (block (br_table 0 (i32.const 0)))) +) + +(assert_return (invoke "br")) +(assert_return (invoke "br_if")) +(assert_return (invoke "br_table")) diff --git a/js/src/jit-test/tests/wasm/spec/break-drop.wast.js b/js/src/jit-test/tests/wasm/spec/break-drop.wast.js new file mode 100644 index 000000000..90777767f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/break-drop.wast.js @@ -0,0 +1 @@ +var importedArgs = ['break-drop.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/call.wast b/js/src/jit-test/tests/wasm/spec/call.wast new file mode 100644 index 000000000..b47eba89e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/call.wast @@ -0,0 +1,233 @@ +;; Test `call` operator + +(module + ;; Auxiliary definitions + (func $const-i32 (result i32) (i32.const 0x132)) + (func $const-i64 (result i64) (i64.const 0x164)) + (func $const-f32 (result f32) (f32.const 0xf32)) + (func $const-f64 (result f64) (f64.const 0xf64)) + + (func $id-i32 (param i32) (result i32) (get_local 0)) + (func $id-i64 (param i64) (result i64) (get_local 0)) + (func $id-f32 (param f32) (result f32) (get_local 0)) + (func $id-f64 (param f64) (result f64) (get_local 0)) + + (func $f32-i32 (param f32 i32) (result i32) (get_local 1)) + (func $i32-i64 (param i32 i64) (result i64) (get_local 1)) + (func $f64-f32 (param f64 f32) (result f32) (get_local 1)) + (func $i64-f64 (param i64 f64) (result f64) (get_local 1)) + + ;; Typing + + (func (export "type-i32") (result i32) (call $const-i32)) + (func (export "type-i64") (result i64) (call $const-i64)) + (func (export "type-f32") (result f32) (call $const-f32)) + (func (export "type-f64") (result f64) (call $const-f64)) + + (func (export "type-first-i32") (result i32) (call $id-i32 (i32.const 32))) + (func (export "type-first-i64") (result i64) (call $id-i64 (i64.const 64))) + (func (export "type-first-f32") (result f32) (call $id-f32 (f32.const 1.32))) + (func (export "type-first-f64") (result f64) (call $id-f64 (f64.const 1.64))) + + (func (export "type-second-i32") (result i32) + (call $f32-i32 (f32.const 32.1) (i32.const 32)) + ) + (func (export "type-second-i64") (result i64) + (call $i32-i64 (i32.const 32) (i64.const 64)) + ) + (func (export "type-second-f32") (result f32) + (call $f64-f32 (f64.const 64) (f32.const 32)) + ) + (func (export "type-second-f64") (result f64) + (call $i64-f64 (i64.const 64) (f64.const 64.1)) + ) + + ;; Recursion + + (func $fac (export "fac") (param i64) (result i64) + (if i64 (i64.eqz (get_local 0)) + (i64.const 1) + (i64.mul (get_local 0) (call $fac (i64.sub (get_local 0) (i64.const 1)))) + ) + ) + + (func $fac-acc (export "fac-acc") (param i64 i64) (result i64) + (if i64 (i64.eqz (get_local 0)) + (get_local 1) + (call $fac-acc + (i64.sub (get_local 0) (i64.const 1)) + (i64.mul (get_local 0) (get_local 1)) + ) + ) + ) + + (func $fib (export "fib") (param i64) (result i64) + (if i64 (i64.le_u (get_local 0) (i64.const 1)) + (i64.const 1) + (i64.add + (call $fib (i64.sub (get_local 0) (i64.const 2))) + (call $fib (i64.sub (get_local 0) (i64.const 1))) + ) + ) + ) + + (func $even (export "even") (param i64) (result i32) + (if i32 (i64.eqz (get_local 0)) + (i32.const 44) + (call $odd (i64.sub (get_local 0) (i64.const 1))) + ) + ) + (func $odd (export "odd") (param i64) (result i32) + (if i32 (i64.eqz (get_local 0)) + (i32.const 99) + (call $even (i64.sub (get_local 0) (i64.const 1))) + ) + ) + + ;; Stack exhaustion + + ;; Implementations are required to have every call consume some abstract + ;; resource towards exhausting some abstract finite limit, such that + ;; infinitely recursive test cases reliably trap in finite time. This is + ;; because otherwise applications could come to depend on it on those + ;; implementations and be incompatible with implementations that don't do + ;; it (or don't do it under the same circumstances). + + (func $runaway (export "runaway") (call $runaway)) + + (func $mutual-runaway1 (export "mutual-runaway") (call $mutual-runaway2)) + (func $mutual-runaway2 (call $mutual-runaway1)) +) + +(assert_return (invoke "type-i32") (i32.const 0x132)) +(assert_return (invoke "type-i64") (i64.const 0x164)) +(assert_return (invoke "type-f32") (f32.const 0xf32)) +(assert_return (invoke "type-f64") (f64.const 0xf64)) + +(assert_return (invoke "type-first-i32") (i32.const 32)) +(assert_return (invoke "type-first-i64") (i64.const 64)) +(assert_return (invoke "type-first-f32") (f32.const 1.32)) +(assert_return (invoke "type-first-f64") (f64.const 1.64)) + +(assert_return (invoke "type-second-i32") (i32.const 32)) +(assert_return (invoke "type-second-i64") (i64.const 64)) +(assert_return (invoke "type-second-f32") (f32.const 32)) +(assert_return (invoke "type-second-f64") (f64.const 64.1)) + +(assert_return (invoke "fac" (i64.const 0)) (i64.const 1)) +(assert_return (invoke "fac" (i64.const 1)) (i64.const 1)) +(assert_return (invoke "fac" (i64.const 5)) (i64.const 120)) +(assert_return (invoke "fac" (i64.const 25)) (i64.const 7034535277573963776)) +(assert_return (invoke "fac-acc" (i64.const 0) (i64.const 1)) (i64.const 1)) +(assert_return (invoke "fac-acc" (i64.const 1) (i64.const 1)) (i64.const 1)) +(assert_return (invoke "fac-acc" (i64.const 5) (i64.const 1)) (i64.const 120)) +(assert_return + (invoke "fac-acc" (i64.const 25) (i64.const 1)) + (i64.const 7034535277573963776) +) + +(assert_return (invoke "fib" (i64.const 0)) (i64.const 1)) +(assert_return (invoke "fib" (i64.const 1)) (i64.const 1)) +(assert_return (invoke "fib" (i64.const 2)) (i64.const 2)) +(assert_return (invoke "fib" (i64.const 5)) (i64.const 8)) +(assert_return (invoke "fib" (i64.const 20)) (i64.const 10946)) + +(assert_return (invoke "even" (i64.const 0)) (i32.const 44)) +(assert_return (invoke "even" (i64.const 1)) (i32.const 99)) +(assert_return (invoke "even" (i64.const 100)) (i32.const 44)) +(assert_return (invoke "even" (i64.const 77)) (i32.const 99)) +(assert_return (invoke "odd" (i64.const 0)) (i32.const 99)) +(assert_return (invoke "odd" (i64.const 1)) (i32.const 44)) +(assert_return (invoke "odd" (i64.const 200)) (i32.const 99)) +(assert_return (invoke "odd" (i64.const 77)) (i32.const 44)) + +(assert_trap (invoke "runaway") "call stack exhausted") +(assert_trap (invoke "mutual-runaway") "call stack exhausted") + + +;; Invalid typing + +(assert_invalid + (module + (func $type-void-vs-num (i32.eqz (call 1))) + (func) + ) + "type mismatch" +) +(assert_invalid + (module + (func $type-num-vs-num (i32.eqz (call 1))) + (func (result i64) (i64.const 1)) + ) + "type mismatch" +) + +(assert_invalid + (module + (func $arity-0-vs-1 (call 1)) + (func (param i32)) + ) + "type mismatch" +) +(assert_invalid + (module + (func $arity-0-vs-2 (call 1)) + (func (param f64 i32)) + ) + "type mismatch" +) +(assert_invalid + (module + (func $arity-1-vs-0 (call 1 (i32.const 1))) + (func) + ) + "type mismatch" +) +(assert_invalid + (module + (func $arity-2-vs-0 (call 1 (f64.const 2) (i32.const 1))) + (func) + ) + "type mismatch" +) + +(assert_invalid + (module + (func $type-first-void-vs-num (call 1 (nop) (i32.const 1))) + (func (param i32 i32)) + ) + "type mismatch" +) +(assert_invalid + (module + (func $type-second-void-vs-num (call 1 (i32.const 1) (nop))) + (func (param i32 i32)) + ) + "type mismatch" +) +(assert_invalid + (module + (func $type-first-num-vs-num (call 1 (f64.const 1) (i32.const 1))) + (func (param i32 f64)) + ) + "type mismatch" +) +(assert_invalid + (module + (func $type-second-num-vs-num (call 1 (i32.const 1) (f64.const 1))) + (func (param f64 i32)) + ) + "type mismatch" +) + + +;; Unbound function + +(assert_invalid + (module (func $unbound-func (call 1))) + "unknown function" +) +(assert_invalid + (module (func $large-func (call 1012321300))) + "unknown function" +) diff --git a/js/src/jit-test/tests/wasm/spec/call.wast.js b/js/src/jit-test/tests/wasm/spec/call.wast.js new file mode 100644 index 000000000..e777dfeac --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/call.wast.js @@ -0,0 +1 @@ +var importedArgs = ['call.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/call_indirect.wast b/js/src/jit-test/tests/wasm/spec/call_indirect.wast new file mode 100644 index 000000000..78243ce00 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/call_indirect.wast @@ -0,0 +1,362 @@ +;; Test `call_indirect` operator + +(module + ;; Auxiliary definitions + (type $proc (func)) + (type $out-i32 (func (result i32))) + (type $out-i64 (func (result i64))) + (type $out-f32 (func (result f32))) + (type $out-f64 (func (result f64))) + (type $over-i32 (func (param i32) (result i32))) + (type $over-i64 (func (param i64) (result i64))) + (type $over-f32 (func (param f32) (result f32))) + (type $over-f64 (func (param f64) (result f64))) + (type $f32-i32 (func (param f32 i32) (result i32))) + (type $i32-i64 (func (param i32 i64) (result i64))) + (type $f64-f32 (func (param f64 f32) (result f32))) + (type $i64-f64 (func (param i64 f64) (result f64))) + (type $over-i32-duplicate (func (param i32) (result i32))) + (type $over-i64-duplicate (func (param i64) (result i64))) + (type $over-f32-duplicate (func (param f32) (result f32))) + (type $over-f64-duplicate (func (param f64) (result f64))) + + (func $const-i32 (type $out-i32) (i32.const 0x132)) + (func $const-i64 (type $out-i64) (i64.const 0x164)) + (func $const-f32 (type $out-f32) (f32.const 0xf32)) + (func $const-f64 (type $out-f64) (f64.const 0xf64)) + + (func $id-i32 (type $over-i32) (get_local 0)) + (func $id-i64 (type $over-i64) (get_local 0)) + (func $id-f32 (type $over-f32) (get_local 0)) + (func $id-f64 (type $over-f64) (get_local 0)) + + (func $i32-i64 (type $i32-i64) (get_local 1)) + (func $i64-f64 (type $i64-f64) (get_local 1)) + (func $f32-i32 (type $f32-i32) (get_local 1)) + (func $f64-f32 (type $f64-f32) (get_local 1)) + + (func $over-i32-duplicate (type $over-i32-duplicate) (get_local 0)) + (func $over-i64-duplicate (type $over-i64-duplicate) (get_local 0)) + (func $over-f32-duplicate (type $over-f32-duplicate) (get_local 0)) + (func $over-f64-duplicate (type $over-f64-duplicate) (get_local 0)) + + (table anyfunc + (elem + $const-i32 $const-i64 $const-f32 $const-f64 + $id-i32 $id-i64 $id-f32 $id-f64 + $f32-i32 $i32-i64 $f64-f32 $i64-f64 + $fac $fib $even $odd + $runaway $mutual-runaway1 $mutual-runaway2 + $over-i32-duplicate $over-i64-duplicate + $over-f32-duplicate $over-f64-duplicate + ) + ) + + ;; Typing + + (func (export "type-i32") (result i32) (call_indirect $out-i32 (i32.const 0))) + (func (export "type-i64") (result i64) (call_indirect $out-i64 (i32.const 1))) + (func (export "type-f32") (result f32) (call_indirect $out-f32 (i32.const 2))) + (func (export "type-f64") (result f64) (call_indirect $out-f64 (i32.const 3))) + + (func (export "type-index") (result i64) + (call_indirect $over-i64 (i64.const 100) (i32.const 5)) + ) + + (func (export "type-first-i32") (result i32) + (call_indirect $over-i32 (i32.const 32) (i32.const 4)) + ) + (func (export "type-first-i64") (result i64) + (call_indirect $over-i64 (i64.const 64) (i32.const 5)) + ) + (func (export "type-first-f32") (result f32) + (call_indirect $over-f32 (f32.const 1.32) (i32.const 6)) + ) + (func (export "type-first-f64") (result f64) + (call_indirect $over-f64 (f64.const 1.64) (i32.const 7)) + ) + + (func (export "type-second-i32") (result i32) + (call_indirect $f32-i32 (f32.const 32.1) (i32.const 32) (i32.const 8)) + ) + (func (export "type-second-i64") (result i64) + (call_indirect $i32-i64 (i32.const 32) (i64.const 64) (i32.const 9)) + ) + (func (export "type-second-f32") (result f32) + (call_indirect $f64-f32 (f64.const 64) (f32.const 32) (i32.const 10)) + ) + (func (export "type-second-f64") (result f64) + (call_indirect $i64-f64 (i64.const 64) (f64.const 64.1) (i32.const 11)) + ) + + ;; Dispatch + + (func (export "dispatch") (param i32 i64) (result i64) + (call_indirect $over-i64 (get_local 1) (get_local 0)) + ) + + (func (export "dispatch-structural") (param i32) (result i64) + (call_indirect $over-i64-duplicate (i64.const 9) (get_local 0)) + ) + + ;; Recursion + + (func $fac (export "fac") (type $over-i64) + (if i64 (i64.eqz (get_local 0)) + (i64.const 1) + (i64.mul + (get_local 0) + (call_indirect $over-i64 + (i64.sub (get_local 0) (i64.const 1)) + (i32.const 12) + ) + ) + ) + ) + + (func $fib (export "fib") (type $over-i64) + (if i64 (i64.le_u (get_local 0) (i64.const 1)) + (i64.const 1) + (i64.add + (call_indirect $over-i64 + (i64.sub (get_local 0) (i64.const 2)) + (i32.const 13) + ) + (call_indirect $over-i64 + (i64.sub (get_local 0) (i64.const 1)) + (i32.const 13) + ) + ) + ) + ) + + (func $even (export "even") (param i32) (result i32) + (if i32 (i32.eqz (get_local 0)) + (i32.const 44) + (call_indirect $over-i32 + (i32.sub (get_local 0) (i32.const 1)) + (i32.const 15) + ) + ) + ) + (func $odd (export "odd") (param i32) (result i32) + (if i32 (i32.eqz (get_local 0)) + (i32.const 99) + (call_indirect $over-i32 + (i32.sub (get_local 0) (i32.const 1)) + (i32.const 14) + ) + ) + ) + + ;; Stack exhaustion + + ;; Implementations are required to have every call consume some abstract + ;; resource towards exhausting some abstract finite limit, such that + ;; infinitely recursive test cases reliably trap in finite time. This is + ;; because otherwise applications could come to depend on it on those + ;; implementations and be incompatible with implementations that don't do + ;; it (or don't do it under the same circumstances). + + (func $runaway (export "runaway") (call_indirect $proc (i32.const 16))) + + (func $mutual-runaway1 (export "mutual-runaway") (call_indirect $proc (i32.const 18))) + (func $mutual-runaway2 (call_indirect $proc (i32.const 17))) +) + +(assert_return (invoke "type-i32") (i32.const 0x132)) +(assert_return (invoke "type-i64") (i64.const 0x164)) +(assert_return (invoke "type-f32") (f32.const 0xf32)) +(assert_return (invoke "type-f64") (f64.const 0xf64)) + +(assert_return (invoke "type-index") (i64.const 100)) + +(assert_return (invoke "type-first-i32") (i32.const 32)) +(assert_return (invoke "type-first-i64") (i64.const 64)) +(assert_return (invoke "type-first-f32") (f32.const 1.32)) +(assert_return (invoke "type-first-f64") (f64.const 1.64)) + +(assert_return (invoke "type-second-i32") (i32.const 32)) +(assert_return (invoke "type-second-i64") (i64.const 64)) +(assert_return (invoke "type-second-f32") (f32.const 32)) +(assert_return (invoke "type-second-f64") (f64.const 64.1)) + +(assert_return (invoke "dispatch" (i32.const 5) (i64.const 2)) (i64.const 2)) +(assert_return (invoke "dispatch" (i32.const 5) (i64.const 5)) (i64.const 5)) +(assert_return (invoke "dispatch" (i32.const 12) (i64.const 5)) (i64.const 120)) +(assert_return (invoke "dispatch" (i32.const 13) (i64.const 5)) (i64.const 8)) +(assert_return (invoke "dispatch" (i32.const 20) (i64.const 2)) (i64.const 2)) +(assert_trap (invoke "dispatch" (i32.const 0) (i64.const 2)) "indirect call signature mismatch") +(assert_trap (invoke "dispatch" (i32.const 15) (i64.const 2)) "indirect call signature mismatch") +(assert_trap (invoke "dispatch" (i32.const 23) (i64.const 2)) "undefined element") +(assert_trap (invoke "dispatch" (i32.const -1) (i64.const 2)) "undefined element") +(assert_trap (invoke "dispatch" (i32.const 1213432423) (i64.const 2)) "undefined element") + +(assert_return (invoke "dispatch-structural" (i32.const 5)) (i64.const 9)) +(assert_return (invoke "dispatch-structural" (i32.const 5)) (i64.const 9)) +(assert_return (invoke "dispatch-structural" (i32.const 12)) (i64.const 362880)) +(assert_return (invoke "dispatch-structural" (i32.const 20)) (i64.const 9)) +(assert_trap (invoke "dispatch-structural" (i32.const 11)) "indirect call signature mismatch") +(assert_trap (invoke "dispatch-structural" (i32.const 22)) "indirect call signature mismatch") + +(assert_return (invoke "fac" (i64.const 0)) (i64.const 1)) +(assert_return (invoke "fac" (i64.const 1)) (i64.const 1)) +(assert_return (invoke "fac" (i64.const 5)) (i64.const 120)) +(assert_return (invoke "fac" (i64.const 25)) (i64.const 7034535277573963776)) + +(assert_return (invoke "fib" (i64.const 0)) (i64.const 1)) +(assert_return (invoke "fib" (i64.const 1)) (i64.const 1)) +(assert_return (invoke "fib" (i64.const 2)) (i64.const 2)) +(assert_return (invoke "fib" (i64.const 5)) (i64.const 8)) +(assert_return (invoke "fib" (i64.const 20)) (i64.const 10946)) + +(assert_return (invoke "even" (i32.const 0)) (i32.const 44)) +(assert_return (invoke "even" (i32.const 1)) (i32.const 99)) +(assert_return (invoke "even" (i32.const 100)) (i32.const 44)) +(assert_return (invoke "even" (i32.const 77)) (i32.const 99)) +(assert_return (invoke "odd" (i32.const 0)) (i32.const 99)) +(assert_return (invoke "odd" (i32.const 1)) (i32.const 44)) +(assert_return (invoke "odd" (i32.const 200)) (i32.const 99)) +(assert_return (invoke "odd" (i32.const 77)) (i32.const 44)) + +(assert_trap (invoke "runaway") "call stack exhausted") +(assert_trap (invoke "mutual-runaway") "call stack exhausted") + + +;; Invalid typing + +(assert_invalid + (module + (type (func)) + (func $no-table (call_indirect 0 (i32.const 0))) + ) + "unknown table" +) + +(assert_invalid + (module + (type (func)) + (table 0 anyfunc) + (func $type-void-vs-num (i32.eqz (call_indirect 0 (i32.const 0)))) + ) + "type mismatch" +) +(assert_invalid + (module + (type (func (result i64))) + (table 0 anyfunc) + (func $type-num-vs-num (i32.eqz (call_indirect 0 (i32.const 0)))) + ) + "type mismatch" +) + +(assert_invalid + (module + (type (func (param i32))) + (table 0 anyfunc) + (func $arity-0-vs-1 (call_indirect 0 (i32.const 0))) + ) + "type mismatch" +) +(assert_invalid + (module + (type (func (param f64 i32))) + (table 0 anyfunc) + (func $arity-0-vs-2 (call_indirect 0 (i32.const 0))) + ) + "type mismatch" +) +(assert_invalid + (module + (type (func)) + (table 0 anyfunc) + (func $arity-1-vs-0 (call_indirect 0 (i32.const 1) (i32.const 0))) + ) + "type mismatch" +) +(assert_invalid + (module + (type (func)) + (table 0 anyfunc) + (func $arity-2-vs-0 + (call_indirect 0 (f64.const 2) (i32.const 1) (i32.const 0)) + ) + ) + "type mismatch" +) + +(assert_invalid + (module + (type (func (param i32))) + (table 0 anyfunc) + (func $type-func-void-vs-i32 (call_indirect 0 (i32.const 1) (nop))) + ) + "type mismatch" +) +(assert_invalid + (module + (type (func (param i32))) + (table 0 anyfunc) + (func $type-func-num-vs-i32 (call_indirect 0 (i32.const 0) (i64.const 1))) + ) + "type mismatch" +) + +(assert_invalid + (module + (type (func (param i32 i32))) + (table 0 anyfunc) + (func $type-first-void-vs-num + (call_indirect 0 (nop) (i32.const 1) (i32.const 0)) + ) + ) + "type mismatch" +) +(assert_invalid + (module + (type (func (param i32 i32))) + (table 0 anyfunc) + (func $type-second-void-vs-num + (call_indirect 0 (i32.const 1) (nop) (i32.const 0)) + ) + ) + "type mismatch" +) +(assert_invalid + (module + (type (func (param i32 f64))) + (table 0 anyfunc) + (func $type-first-num-vs-num + (call_indirect 0 (f64.const 1) (i32.const 1) (i32.const 0)) + ) + ) + "type mismatch" +) +(assert_invalid + (module + (type (func (param f64 i32))) + (table 0 anyfunc) + (func $type-second-num-vs-num + (call_indirect 0 (i32.const 1) (f64.const 1) (i32.const 0)) + ) + ) + "type mismatch" +) + + +;; Unbound type + +(assert_invalid + (module + (table 0 anyfunc) + (func $unbound-type (call_indirect 1 (i32.const 0))) + ) + "unknown type" +) +(assert_invalid + (module + (table 0 anyfunc) + (func $large-type (call_indirect 1012321300 (i32.const 0))) + ) + "unknown type" +) diff --git a/js/src/jit-test/tests/wasm/spec/call_indirect.wast.js b/js/src/jit-test/tests/wasm/spec/call_indirect.wast.js new file mode 100644 index 000000000..af2cde49f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/call_indirect.wast.js @@ -0,0 +1 @@ +var importedArgs = ['call_indirect.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/comments.wast b/js/src/jit-test/tests/wasm/spec/comments.wast new file mode 100644 index 000000000..07a6298c4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/comments.wast @@ -0,0 +1,69 @@ +;; Test comment syntax + +;;comment + +;;;;;;;;;;; + + ;;comment + +( ;;comment +module;;comment +);;comment + +;;) +;;;) +;; ;) +;; (; + +(;;) + +(;comment;) + +(;;comment;) + +(;;;comment;) + +(;;;;;;;;;;;;;;) + +(;(((((((((( ;) + +(;)))))))))));) + +(;comment";) + +(;comment"";) + +(;comment""";) + +(;Heiße Würstchen;) + +(;í ½í¸ší¸Ží ½í²©;) + +(;comment +comment;) + + (;comment;) + +(;comment;)((;comment;) +(;comment;)module(;comment;) +(;comment;))(;comment;) + +(;comment(;nested;)comment;) + +(;comment +(;nested +;)comment +;) + +(module + (;comment(;nested(;further;)nested;)comment;) +) + +(;comment;;comment;) + +(;comment;;comment +;) + +(module + (;comment;;comment(;nested;)comment;) +)
\ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/comments.wast.js b/js/src/jit-test/tests/wasm/spec/comments.wast.js new file mode 100644 index 000000000..6bb2d278a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/comments.wast.js @@ -0,0 +1 @@ +var importedArgs = ['comments.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/conversions.wast b/js/src/jit-test/tests/wasm/spec/conversions.wast new file mode 100644 index 000000000..17036a75f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/conversions.wast @@ -0,0 +1,419 @@ +(module + (func (export "i64.extend_s_i32") (param $x i32) (result i64) (i64.extend_s/i32 (get_local $x))) + (func (export "i64.extend_u_i32") (param $x i32) (result i64) (i64.extend_u/i32 (get_local $x))) + (func (export "i32.wrap_i64") (param $x i64) (result i32) (i32.wrap/i64 (get_local $x))) + (func (export "i32.trunc_s_f32") (param $x f32) (result i32) (i32.trunc_s/f32 (get_local $x))) + (func (export "i32.trunc_u_f32") (param $x f32) (result i32) (i32.trunc_u/f32 (get_local $x))) + (func (export "i32.trunc_s_f64") (param $x f64) (result i32) (i32.trunc_s/f64 (get_local $x))) + (func (export "i32.trunc_u_f64") (param $x f64) (result i32) (i32.trunc_u/f64 (get_local $x))) + (func (export "i64.trunc_s_f32") (param $x f32) (result i64) (i64.trunc_s/f32 (get_local $x))) + (func (export "i64.trunc_u_f32") (param $x f32) (result i64) (i64.trunc_u/f32 (get_local $x))) + (func (export "i64.trunc_s_f64") (param $x f64) (result i64) (i64.trunc_s/f64 (get_local $x))) + (func (export "i64.trunc_u_f64") (param $x f64) (result i64) (i64.trunc_u/f64 (get_local $x))) + (func (export "f32.convert_s_i32") (param $x i32) (result f32) (f32.convert_s/i32 (get_local $x))) + (func (export "f32.convert_s_i64") (param $x i64) (result f32) (f32.convert_s/i64 (get_local $x))) + (func (export "f64.convert_s_i32") (param $x i32) (result f64) (f64.convert_s/i32 (get_local $x))) + (func (export "f64.convert_s_i64") (param $x i64) (result f64) (f64.convert_s/i64 (get_local $x))) + (func (export "f32.convert_u_i32") (param $x i32) (result f32) (f32.convert_u/i32 (get_local $x))) + (func (export "f32.convert_u_i64") (param $x i64) (result f32) (f32.convert_u/i64 (get_local $x))) + (func (export "f64.convert_u_i32") (param $x i32) (result f64) (f64.convert_u/i32 (get_local $x))) + (func (export "f64.convert_u_i64") (param $x i64) (result f64) (f64.convert_u/i64 (get_local $x))) + (func (export "f64.promote_f32") (param $x f32) (result f64) (f64.promote/f32 (get_local $x))) + (func (export "f32.demote_f64") (param $x f64) (result f32) (f32.demote/f64 (get_local $x))) + (func (export "f32.reinterpret_i32") (param $x i32) (result f32) (f32.reinterpret/i32 (get_local $x))) + (func (export "f64.reinterpret_i64") (param $x i64) (result f64) (f64.reinterpret/i64 (get_local $x))) + (func (export "i32.reinterpret_f32") (param $x f32) (result i32) (i32.reinterpret/f32 (get_local $x))) + (func (export "i64.reinterpret_f64") (param $x f64) (result i64) (i64.reinterpret/f64 (get_local $x))) +) + +(assert_return (invoke "i64.extend_s_i32" (i32.const 0)) (i64.const 0)) +(assert_return (invoke "i64.extend_s_i32" (i32.const 10000)) (i64.const 10000)) +(assert_return (invoke "i64.extend_s_i32" (i32.const -10000)) (i64.const -10000)) +(assert_return (invoke "i64.extend_s_i32" (i32.const -1)) (i64.const -1)) +(assert_return (invoke "i64.extend_s_i32" (i32.const 0x7fffffff)) (i64.const 0x000000007fffffff)) +(assert_return (invoke "i64.extend_s_i32" (i32.const 0x80000000)) (i64.const 0xffffffff80000000)) + +(assert_return (invoke "i64.extend_u_i32" (i32.const 0)) (i64.const 0)) +(assert_return (invoke "i64.extend_u_i32" (i32.const 10000)) (i64.const 10000)) +(assert_return (invoke "i64.extend_u_i32" (i32.const -10000)) (i64.const 0x00000000ffffd8f0)) +(assert_return (invoke "i64.extend_u_i32" (i32.const -1)) (i64.const 0xffffffff)) +(assert_return (invoke "i64.extend_u_i32" (i32.const 0x7fffffff)) (i64.const 0x000000007fffffff)) +(assert_return (invoke "i64.extend_u_i32" (i32.const 0x80000000)) (i64.const 0x0000000080000000)) + +(assert_return (invoke "i32.wrap_i64" (i64.const -1)) (i32.const -1)) +(assert_return (invoke "i32.wrap_i64" (i64.const -100000)) (i32.const -100000)) +(assert_return (invoke "i32.wrap_i64" (i64.const 0x80000000)) (i32.const 0x80000000)) +(assert_return (invoke "i32.wrap_i64" (i64.const 0xffffffff7fffffff)) (i32.const 0x7fffffff)) +(assert_return (invoke "i32.wrap_i64" (i64.const 0xffffffff00000000)) (i32.const 0x00000000)) +(assert_return (invoke "i32.wrap_i64" (i64.const 0xfffffffeffffffff)) (i32.const 0xffffffff)) +(assert_return (invoke "i32.wrap_i64" (i64.const 0xffffffff00000001)) (i32.const 0x00000001)) +(assert_return (invoke "i32.wrap_i64" (i64.const 0)) (i32.const 0)) +(assert_return (invoke "i32.wrap_i64" (i64.const 1311768467463790320)) (i32.const 0x9abcdef0)) +(assert_return (invoke "i32.wrap_i64" (i64.const 0x00000000ffffffff)) (i32.const 0xffffffff)) +(assert_return (invoke "i32.wrap_i64" (i64.const 0x0000000100000000)) (i32.const 0x00000000)) +(assert_return (invoke "i32.wrap_i64" (i64.const 0x0000000100000001)) (i32.const 0x00000001)) + +(assert_return (invoke "i32.trunc_s_f32" (f32.const 0.0)) (i32.const 0)) +(assert_return (invoke "i32.trunc_s_f32" (f32.const -0.0)) (i32.const 0)) +(assert_return (invoke "i32.trunc_s_f32" (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "i32.trunc_s_f32" (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "i32.trunc_s_f32" (f32.const 1.0)) (i32.const 1)) +(assert_return (invoke "i32.trunc_s_f32" (f32.const 0x1.19999ap+0)) (i32.const 1)) +(assert_return (invoke "i32.trunc_s_f32" (f32.const 1.5)) (i32.const 1)) +(assert_return (invoke "i32.trunc_s_f32" (f32.const -1.0)) (i32.const -1)) +(assert_return (invoke "i32.trunc_s_f32" (f32.const -0x1.19999ap+0)) (i32.const -1)) +(assert_return (invoke "i32.trunc_s_f32" (f32.const -1.5)) (i32.const -1)) +(assert_return (invoke "i32.trunc_s_f32" (f32.const -1.9)) (i32.const -1)) +(assert_return (invoke "i32.trunc_s_f32" (f32.const -2.0)) (i32.const -2)) +(assert_return (invoke "i32.trunc_s_f32" (f32.const 2147483520.0)) (i32.const 2147483520)) +(assert_return (invoke "i32.trunc_s_f32" (f32.const -2147483648.0)) (i32.const -2147483648)) +(assert_trap (invoke "i32.trunc_s_f32" (f32.const 2147483648.0)) "integer overflow") +(assert_trap (invoke "i32.trunc_s_f32" (f32.const -2147483904.0)) "integer overflow") +(assert_trap (invoke "i32.trunc_s_f32" (f32.const infinity)) "integer overflow") +(assert_trap (invoke "i32.trunc_s_f32" (f32.const -infinity)) "integer overflow") +(assert_trap (invoke "i32.trunc_s_f32" (f32.const nan)) "invalid conversion to integer") + +(assert_return (invoke "i32.trunc_u_f32" (f32.const 0.0)) (i32.const 0)) +(assert_return (invoke "i32.trunc_u_f32" (f32.const -0.0)) (i32.const 0)) +(assert_return (invoke "i32.trunc_u_f32" (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "i32.trunc_u_f32" (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "i32.trunc_u_f32" (f32.const 1.0)) (i32.const 1)) +(assert_return (invoke "i32.trunc_u_f32" (f32.const 0x1.19999ap+0)) (i32.const 1)) +(assert_return (invoke "i32.trunc_u_f32" (f32.const 1.5)) (i32.const 1)) +(assert_return (invoke "i32.trunc_u_f32" (f32.const 1.9)) (i32.const 1)) +(assert_return (invoke "i32.trunc_u_f32" (f32.const 2.0)) (i32.const 2)) +(assert_return (invoke "i32.trunc_u_f32" (f32.const 2147483648)) (i32.const -2147483648)) ;; 0x1.00000p+31 -> 8000 0000 +(assert_return (invoke "i32.trunc_u_f32" (f32.const 4294967040.0)) (i32.const -256)) +(assert_return (invoke "i32.trunc_u_f32" (f32.const -0x1.ccccccp-1)) (i32.const 0)) +(assert_return (invoke "i32.trunc_u_f32" (f32.const -0x1.fffffep-1)) (i32.const 0)) +(assert_trap (invoke "i32.trunc_u_f32" (f32.const 4294967296.0)) "integer overflow") +(assert_trap (invoke "i32.trunc_u_f32" (f32.const -1.0)) "integer overflow") +(assert_trap (invoke "i32.trunc_u_f32" (f32.const infinity)) "integer overflow") +(assert_trap (invoke "i32.trunc_u_f32" (f32.const -infinity)) "integer overflow") +(assert_trap (invoke "i32.trunc_u_f32" (f32.const nan)) "invalid conversion to integer") + +(assert_return (invoke "i32.trunc_s_f64" (f64.const 0.0)) (i32.const 0)) +(assert_return (invoke "i32.trunc_s_f64" (f64.const -0.0)) (i32.const 0)) +(assert_return (invoke "i32.trunc_s_f64" (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "i32.trunc_s_f64" (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "i32.trunc_s_f64" (f64.const 1.0)) (i32.const 1)) +(assert_return (invoke "i32.trunc_s_f64" (f64.const 0x1.199999999999ap+0)) (i32.const 1)) +(assert_return (invoke "i32.trunc_s_f64" (f64.const 1.5)) (i32.const 1)) +(assert_return (invoke "i32.trunc_s_f64" (f64.const -1.0)) (i32.const -1)) +(assert_return (invoke "i32.trunc_s_f64" (f64.const -0x1.199999999999ap+0)) (i32.const -1)) +(assert_return (invoke "i32.trunc_s_f64" (f64.const -1.5)) (i32.const -1)) +(assert_return (invoke "i32.trunc_s_f64" (f64.const -1.9)) (i32.const -1)) +(assert_return (invoke "i32.trunc_s_f64" (f64.const -2.0)) (i32.const -2)) +(assert_return (invoke "i32.trunc_s_f64" (f64.const 2147483647.0)) (i32.const 2147483647)) +(assert_return (invoke "i32.trunc_s_f64" (f64.const -2147483648.0)) (i32.const -2147483648)) +(assert_trap (invoke "i32.trunc_s_f64" (f64.const 2147483648.0)) "integer overflow") +(assert_trap (invoke "i32.trunc_s_f64" (f64.const -2147483649.0)) "integer overflow") +(assert_trap (invoke "i32.trunc_s_f64" (f64.const infinity)) "integer overflow") +(assert_trap (invoke "i32.trunc_s_f64" (f64.const -infinity)) "integer overflow") +(assert_trap (invoke "i32.trunc_s_f64" (f64.const nan)) "invalid conversion to integer") + +(assert_return (invoke "i32.trunc_u_f64" (f64.const 0.0)) (i32.const 0)) +(assert_return (invoke "i32.trunc_u_f64" (f64.const -0.0)) (i32.const 0)) +(assert_return (invoke "i32.trunc_u_f64" (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "i32.trunc_u_f64" (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "i32.trunc_u_f64" (f64.const 1.0)) (i32.const 1)) +(assert_return (invoke "i32.trunc_u_f64" (f64.const 0x1.199999999999ap+0)) (i32.const 1)) +(assert_return (invoke "i32.trunc_u_f64" (f64.const 1.5)) (i32.const 1)) +(assert_return (invoke "i32.trunc_u_f64" (f64.const 1.9)) (i32.const 1)) +(assert_return (invoke "i32.trunc_u_f64" (f64.const 2.0)) (i32.const 2)) +(assert_return (invoke "i32.trunc_u_f64" (f64.const 2147483648)) (i32.const -2147483648)) ;; 0x1.00000p+31 -> 8000 0000 +(assert_return (invoke "i32.trunc_u_f64" (f64.const 4294967295.0)) (i32.const -1)) +(assert_return (invoke "i32.trunc_u_f64" (f64.const -0x1.ccccccccccccdp-1)) (i32.const 0)) +(assert_return (invoke "i32.trunc_u_f64" (f64.const -0x1.fffffffffffffp-1)) (i32.const 0)) +(assert_return (invoke "i32.trunc_u_f64" (f64.const 1e8)) (i32.const 100000000)) +(assert_trap (invoke "i32.trunc_u_f64" (f64.const 4294967296.0)) "integer overflow") +(assert_trap (invoke "i32.trunc_u_f64" (f64.const -1.0)) "integer overflow") +(assert_trap (invoke "i32.trunc_u_f64" (f64.const 1e16)) "integer overflow") +(assert_trap (invoke "i32.trunc_u_f64" (f64.const 1e30)) "integer overflow") +(assert_trap (invoke "i32.trunc_u_f64" (f64.const 9223372036854775808)) "integer overflow") +(assert_trap (invoke "i32.trunc_u_f64" (f64.const infinity)) "integer overflow") +(assert_trap (invoke "i32.trunc_u_f64" (f64.const -infinity)) "integer overflow") +(assert_trap (invoke "i32.trunc_u_f64" (f64.const nan)) "invalid conversion to integer") + +(assert_return (invoke "i64.trunc_s_f32" (f32.const 0.0)) (i64.const 0)) +(assert_return (invoke "i64.trunc_s_f32" (f32.const -0.0)) (i64.const 0)) +(assert_return (invoke "i64.trunc_s_f32" (f32.const 0x1p-149)) (i64.const 0)) +(assert_return (invoke "i64.trunc_s_f32" (f32.const -0x1p-149)) (i64.const 0)) +(assert_return (invoke "i64.trunc_s_f32" (f32.const 1.0)) (i64.const 1)) +(assert_return (invoke "i64.trunc_s_f32" (f32.const 0x1.19999ap+0)) (i64.const 1)) +(assert_return (invoke "i64.trunc_s_f32" (f32.const 1.5)) (i64.const 1)) +(assert_return (invoke "i64.trunc_s_f32" (f32.const -1.0)) (i64.const -1)) +(assert_return (invoke "i64.trunc_s_f32" (f32.const -0x1.19999ap+0)) (i64.const -1)) +(assert_return (invoke "i64.trunc_s_f32" (f32.const -1.5)) (i64.const -1)) +(assert_return (invoke "i64.trunc_s_f32" (f32.const -1.9)) (i64.const -1)) +(assert_return (invoke "i64.trunc_s_f32" (f32.const -2.0)) (i64.const -2)) +(assert_return (invoke "i64.trunc_s_f32" (f32.const 4294967296)) (i64.const 4294967296)) ;; 0x1.00000p+32 -> 1 0000 0000 +(assert_return (invoke "i64.trunc_s_f32" (f32.const -4294967296)) (i64.const -4294967296)) ;; -0x1.00000p+32 -> ffff ffff 0000 0000 +(assert_return (invoke "i64.trunc_s_f32" (f32.const 9223371487098961920.0)) (i64.const 9223371487098961920)) +(assert_return (invoke "i64.trunc_s_f32" (f32.const -9223372036854775808.0)) (i64.const -9223372036854775808)) +(assert_trap (invoke "i64.trunc_s_f32" (f32.const 9223372036854775808.0)) "integer overflow") +(assert_trap (invoke "i64.trunc_s_f32" (f32.const -9223373136366403584.0)) "integer overflow") +(assert_trap (invoke "i64.trunc_s_f32" (f32.const infinity)) "integer overflow") +(assert_trap (invoke "i64.trunc_s_f32" (f32.const -infinity)) "integer overflow") +(assert_trap (invoke "i64.trunc_s_f32" (f32.const nan)) "invalid conversion to integer") + +(assert_return (invoke "i64.trunc_u_f32" (f32.const 0.0)) (i64.const 0)) +(assert_return (invoke "i64.trunc_u_f32" (f32.const -0.0)) (i64.const 0)) +(assert_return (invoke "i64.trunc_u_f32" (f32.const 0x1p-149)) (i64.const 0)) +(assert_return (invoke "i64.trunc_u_f32" (f32.const -0x1p-149)) (i64.const 0)) +(assert_return (invoke "i64.trunc_u_f32" (f32.const 1.0)) (i64.const 1)) +(assert_return (invoke "i64.trunc_u_f32" (f32.const 0x1.19999ap+0)) (i64.const 1)) +(assert_return (invoke "i64.trunc_u_f32" (f32.const 1.5)) (i64.const 1)) +(assert_return (invoke "i64.trunc_u_f32" (f32.const 4294967296)) (i64.const 4294967296)) +(assert_return (invoke "i64.trunc_u_f32" (f32.const 18446742974197923840.0)) (i64.const -1099511627776)) +(assert_return (invoke "i64.trunc_u_f32" (f32.const -0x1.ccccccp-1)) (i64.const 0)) +(assert_return (invoke "i64.trunc_u_f32" (f32.const -0x1.fffffep-1)) (i64.const 0)) +(assert_trap (invoke "i64.trunc_u_f32" (f32.const 18446744073709551616.0)) "integer overflow") +(assert_trap (invoke "i64.trunc_u_f32" (f32.const -1.0)) "integer overflow") +(assert_trap (invoke "i64.trunc_u_f32" (f32.const infinity)) "integer overflow") +(assert_trap (invoke "i64.trunc_u_f32" (f32.const -infinity)) "integer overflow") +(assert_trap (invoke "i64.trunc_u_f32" (f32.const nan)) "invalid conversion to integer") + +(assert_return (invoke "i64.trunc_s_f64" (f64.const 0.0)) (i64.const 0)) +(assert_return (invoke "i64.trunc_s_f64" (f64.const -0.0)) (i64.const 0)) +(assert_return (invoke "i64.trunc_s_f64" (f64.const 0x0.0000000000001p-1022)) (i64.const 0)) +(assert_return (invoke "i64.trunc_s_f64" (f64.const -0x0.0000000000001p-1022)) (i64.const 0)) +(assert_return (invoke "i64.trunc_s_f64" (f64.const 1.0)) (i64.const 1)) +(assert_return (invoke "i64.trunc_s_f64" (f64.const 0x1.199999999999ap+0)) (i64.const 1)) +(assert_return (invoke "i64.trunc_s_f64" (f64.const 1.5)) (i64.const 1)) +(assert_return (invoke "i64.trunc_s_f64" (f64.const -1.0)) (i64.const -1)) +(assert_return (invoke "i64.trunc_s_f64" (f64.const -0x1.199999999999ap+0)) (i64.const -1)) +(assert_return (invoke "i64.trunc_s_f64" (f64.const -1.5)) (i64.const -1)) +(assert_return (invoke "i64.trunc_s_f64" (f64.const -1.9)) (i64.const -1)) +(assert_return (invoke "i64.trunc_s_f64" (f64.const -2.0)) (i64.const -2)) +(assert_return (invoke "i64.trunc_s_f64" (f64.const 4294967296)) (i64.const 4294967296)) ;; 0x1.00000p+32 -> 1 0000 0000 +(assert_return (invoke "i64.trunc_s_f64" (f64.const -4294967296)) (i64.const -4294967296)) ;; -0x1.00000p+32 -> ffff ffff 0000 0000 +(assert_return (invoke "i64.trunc_s_f64" (f64.const 9223372036854774784.0)) (i64.const 9223372036854774784)) +(assert_return (invoke "i64.trunc_s_f64" (f64.const -9223372036854775808.0)) (i64.const -9223372036854775808)) +(assert_trap (invoke "i64.trunc_s_f64" (f64.const 9223372036854775808.0)) "integer overflow") +(assert_trap (invoke "i64.trunc_s_f64" (f64.const -9223372036854777856.0)) "integer overflow") +(assert_trap (invoke "i64.trunc_s_f64" (f64.const infinity)) "integer overflow") +(assert_trap (invoke "i64.trunc_s_f64" (f64.const -infinity)) "integer overflow") +(assert_trap (invoke "i64.trunc_s_f64" (f64.const nan)) "invalid conversion to integer") + +(assert_return (invoke "i64.trunc_u_f64" (f64.const 0.0)) (i64.const 0)) +(assert_return (invoke "i64.trunc_u_f64" (f64.const -0.0)) (i64.const 0)) +(assert_return (invoke "i64.trunc_u_f64" (f64.const 0x0.0000000000001p-1022)) (i64.const 0)) +(assert_return (invoke "i64.trunc_u_f64" (f64.const -0x0.0000000000001p-1022)) (i64.const 0)) +(assert_return (invoke "i64.trunc_u_f64" (f64.const 1.0)) (i64.const 1)) +(assert_return (invoke "i64.trunc_u_f64" (f64.const 0x1.199999999999ap+0)) (i64.const 1)) +(assert_return (invoke "i64.trunc_u_f64" (f64.const 1.5)) (i64.const 1)) +(assert_return (invoke "i64.trunc_u_f64" (f64.const 4294967295)) (i64.const 0xffffffff)) +(assert_return (invoke "i64.trunc_u_f64" (f64.const 4294967296)) (i64.const 0x100000000)) +(assert_return (invoke "i64.trunc_u_f64" (f64.const 18446744073709549568.0)) (i64.const -2048)) +(assert_return (invoke "i64.trunc_u_f64" (f64.const -0x1.ccccccccccccdp-1)) (i64.const 0)) +(assert_return (invoke "i64.trunc_u_f64" (f64.const -0x1.fffffffffffffp-1)) (i64.const 0)) +(assert_return (invoke "i64.trunc_u_f64" (f64.const 1e8)) (i64.const 100000000)) +(assert_return (invoke "i64.trunc_u_f64" (f64.const 1e16)) (i64.const 10000000000000000)) +(assert_return (invoke "i64.trunc_u_f64" (f64.const 9223372036854775808)) (i64.const -9223372036854775808)) +(assert_trap (invoke "i64.trunc_u_f64" (f64.const 18446744073709551616.0)) "integer overflow") +(assert_trap (invoke "i64.trunc_u_f64" (f64.const -1.0)) "integer overflow") +(assert_trap (invoke "i64.trunc_u_f64" (f64.const infinity)) "integer overflow") +(assert_trap (invoke "i64.trunc_u_f64" (f64.const -infinity)) "integer overflow") +(assert_trap (invoke "i64.trunc_u_f64" (f64.const nan)) "invalid conversion to integer") + +(assert_return (invoke "f32.convert_s_i32" (i32.const 1)) (f32.const 1.0)) +(assert_return (invoke "f32.convert_s_i32" (i32.const -1)) (f32.const -1.0)) +(assert_return (invoke "f32.convert_s_i32" (i32.const 0)) (f32.const 0.0)) +(assert_return (invoke "f32.convert_s_i32" (i32.const 2147483647)) (f32.const 2147483648)) +(assert_return (invoke "f32.convert_s_i32" (i32.const -2147483648)) (f32.const -2147483648)) +(assert_return (invoke "f32.convert_s_i32" (i32.const 1234567890)) (f32.const 0x1.26580cp+30)) +;; Test rounding directions. +(assert_return (invoke "f32.convert_s_i32" (i32.const 16777217)) (f32.const 16777216.0)) +(assert_return (invoke "f32.convert_s_i32" (i32.const -16777217)) (f32.const -16777216.0)) +(assert_return (invoke "f32.convert_s_i32" (i32.const 16777219)) (f32.const 16777220.0)) +(assert_return (invoke "f32.convert_s_i32" (i32.const -16777219)) (f32.const -16777220.0)) + +(assert_return (invoke "f32.convert_s_i64" (i64.const 1)) (f32.const 1.0)) +(assert_return (invoke "f32.convert_s_i64" (i64.const -1)) (f32.const -1.0)) +(assert_return (invoke "f32.convert_s_i64" (i64.const 0)) (f32.const 0.0)) +(assert_return (invoke "f32.convert_s_i64" (i64.const 9223372036854775807)) (f32.const 9223372036854775807)) +(assert_return (invoke "f32.convert_s_i64" (i64.const -9223372036854775808)) (f32.const -9223372036854775808)) +(assert_return (invoke "f32.convert_s_i64" (i64.const 314159265358979)) (f32.const 0x1.1db9e8p+48)) ;; PI +;; Test rounding directions. +(assert_return (invoke "f32.convert_s_i64" (i64.const 16777217)) (f32.const 16777216.0)) +(assert_return (invoke "f32.convert_s_i64" (i64.const -16777217)) (f32.const -16777216.0)) +(assert_return (invoke "f32.convert_s_i64" (i64.const 16777219)) (f32.const 16777220.0)) +(assert_return (invoke "f32.convert_s_i64" (i64.const -16777219)) (f32.const -16777220.0)) + +(assert_return (invoke "f64.convert_s_i32" (i32.const 1)) (f64.const 1.0)) +(assert_return (invoke "f64.convert_s_i32" (i32.const -1)) (f64.const -1.0)) +(assert_return (invoke "f64.convert_s_i32" (i32.const 0)) (f64.const 0.0)) +(assert_return (invoke "f64.convert_s_i32" (i32.const 2147483647)) (f64.const 2147483647)) +(assert_return (invoke "f64.convert_s_i32" (i32.const -2147483648)) (f64.const -2147483648)) +(assert_return (invoke "f64.convert_s_i32" (i32.const 987654321)) (f64.const 987654321)) + +(assert_return (invoke "f64.convert_s_i64" (i64.const 1)) (f64.const 1.0)) +(assert_return (invoke "f64.convert_s_i64" (i64.const -1)) (f64.const -1.0)) +(assert_return (invoke "f64.convert_s_i64" (i64.const 0)) (f64.const 0.0)) +(assert_return (invoke "f64.convert_s_i64" (i64.const 9223372036854775807)) (f64.const 9223372036854775807)) +(assert_return (invoke "f64.convert_s_i64" (i64.const -9223372036854775808)) (f64.const -9223372036854775808)) +(assert_return (invoke "f64.convert_s_i64" (i64.const 4669201609102990)) (f64.const 4669201609102990)) ;; Feigenbaum +;; Test rounding directions. +(assert_return (invoke "f64.convert_s_i64" (i64.const 9007199254740993)) (f64.const 9007199254740992)) +(assert_return (invoke "f64.convert_s_i64" (i64.const -9007199254740993)) (f64.const -9007199254740992)) +(assert_return (invoke "f64.convert_s_i64" (i64.const 9007199254740995)) (f64.const 9007199254740996)) +(assert_return (invoke "f64.convert_s_i64" (i64.const -9007199254740995)) (f64.const -9007199254740996)) + +(assert_return (invoke "f32.convert_u_i32" (i32.const 1)) (f32.const 1.0)) +(assert_return (invoke "f32.convert_u_i32" (i32.const 0)) (f32.const 0.0)) +(assert_return (invoke "f32.convert_u_i32" (i32.const 2147483647)) (f32.const 2147483648)) +(assert_return (invoke "f32.convert_u_i32" (i32.const -2147483648)) (f32.const 2147483648)) +(assert_return (invoke "f32.convert_u_i32" (i32.const 0x12345678)) (f32.const 0x1.234568p+28)) +(assert_return (invoke "f32.convert_u_i32" (i32.const 0xffffffff)) (f32.const 4294967296.0)) +;; Test rounding directions. +(assert_return (invoke "f32.convert_u_i32" (i32.const 16777217)) (f32.const 16777216.0)) +(assert_return (invoke "f32.convert_u_i32" (i32.const 16777219)) (f32.const 16777220.0)) + +(assert_return (invoke "f32.convert_u_i64" (i64.const 1)) (f32.const 1.0)) +(assert_return (invoke "f32.convert_u_i64" (i64.const 0)) (f32.const 0.0)) +(assert_return (invoke "f32.convert_u_i64" (i64.const 9223372036854775807)) (f32.const 9223372036854775807)) +(assert_return (invoke "f32.convert_u_i64" (i64.const -9223372036854775808)) (f32.const 9223372036854775808)) +(assert_return (invoke "f32.convert_u_i64" (i64.const 0xffffffffffffffff)) (f32.const 18446744073709551616.0)) +;; Test rounding directions. +(assert_return (invoke "f32.convert_u_i64" (i64.const 16777217)) (f32.const 16777216.0)) +(assert_return (invoke "f32.convert_u_i64" (i64.const 16777219)) (f32.const 16777220.0)) + +(assert_return (invoke "f64.convert_u_i32" (i32.const 1)) (f64.const 1.0)) +(assert_return (invoke "f64.convert_u_i32" (i32.const 0)) (f64.const 0.0)) +(assert_return (invoke "f64.convert_u_i32" (i32.const 2147483647)) (f64.const 2147483647)) +(assert_return (invoke "f64.convert_u_i32" (i32.const -2147483648)) (f64.const 2147483648)) +(assert_return (invoke "f64.convert_u_i32" (i32.const 0xffffffff)) (f64.const 4294967295.0)) + +(assert_return (invoke "f64.convert_u_i64" (i64.const 1)) (f64.const 1.0)) +(assert_return (invoke "f64.convert_u_i64" (i64.const 0)) (f64.const 0.0)) +(assert_return (invoke "f64.convert_u_i64" (i64.const 9223372036854775807)) (f64.const 9223372036854775807)) +(assert_return (invoke "f64.convert_u_i64" (i64.const -9223372036854775808)) (f64.const 9223372036854775808)) +(assert_return (invoke "f64.convert_u_i64" (i64.const 0xffffffffffffffff)) (f64.const 18446744073709551616.0)) +;; Test rounding directions. +(assert_return (invoke "f64.convert_u_i64" (i64.const 9007199254740993)) (f64.const 9007199254740992)) +(assert_return (invoke "f64.convert_u_i64" (i64.const 9007199254740995)) (f64.const 9007199254740996)) + +(assert_return (invoke "f64.promote_f32" (f32.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.promote_f32" (f32.const -0.0)) (f64.const -0.0)) +(assert_return (invoke "f64.promote_f32" (f32.const 0x1p-149)) (f64.const 0x1p-149)) +(assert_return (invoke "f64.promote_f32" (f32.const -0x1p-149)) (f64.const -0x1p-149)) +(assert_return (invoke "f64.promote_f32" (f32.const 1.0)) (f64.const 1.0)) +(assert_return (invoke "f64.promote_f32" (f32.const -1.0)) (f64.const -1.0)) +(assert_return (invoke "f64.promote_f32" (f32.const -0x1.fffffep+127)) (f64.const -0x1.fffffep+127)) +(assert_return (invoke "f64.promote_f32" (f32.const 0x1.fffffep+127)) (f64.const 0x1.fffffep+127)) +;; Generated randomly by picking a random int and reinterpret it to float. +(assert_return (invoke "f64.promote_f32" (f32.const 0x1p-119)) (f64.const 0x1p-119)) +;; Generated randomly by picking a random float. +(assert_return (invoke "f64.promote_f32" (f32.const 0x1.8f867ep+125)) (f64.const 6.6382536710104395e+37)) +(assert_return (invoke "f64.promote_f32" (f32.const infinity)) (f64.const infinity)) +(assert_return (invoke "f64.promote_f32" (f32.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "f64.promote_f32" (f32.const nan)) (f64.const nan)) + +(assert_return (invoke "f32.demote_f64" (f64.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.demote_f64" (f64.const -0.0)) (f32.const -0.0)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x0.0000000000001p-1022)) (f32.const 0.0)) +(assert_return (invoke "f32.demote_f64" (f64.const -0x0.0000000000001p-1022)) (f32.const -0.0)) +(assert_return (invoke "f32.demote_f64" (f64.const 1.0)) (f32.const 1.0)) +(assert_return (invoke "f32.demote_f64" (f64.const -1.0)) (f32.const -1.0)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.fffffe0000000p-127)) (f32.const 0x1p-126)) +(assert_return (invoke "f32.demote_f64" (f64.const -0x1.fffffe0000000p-127)) (f32.const -0x1p-126)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.fffffdfffffffp-127)) (f32.const 0x1.fffffcp-127)) +(assert_return (invoke "f32.demote_f64" (f64.const -0x1.fffffdfffffffp-127)) (f32.const -0x1.fffffcp-127)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "f32.demote_f64" (f64.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.fffffd0000000p+127)) (f32.const 0x1.fffffcp+127)) +(assert_return (invoke "f32.demote_f64" (f64.const -0x1.fffffd0000000p+127)) (f32.const -0x1.fffffcp+127)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.fffffd0000001p+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "f32.demote_f64" (f64.const -0x1.fffffd0000001p+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "f32.demote_f64" (f64.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.fffffefffffffp+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "f32.demote_f64" (f64.const -0x1.fffffefffffffp+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.ffffffp+127)) (f32.const infinity)) +(assert_return (invoke "f32.demote_f64" (f64.const -0x1.ffffffp+127)) (f32.const -infinity)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1p-119)) (f32.const 0x1p-119)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.8f867ep+125)) (f32.const 0x1.8f867ep+125)) +(assert_return (invoke "f32.demote_f64" (f64.const infinity)) (f32.const infinity)) +(assert_return (invoke "f32.demote_f64" (f64.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000000000001p+0)) (f32.const 1.0)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.fffffffffffffp-1)) (f32.const 1.0)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000010000000p+0)) (f32.const 0x1.000000p+0)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000010000001p+0)) (f32.const 0x1.000002p+0)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.000002fffffffp+0)) (f32.const 0x1.000002p+0)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000030000000p+0)) (f32.const 0x1.000004p+0)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000050000000p+0)) (f32.const 0x1.000004p+0)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000010000000p+24)) (f32.const 0x1.0p+24)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000010000001p+24)) (f32.const 0x1.000002p+24)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.000002fffffffp+24)) (f32.const 0x1.000002p+24)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000030000000p+24)) (f32.const 0x1.000004p+24)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.4eae4f7024c7p+108)) (f32.const 0x1.4eae5p+108)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.a12e71e358685p-113)) (f32.const 0x1.a12e72p-113)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.cb98354d521ffp-127)) (f32.const 0x1.cb9834p-127)) +(assert_return (invoke "f32.demote_f64" (f64.const -0x1.6972b30cfb562p+1)) (f32.const -0x1.6972b4p+1)) +(assert_return (invoke "f32.demote_f64" (f64.const -0x1.bedbe4819d4c4p+112)) (f32.const -0x1.bedbe4p+112)) +(assert_return (invoke "f32.demote_f64" (f64.const nan)) (f32.const nan)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1p-1022)) (f32.const 0.0)) +(assert_return (invoke "f32.demote_f64" (f64.const -0x1p-1022)) (f32.const -0.0)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.0p-150)) (f32.const 0.0)) +(assert_return (invoke "f32.demote_f64" (f64.const -0x1.0p-150)) (f32.const -0.0)) +(assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000000000001p-150)) (f32.const 0x1p-149)) +(assert_return (invoke "f32.demote_f64" (f64.const -0x1.0000000000001p-150)) (f32.const -0x1p-149)) + +(assert_return (invoke "f32.reinterpret_i32" (i32.const 0)) (f32.const 0.0)) +(assert_return (invoke "f32.reinterpret_i32" (i32.const 0x80000000)) (f32.const -0.0)) +(assert_return (invoke "f32.reinterpret_i32" (i32.const 1)) (f32.const 0x1p-149)) +(assert_return (invoke "f32.reinterpret_i32" (i32.const -1)) (f32.const -nan:0x7fffff)) +(assert_return (invoke "f32.reinterpret_i32" (i32.const 123456789)) (f32.const 0x1.b79a2ap-113)) +(assert_return (invoke "f32.reinterpret_i32" (i32.const -2147483647)) (f32.const -0x1p-149)) +(assert_return (invoke "f32.reinterpret_i32" (i32.const 0x7f800000)) (f32.const infinity)) +(assert_return (invoke "f32.reinterpret_i32" (i32.const 0xff800000)) (f32.const -infinity)) +(assert_return (invoke "f32.reinterpret_i32" (i32.const 0x7fc00000)) (f32.const nan)) +(assert_return (invoke "f32.reinterpret_i32" (i32.const 0xffc00000)) (f32.const -nan)) +(assert_return (invoke "f32.reinterpret_i32" (i32.const 0x7fa00000)) (f32.const nan:0x200000)) +(assert_return (invoke "f32.reinterpret_i32" (i32.const 0xffa00000)) (f32.const -nan:0x200000)) + +(assert_return (invoke "f64.reinterpret_i64" (i64.const 0)) (f64.const 0.0)) +(assert_return (invoke "f64.reinterpret_i64" (i64.const 1)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "f64.reinterpret_i64" (i64.const -1)) (f64.const -nan:0xfffffffffffff)) +(assert_return (invoke "f64.reinterpret_i64" (i64.const 0x8000000000000000)) (f64.const -0.0)) +(assert_return (invoke "f64.reinterpret_i64" (i64.const 1234567890)) (f64.const 0x0.00000499602d2p-1022)) +(assert_return (invoke "f64.reinterpret_i64" (i64.const -9223372036854775807)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "f64.reinterpret_i64" (i64.const 0x7ff0000000000000)) (f64.const infinity)) +(assert_return (invoke "f64.reinterpret_i64" (i64.const 0xfff0000000000000)) (f64.const -infinity)) +(assert_return (invoke "f64.reinterpret_i64" (i64.const 0x7ff8000000000000)) (f64.const nan)) +(assert_return (invoke "f64.reinterpret_i64" (i64.const 0xfff8000000000000)) (f64.const -nan)) +(assert_return (invoke "f64.reinterpret_i64" (i64.const 0x7ff4000000000000)) (f64.const nan:0x4000000000000)) +(assert_return (invoke "f64.reinterpret_i64" (i64.const 0xfff4000000000000)) (f64.const -nan:0x4000000000000)) + +(assert_return (invoke "i32.reinterpret_f32" (f32.const 0.0)) (i32.const 0)) +(assert_return (invoke "i32.reinterpret_f32" (f32.const -0.0)) (i32.const 0x80000000)) +(assert_return (invoke "i32.reinterpret_f32" (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "i32.reinterpret_f32" (f32.const -nan:0x7fffff)) (i32.const -1)) +(assert_return (invoke "i32.reinterpret_f32" (f32.const -0x1p-149)) (i32.const 0x80000001)) +(assert_return (invoke "i32.reinterpret_f32" (f32.const 1.0)) (i32.const 1065353216)) +(assert_return (invoke "i32.reinterpret_f32" (f32.const 3.1415926)) (i32.const 1078530010)) +(assert_return (invoke "i32.reinterpret_f32" (f32.const 0x1.fffffep+127)) (i32.const 2139095039)) +(assert_return (invoke "i32.reinterpret_f32" (f32.const -0x1.fffffep+127)) (i32.const -8388609)) +(assert_return (invoke "i32.reinterpret_f32" (f32.const infinity)) (i32.const 0x7f800000)) +(assert_return (invoke "i32.reinterpret_f32" (f32.const -infinity)) (i32.const 0xff800000)) +(assert_return (invoke "i32.reinterpret_f32" (f32.const nan)) (i32.const 0x7fc00000)) +(assert_return (invoke "i32.reinterpret_f32" (f32.const -nan)) (i32.const 0xffc00000)) +(assert_return (invoke "i32.reinterpret_f32" (f32.const nan:0x200000)) (i32.const 0x7fa00000)) +(assert_return (invoke "i32.reinterpret_f32" (f32.const -nan:0x200000)) (i32.const 0xffa00000)) + +(assert_return (invoke "i64.reinterpret_f64" (f64.const 0.0)) (i64.const 0)) +(assert_return (invoke "i64.reinterpret_f64" (f64.const -0.0)) (i64.const 0x8000000000000000)) +(assert_return (invoke "i64.reinterpret_f64" (f64.const 0x0.0000000000001p-1022)) (i64.const 1)) +(assert_return (invoke "i64.reinterpret_f64" (f64.const -nan:0xfffffffffffff)) (i64.const -1)) +(assert_return (invoke "i64.reinterpret_f64" (f64.const -0x0.0000000000001p-1022)) (i64.const 0x8000000000000001)) +(assert_return (invoke "i64.reinterpret_f64" (f64.const 1.0)) (i64.const 4607182418800017408)) +(assert_return (invoke "i64.reinterpret_f64" (f64.const 3.14159265358979)) (i64.const 4614256656552045841)) +(assert_return (invoke "i64.reinterpret_f64" (f64.const 0x1.fffffffffffffp+1023)) (i64.const 9218868437227405311)) +(assert_return (invoke "i64.reinterpret_f64" (f64.const -0x1.fffffffffffffp+1023)) (i64.const -4503599627370497)) +(assert_return (invoke "i64.reinterpret_f64" (f64.const infinity)) (i64.const 0x7ff0000000000000)) +(assert_return (invoke "i64.reinterpret_f64" (f64.const -infinity)) (i64.const 0xfff0000000000000)) +(assert_return (invoke "i64.reinterpret_f64" (f64.const nan)) (i64.const 0x7ff8000000000000)) +(assert_return (invoke "i64.reinterpret_f64" (f64.const -nan)) (i64.const 0xfff8000000000000)) +(assert_return (invoke "i64.reinterpret_f64" (f64.const nan:0x4000000000000)) (i64.const 0x7ff4000000000000)) +(assert_return (invoke "i64.reinterpret_f64" (f64.const -nan:0x4000000000000)) (i64.const 0xfff4000000000000)) diff --git a/js/src/jit-test/tests/wasm/spec/conversions.wast.js b/js/src/jit-test/tests/wasm/spec/conversions.wast.js new file mode 100644 index 000000000..5e8ee1335 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/conversions.wast.js @@ -0,0 +1 @@ +var importedArgs = ['conversions.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/directives.txt b/js/src/jit-test/tests/wasm/spec/directives.txt new file mode 100644 index 000000000..057bdf4c2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also-wasm-baseline diff --git a/js/src/jit-test/tests/wasm/spec/endianness.wast b/js/src/jit-test/tests/wasm/spec/endianness.wast new file mode 100644 index 000000000..8dc0c2e2e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/endianness.wast @@ -0,0 +1,217 @@ +(module + (memory 1) + + ;; Stores an i16 value in little-endian-format + (func $i16_store_little (param $address i32) (param $value i32) + (i32.store8 (get_local $address) (get_local $value)) + (i32.store8 (i32.add (get_local $address) (i32.const 1)) (i32.shr_u (get_local $value) (i32.const 8))) + ) + + ;; Stores an i32 value in little-endian format + (func $i32_store_little (param $address i32) (param $value i32) + (call $i16_store_little (get_local $address) (get_local $value)) + (call $i16_store_little (i32.add (get_local $address) (i32.const 2)) (i32.shr_u (get_local $value) (i32.const 16))) + ) + + ;; Stores an i64 value in little-endian format + (func $i64_store_little (param $address i32) (param $value i64) + (call $i32_store_little (get_local $address) (i32.wrap/i64 (get_local $value))) + (call $i32_store_little (i32.add (get_local $address) (i32.const 4)) (i32.wrap/i64 (i64.shr_u (get_local $value) (i64.const 32)))) + ) + + ;; Loads an i16 value in little-endian format + (func $i16_load_little (param $address i32) (result i32) + (i32.or + (i32.load8_u (get_local $address)) + (i32.shl (i32.load8_u (i32.add (get_local $address) (i32.const 1))) (i32.const 8)) + ) + ) + + ;; Loads an i32 value in little-endian format + (func $i32_load_little (param $address i32) (result i32) + (i32.or + (call $i16_load_little (get_local $address)) + (i32.shl (call $i16_load_little (i32.add (get_local $address) (i32.const 2))) (i32.const 16)) + ) + ) + + ;; Loads an i64 value in little-endian format + (func $i64_load_little (param $address i32) (result i64) + (i64.or + (i64.extend_u/i32 (call $i32_load_little (get_local $address))) + (i64.shl (i64.extend_u/i32 (call $i32_load_little (i32.add (get_local $address) (i32.const 4)))) (i64.const 32)) + ) + ) + + (func (export "i32_load16_s") (param $value i32) (result i32) + (call $i16_store_little (i32.const 0) (get_local $value)) + (i32.load16_s (i32.const 0)) + ) + + (func (export "i32_load16_u") (param $value i32) (result i32) + (call $i16_store_little (i32.const 0) (get_local $value)) + (i32.load16_u (i32.const 0)) + ) + + (func (export "i32_load") (param $value i32) (result i32) + (call $i32_store_little (i32.const 0) (get_local $value)) + (i32.load (i32.const 0)) + ) + + (func (export "i64_load16_s") (param $value i64) (result i64) + (call $i16_store_little (i32.const 0) (i32.wrap/i64 (get_local $value))) + (i64.load16_s (i32.const 0)) + ) + + (func (export "i64_load16_u") (param $value i64) (result i64) + (call $i16_store_little (i32.const 0) (i32.wrap/i64 (get_local $value))) + (i64.load16_u (i32.const 0)) + ) + + (func (export "i64_load32_s") (param $value i64) (result i64) + (call $i32_store_little (i32.const 0) (i32.wrap/i64 (get_local $value))) + (i64.load32_s (i32.const 0)) + ) + + (func (export "i64_load32_u") (param $value i64) (result i64) + (call $i32_store_little (i32.const 0) (i32.wrap/i64 (get_local $value))) + (i64.load32_u (i32.const 0)) + ) + + (func (export "i64_load") (param $value i64) (result i64) + (call $i64_store_little (i32.const 0) (get_local $value)) + (i64.load (i32.const 0)) + ) + + (func (export "f32_load") (param $value f32) (result f32) + (call $i32_store_little (i32.const 0) (i32.reinterpret/f32 (get_local $value))) + (f32.load (i32.const 0)) + ) + + (func (export "f64_load") (param $value f64) (result f64) + (call $i64_store_little (i32.const 0) (i64.reinterpret/f64 (get_local $value))) + (f64.load (i32.const 0)) + ) + + + (func (export "i32_store16") (param $value i32) (result i32) + (i32.store16 (i32.const 0) (get_local $value)) + (call $i16_load_little (i32.const 0)) + ) + + (func (export "i32_store") (param $value i32) (result i32) + (i32.store (i32.const 0) (get_local $value)) + (call $i32_load_little (i32.const 0)) + ) + + (func (export "i64_store16") (param $value i64) (result i64) + (i64.store16 (i32.const 0) (get_local $value)) + (i64.extend_u/i32 (call $i16_load_little (i32.const 0))) + ) + + (func (export "i64_store32") (param $value i64) (result i64) + (i64.store32 (i32.const 0) (get_local $value)) + (i64.extend_u/i32 (call $i32_load_little (i32.const 0))) + ) + + (func (export "i64_store") (param $value i64) (result i64) + (i64.store (i32.const 0) (get_local $value)) + (call $i64_load_little (i32.const 0)) + ) + + (func (export "f32_store") (param $value f32) (result f32) + (f32.store (i32.const 0) (get_local $value)) + (f32.reinterpret/i32 (call $i32_load_little (i32.const 0))) + ) + + (func (export "f64_store") (param $value f64) (result f64) + (f64.store (i32.const 0) (get_local $value)) + (f64.reinterpret/i64 (call $i64_load_little (i32.const 0))) + ) +) + +(assert_return (invoke "i32_load16_s" (i32.const -1)) (i32.const -1)) +(assert_return (invoke "i32_load16_s" (i32.const -4242)) (i32.const -4242)) +(assert_return (invoke "i32_load16_s" (i32.const 42)) (i32.const 42)) +(assert_return (invoke "i32_load16_s" (i32.const 0x3210)) (i32.const 0x3210)) + +(assert_return (invoke "i32_load16_u" (i32.const -1)) (i32.const 0xFFFF)) +(assert_return (invoke "i32_load16_u" (i32.const -4242)) (i32.const 61294)) +(assert_return (invoke "i32_load16_u" (i32.const 42)) (i32.const 42)) +(assert_return (invoke "i32_load16_u" (i32.const 0xCAFE)) (i32.const 0xCAFE)) + +(assert_return (invoke "i32_load" (i32.const -1)) (i32.const -1)) +(assert_return (invoke "i32_load" (i32.const -42424242)) (i32.const -42424242)) +(assert_return (invoke "i32_load" (i32.const 42424242)) (i32.const 42424242)) +(assert_return (invoke "i32_load" (i32.const 0xABAD1DEA)) (i32.const 0xABAD1DEA)) + +(assert_return (invoke "i64_load16_s" (i64.const -1)) (i64.const -1)) +(assert_return (invoke "i64_load16_s" (i64.const -4242)) (i64.const -4242)) +(assert_return (invoke "i64_load16_s" (i64.const 42)) (i64.const 42)) +(assert_return (invoke "i64_load16_s" (i64.const 0x3210)) (i64.const 0x3210)) + +(assert_return (invoke "i64_load16_u" (i64.const -1)) (i64.const 0xFFFF)) +(assert_return (invoke "i64_load16_u" (i64.const -4242)) (i64.const 61294)) +(assert_return (invoke "i64_load16_u" (i64.const 42)) (i64.const 42)) +(assert_return (invoke "i64_load16_u" (i64.const 0xCAFE)) (i64.const 0xCAFE)) + +(assert_return (invoke "i64_load32_s" (i64.const -1)) (i64.const -1)) +(assert_return (invoke "i64_load32_s" (i64.const -42424242)) (i64.const -42424242)) +(assert_return (invoke "i64_load32_s" (i64.const 42424242)) (i64.const 42424242)) +(assert_return (invoke "i64_load32_s" (i64.const 0x12345678)) (i64.const 0x12345678)) + +(assert_return (invoke "i64_load32_u" (i64.const -1)) (i64.const 0xFFFFFFFF)) +(assert_return (invoke "i64_load32_u" (i64.const -42424242)) (i64.const 4252543054)) +(assert_return (invoke "i64_load32_u" (i64.const 42424242)) (i64.const 42424242)) +(assert_return (invoke "i64_load32_u" (i64.const 0xABAD1DEA)) (i64.const 0xABAD1DEA)) + +(assert_return (invoke "i64_load" (i64.const -1)) (i64.const -1)) +(assert_return (invoke "i64_load" (i64.const -42424242)) (i64.const -42424242)) +(assert_return (invoke "i64_load" (i64.const 0xABAD1DEA)) (i64.const 0xABAD1DEA)) +(assert_return (invoke "i64_load" (i64.const 0xABADCAFEDEAD1DEA)) (i64.const 0xABADCAFEDEAD1DEA)) + +(assert_return (invoke "f32_load" (f32.const -1)) (f32.const -1)) +(assert_return (invoke "f32_load" (f32.const 1234e-5)) (f32.const 1234e-5)) +(assert_return (invoke "f32_load" (f32.const 4242.4242)) (f32.const 4242.4242)) +(assert_return (invoke "f32_load" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) + +(assert_return (invoke "f64_load" (f64.const -1)) (f64.const -1)) +(assert_return (invoke "f64_load" (f64.const 123456789e-5)) (f64.const 123456789e-5)) +(assert_return (invoke "f64_load" (f64.const 424242.424242)) (f64.const 424242.424242)) +(assert_return (invoke "f64_load" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) + + +(assert_return (invoke "i32_store16" (i32.const -1)) (i32.const 0xFFFF)) +(assert_return (invoke "i32_store16" (i32.const -4242)) (i32.const 61294)) +(assert_return (invoke "i32_store16" (i32.const 42)) (i32.const 42)) +(assert_return (invoke "i32_store16" (i32.const 0xCAFE)) (i32.const 0xCAFE)) + +(assert_return (invoke "i32_store" (i32.const -1)) (i32.const -1)) +(assert_return (invoke "i32_store" (i32.const -4242)) (i32.const -4242)) +(assert_return (invoke "i32_store" (i32.const 42424242)) (i32.const 42424242)) +(assert_return (invoke "i32_store" (i32.const 0xDEADCAFE)) (i32.const 0xDEADCAFE)) + +(assert_return (invoke "i64_store16" (i64.const -1)) (i64.const 0xFFFF)) +(assert_return (invoke "i64_store16" (i64.const -4242)) (i64.const 61294)) +(assert_return (invoke "i64_store16" (i64.const 42)) (i64.const 42)) +(assert_return (invoke "i64_store16" (i64.const 0xCAFE)) (i64.const 0xCAFE)) + +(assert_return (invoke "i64_store32" (i64.const -1)) (i64.const 0xFFFFFFFF)) +(assert_return (invoke "i64_store32" (i64.const -4242)) (i64.const 4294963054)) +(assert_return (invoke "i64_store32" (i64.const 42424242)) (i64.const 42424242)) +(assert_return (invoke "i64_store32" (i64.const 0xDEADCAFE)) (i64.const 0xDEADCAFE)) + +(assert_return (invoke "i64_store" (i64.const -1)) (i64.const -1)) +(assert_return (invoke "i64_store" (i64.const -42424242)) (i64.const -42424242)) +(assert_return (invoke "i64_store" (i64.const 0xABAD1DEA)) (i64.const 0xABAD1DEA)) +(assert_return (invoke "i64_store" (i64.const 0xABADCAFEDEAD1DEA)) (i64.const 0xABADCAFEDEAD1DEA)) + +(assert_return (invoke "f32_store" (f32.const -1)) (f32.const -1)) +(assert_return (invoke "f32_store" (f32.const 1234e-5)) (f32.const 1234e-5)) +(assert_return (invoke "f32_store" (f32.const 4242.4242)) (f32.const 4242.4242)) +(assert_return (invoke "f32_store" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) + +(assert_return (invoke "f64_store" (f64.const -1)) (f64.const -1)) +(assert_return (invoke "f64_store" (f64.const 123456789e-5)) (f64.const 123456789e-5)) +(assert_return (invoke "f64_store" (f64.const 424242.424242)) (f64.const 424242.424242)) +(assert_return (invoke "f64_store" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) diff --git a/js/src/jit-test/tests/wasm/spec/endianness.wast.js b/js/src/jit-test/tests/wasm/spec/endianness.wast.js new file mode 100644 index 000000000..a4aa5191b --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/endianness.wast.js @@ -0,0 +1 @@ +var importedArgs = ['endianness.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/exports.wast b/js/src/jit-test/tests/wasm/spec/exports.wast new file mode 100644 index 000000000..e3a0052a6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/exports.wast @@ -0,0 +1,196 @@ +;; Functions + +(module (func) (export "a" (func 0))) +(module (func) (export "a" (func 0)) (export "b" (func 0))) +(module (func) (func) (export "a" (func 0)) (export "b" (func 1))) + +(module (func (export "a"))) +(module (func) (export "a" (func 0))) +(module (func $a (export "a"))) +(module (func $a) (export "a" (func $a))) +(module (export "a" (func 0)) (func)) +(module (export "a" (func $a)) (func $a)) + +(module $Func + (export "e" (func $f)) + (func $f (param $n i32) (result i32) + (return (i32.add (get_local $n) (i32.const 1))) + ) +) +(assert_return (invoke "e" (i32.const 42)) (i32.const 43)) +(assert_return (invoke $Func "e" (i32.const 42)) (i32.const 43)) +(module) +(module $Other1) +(assert_return (invoke $Func "e" (i32.const 42)) (i32.const 43)) + +(assert_invalid + (module (func) (export "a" (func 1))) + "unknown function" +) +(assert_invalid + (module (func) (export "a" (func 0)) (export "a" (func 0))) + "duplicate export name" +) +(assert_invalid + (module (func) (func) (export "a" (func 0)) (export "a" (func 1))) + "duplicate export name" +) +(assert_invalid + (module (func) (global i32 (i32.const 0)) (export "a" (func 0)) (export "a" (global 0))) + "duplicate export name" +) +(assert_invalid + (module (func) (table 0 anyfunc) (export "a" (func 0)) (export "a" (table 0))) + "duplicate export name" +) +(assert_invalid + (module (func) (memory 0) (export "a" (func 0)) (export "a" (memory 0))) + "duplicate export name" +) + + +;; Globals + +(module (global i32 (i32.const 0)) (export "a" (global 0))) +(module (global i32 (i32.const 0)) (export "a" (global 0)) (export "b" (global 0))) +(module (global i32 (i32.const 0)) (global i32 (i32.const 0)) (export "a" (global 0)) (export "b" (global 1))) + +(module (global (export "a") i32 (i32.const 0))) +(module (global i32 (i32.const 0)) (export "a" (global 0))) +(module (global $a (export "a") i32 (i32.const 0))) +(module (global $a i32 (i32.const 0)) (export "a" (global $a))) +(module (export "a" (global 0)) (global i32 (i32.const 0))) +(module (export "a" (global $a)) (global $a i32 (i32.const 0))) + +(module $Global + (export "e" (global $g)) + (global $g i32 (i32.const 42)) +) +(assert_return (get "e") (i32.const 42)) +(assert_return (get $Global "e") (i32.const 42)) +(module) +(module $Other2) +(assert_return (get $Global "e") (i32.const 42)) + +(assert_invalid + (module (global i32 (i32.const 0)) (export "a" (global 1))) + "unknown global" +) +(assert_invalid + (module (global i32 (i32.const 0)) (export "a" (global 0)) (export "a" (global 0))) + "duplicate export name" +) +(assert_invalid + (module (global i32 (i32.const 0)) (global i32 (i32.const 0)) (export "a" (global 0)) (export "a" (global 1))) + "duplicate export name" +) +(assert_invalid + (module (global i32 (i32.const 0)) (func) (export "a" (global 0)) (export "a" (func 0))) + "duplicate export name" +) +(assert_invalid + (module (global i32 (i32.const 0)) (table 0 anyfunc) (export "a" (global 0)) (export "a" (table 0))) + "duplicate export name" +) +(assert_invalid + (module (global i32 (i32.const 0)) (memory 0) (export "a" (global 0)) (export "a" (memory 0))) + "duplicate export name" +) + + +;; Tables + +(module (table 0 anyfunc) (export "a" (table 0))) +(module (table 0 anyfunc) (export "a" (table 0)) (export "b" (table 0))) +;; No multiple tables yet. +;; (module (table 0 anyfunc) (table 0 anyfunc) (export "a" (table 0)) (export "b" (table 1))) + +(module (table (export "a") 0 anyfunc)) +(module (table (export "a") 0 1 anyfunc)) +(module (table 0 anyfunc) (export "a" (table 0))) +(module (table 0 1 anyfunc) (export "a" (table 0))) +(module (table $a (export "a") 0 anyfunc)) +(module (table $a (export "a") 0 1 anyfunc)) +(module (table $a 0 anyfunc) (export "a" (table $a))) +(module (table $a 0 1 anyfunc) (export "a" (table $a))) +(module (export "a" (table 0)) (table 0 anyfunc)) +(module (export "a" (table 0)) (table 0 1 anyfunc)) +(module (export "a" (table $a)) (table $a 0 anyfunc)) +(module (export "a" (table $a)) (table $a 0 1 anyfunc)) + +(; TODO: access table ;) + +(assert_invalid + (module (table 0 anyfunc) (export "a" (table 1))) + "unknown table" +) +(assert_invalid + (module (table 0 anyfunc) (export "a" (table 0)) (export "a" (table 0))) + "duplicate export name" +) +;; No multiple tables yet. +;; (assert_invalid +;; (module (table 0 anyfunc) (table 0 anyfunc) (export "a" (table 0)) (export "a" (table 1))) +;; "duplicate export name" +;; ) +(assert_invalid + (module (table 0 anyfunc) (func) (export "a" (table 0)) (export "a" (func 0))) + "duplicate export name" +) +(assert_invalid + (module (table 0 anyfunc) (global i32 (i32.const 0)) (export "a" (table 0)) (export "a" (global 0))) + "duplicate export name" +) +(assert_invalid + (module (table 0 anyfunc) (memory 0) (export "a" (table 0)) (export "a" (memory 0))) + "duplicate export name" +) + + +;; Memories + +(module (memory 0) (export "a" (memory 0))) +(module (memory 0) (export "a" (memory 0)) (export "b" (memory 0))) +;; No multiple memories yet. +;; (module (memory 0) (memory 0) (export "a" (memory 0)) (export "b" (memory 1))) + +(module (memory (export "a") 0)) +(module (memory (export "a") 0 1)) +(module (memory 0) (export "a" (memory 0))) +(module (memory 0 1) (export "a" (memory 0))) +(module (memory $a (export "a") 0)) +(module (memory $a (export "a") 0 1)) +(module (memory $a 0) (export "a" (memory $a))) +(module (memory $a 0 1) (export "a" (memory $a))) +(module (export "a" (memory 0)) (memory 0)) +(module (export "a" (memory 0)) (memory 0 1)) +(module (export "a" (memory $a)) (memory $a 0)) +(module (export "a" (memory $a)) (memory $a 0 1)) + +(; TODO: access memory ;) + +(assert_invalid + (module (memory 0) (export "a" (memory 1))) + "unknown memory" +) +(assert_invalid + (module (memory 0) (export "a" (memory 0)) (export "a" (memory 0))) + "duplicate export name" +) +;; No multiple memories yet. +;; (assert_invalid +;; (module (memory 0) (memory 0) (export "a" (memory 0)) (export "a" (memory 1))) +;; "duplicate export name" +;; ) +(assert_invalid + (module (memory 0) (func) (export "a" (memory 0)) (export "a" (func 0))) + "duplicate export name" +) +(assert_invalid + (module (memory 0) (global i32 (i32.const 0)) (export "a" (memory 0)) (export "a" (global 0))) + "duplicate export name" +) +(assert_invalid + (module (memory 0) (table 0 anyfunc) (export "a" (memory 0)) (export "a" (table 0))) + "duplicate export name" +) diff --git a/js/src/jit-test/tests/wasm/spec/exports.wast.js b/js/src/jit-test/tests/wasm/spec/exports.wast.js new file mode 100644 index 000000000..c0764de22 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/exports.wast.js @@ -0,0 +1 @@ +var importedArgs = ['exports.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/f32.wast b/js/src/jit-test/tests/wasm/spec/f32.wast new file mode 100644 index 000000000..9f58f9bd1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/f32.wast @@ -0,0 +1,2414 @@ +;; Test all the f32 operators on major boundary values and all special +;; values (except comparison operators, which are tested in f32_cmp.wast). + +(module + (func (export "add") (param $x f32) (param $y f32) (result f32) (f32.add (get_local $x) (get_local $y))) + (func (export "sub") (param $x f32) (param $y f32) (result f32) (f32.sub (get_local $x) (get_local $y))) + (func (export "mul") (param $x f32) (param $y f32) (result f32) (f32.mul (get_local $x) (get_local $y))) + (func (export "div") (param $x f32) (param $y f32) (result f32) (f32.div (get_local $x) (get_local $y))) + (func (export "sqrt") (param $x f32) (result f32) (f32.sqrt (get_local $x))) + (func (export "min") (param $x f32) (param $y f32) (result f32) (f32.min (get_local $x) (get_local $y))) + (func (export "max") (param $x f32) (param $y f32) (result f32) (f32.max (get_local $x) (get_local $y))) + (func (export "ceil") (param $x f32) (result f32) (f32.ceil (get_local $x))) + (func (export "floor") (param $x f32) (result f32) (f32.floor (get_local $x))) + (func (export "trunc") (param $x f32) (result f32) (f32.trunc (get_local $x))) + (func (export "nearest") (param $x f32) (result f32) (f32.nearest (get_local $x))) + (func (export "abs") (param $x f32) (result f32) (f32.abs (get_local $x))) + (func (export "neg") (param $x f32) (result f32) (f32.neg (get_local $x))) + (func (export "copysign") (param $x f32) (param $y f32) (result f32) (f32.copysign (get_local $x) (get_local $y))) +) + +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const -0x1p-149)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const -0x1p-149)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const 0x1p-149)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const 0x1p-149)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p-148)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const 0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const -0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p-148)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1.000002p-126)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1.fffffcp-127)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1.fffffcp-127)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1.000002p-126)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const -0x1p-126)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const -0x1p-126)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const 0x1p-126)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const 0x1p-126)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1.000002p-126)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const 0x1p-149)) (f32.const -0x1.fffffcp-127)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const -0x1p-149)) (f32.const 0x1.fffffcp-127)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1.000002p-126)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p-125)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const 0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const -0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p-125)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-1)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const -0x1p-1)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const 0x1p-1)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-1)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-1)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const 0x1p-126)) (f32.const -0x1p-1)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const -0x1p-126)) (f32.const 0x1p-1)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-1)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p+0)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const 0x1p-1)) (f32.const 0x0p+0)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const -0x1p-1)) (f32.const 0x0p+0)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p+0)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1.8p+0)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1.8p+0)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.b21fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.721fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.721fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.b21fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p+0)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const -0x1p+0)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const 0x1p+0)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p+0)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p+0)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const 0x1p-126)) (f32.const -0x1p+0)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const -0x1p-126)) (f32.const 0x1p+0)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p+0)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1.8p+0)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const 0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const -0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1.8p+0)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+1)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const -0x1p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+1)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.d21fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.521fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.521fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.d21fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.b21fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const -0x1.721fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const 0x1.721fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.b21fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.d21fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const -0x1.521fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const 0x1.521fb6p+2)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.d21fb6p+2)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+3)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const 0x0p+0)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+3)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const 0x0p+0)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "add" (f32.const -infinity) (f32.const -0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const -infinity) (f32.const 0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const infinity) (f32.const -0x0p+0)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const infinity) (f32.const 0x0p+0)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const -infinity) (f32.const -0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const -infinity) (f32.const 0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const infinity) (f32.const -0x1p-149)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const infinity) (f32.const 0x1p-149)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const -infinity) (f32.const -0x1p-126)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const -infinity) (f32.const 0x1p-126)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const infinity) (f32.const -0x1p-126)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const infinity) (f32.const 0x1p-126)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const -infinity) (f32.const -0x1p-1)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const -infinity) (f32.const 0x1p-1)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const infinity) (f32.const -0x1p-1)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const infinity) (f32.const 0x1p-1)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const -infinity) (f32.const -0x1p+0)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const -infinity) (f32.const 0x1p+0)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const infinity) (f32.const -0x1p+0)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const infinity) (f32.const 0x1p+0)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "add" (f32.const infinity) (f32.const -0x1.fffffep+127)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const infinity) (f32.const 0x1.fffffep+127)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const -infinity) (f32.const -infinity)) (f32.const -infinity)) +(assert_return_nan (invoke "add" (f32.const -infinity) (f32.const infinity))) +(assert_return_nan (invoke "add" (f32.const infinity) (f32.const -infinity))) +(assert_return (invoke "add" (f32.const infinity) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "add" (f32.const -infinity) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const -infinity) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "add" (f32.const infinity) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const infinity) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "add" (f32.const -nan) (f32.const -0x0p+0)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const -nan) (f32.const 0x0p+0)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const nan) (f32.const -0x0p+0)) (f32.const nan)) +(assert_return (invoke "add" (f32.const nan) (f32.const 0x0p+0)) (f32.const nan)) +(assert_return (invoke "add" (f32.const -nan) (f32.const -0x1p-149)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const -nan) (f32.const 0x1p-149)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const nan) (f32.const -0x1p-149)) (f32.const nan)) +(assert_return (invoke "add" (f32.const nan) (f32.const 0x1p-149)) (f32.const nan)) +(assert_return (invoke "add" (f32.const -nan) (f32.const -0x1p-126)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const -nan) (f32.const 0x1p-126)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const nan) (f32.const -0x1p-126)) (f32.const nan)) +(assert_return (invoke "add" (f32.const nan) (f32.const 0x1p-126)) (f32.const nan)) +(assert_return (invoke "add" (f32.const -nan) (f32.const -0x1p-1)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const -nan) (f32.const 0x1p-1)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const nan) (f32.const -0x1p-1)) (f32.const nan)) +(assert_return (invoke "add" (f32.const nan) (f32.const 0x1p-1)) (f32.const nan)) +(assert_return (invoke "add" (f32.const -nan) (f32.const -0x1p+0)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const -nan) (f32.const 0x1p+0)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const nan) (f32.const -0x1p+0)) (f32.const nan)) +(assert_return (invoke "add" (f32.const nan) (f32.const 0x1p+0)) (f32.const nan)) +(assert_return (invoke "add" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const nan) (f32.const -0x1.921fb6p+2)) (f32.const nan)) +(assert_return (invoke "add" (f32.const nan) (f32.const 0x1.921fb6p+2)) (f32.const nan)) +(assert_return (invoke "add" (f32.const -nan) (f32.const -0x1.fffffep+127)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const -nan) (f32.const 0x1.fffffep+127)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const nan) (f32.const -0x1.fffffep+127)) (f32.const nan)) +(assert_return (invoke "add" (f32.const nan) (f32.const 0x1.fffffep+127)) (f32.const nan)) +(assert_return (invoke "add" (f32.const -nan) (f32.const -infinity)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const -nan) (f32.const infinity)) (f32.const -nan)) +(assert_return (invoke "add" (f32.const nan) (f32.const -infinity)) (f32.const nan)) +(assert_return (invoke "add" (f32.const nan) (f32.const infinity)) (f32.const nan)) +(assert_return (invoke "add" (f32.const -nan) (f32.const -nan)) (f32.const -nan)) +(assert_return_nan (invoke "add" (f32.const -nan) (f32.const nan))) +(assert_return_nan (invoke "add" (f32.const nan) (f32.const -nan))) +(assert_return (invoke "add" (f32.const nan) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const -0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const 0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const -0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const 0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const -0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const 0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const -0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const 0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const -0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const 0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const -0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const 0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const -0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const 0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const -0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const 0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const -0x1p-149)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const -0x1p-149)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const 0x1p-149)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const 0x1p-149)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const -0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const 0x1p-149)) (f32.const -0x1p-148)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const -0x1p-149)) (f32.const 0x1p-148)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const 0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const -0x1p-126)) (f32.const 0x1.fffffcp-127)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const 0x1p-126)) (f32.const -0x1.000002p-126)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const -0x1p-126)) (f32.const 0x1.000002p-126)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const 0x1p-126)) (f32.const -0x1.fffffcp-127)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const -0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const 0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const -0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const 0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const -0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const 0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const -0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const 0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const -0x1p-126)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const -0x1p-126)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const 0x1p-126)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const 0x1p-126)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1.fffffcp-127)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const 0x1p-149)) (f32.const -0x1.000002p-126)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const -0x1p-149)) (f32.const 0x1.000002p-126)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1.fffffcp-127)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const -0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const 0x1p-126)) (f32.const -0x1p-125)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const -0x1p-126)) (f32.const 0x1p-125)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const 0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const -0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const 0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const -0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const 0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const -0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const 0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const -0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const 0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-1)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const -0x1p-1)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const 0x1p-1)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-1)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-1)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const 0x1p-126)) (f32.const -0x1p-1)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const -0x1p-126)) (f32.const 0x1p-1)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-1)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const -0x1p-1)) (f32.const 0x0p+0)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const 0x1p-1)) (f32.const -0x1p+0)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const -0x1p-1)) (f32.const 0x1p+0)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const 0x1p-1)) (f32.const 0x0p+0)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const -0x1p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const 0x1p+0)) (f32.const -0x1.8p+0)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const -0x1p+0)) (f32.const 0x1.8p+0)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const 0x1p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.721fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.b21fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.b21fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.721fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p+0)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const -0x1p+0)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const 0x1p+0)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p+0)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p+0)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const 0x1p-126)) (f32.const -0x1p+0)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const -0x1p-126)) (f32.const 0x1p+0)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p+0)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const 0x1p-1)) (f32.const -0x1.8p+0)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const -0x1p-1)) (f32.const 0x1.8p+0)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const -0x1p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const 0x1p+0)) (f32.const -0x1p+1)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const -0x1p+0)) (f32.const 0x1p+1)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.521fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.d21fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.d21fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.521fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.721fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const -0x1.b21fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const 0x1.b21fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.721fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.521fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const -0x1.d21fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const 0x1.d21fb6p+2)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.521fb6p+2)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const 0x0p+0)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+3)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+3)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const 0x0p+0)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const -infinity) (f32.const -0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const -infinity) (f32.const 0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const infinity) (f32.const -0x0p+0)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const infinity) (f32.const 0x0p+0)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const -infinity) (f32.const -0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const -infinity) (f32.const 0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const infinity) (f32.const -0x1p-149)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const infinity) (f32.const 0x1p-149)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const -infinity) (f32.const -0x1p-126)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const -infinity) (f32.const 0x1p-126)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const infinity) (f32.const -0x1p-126)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const infinity) (f32.const 0x1p-126)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const -infinity) (f32.const -0x1p-1)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const -infinity) (f32.const 0x1p-1)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const infinity) (f32.const -0x1p-1)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const infinity) (f32.const 0x1p-1)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const -infinity) (f32.const -0x1p+0)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const -infinity) (f32.const 0x1p+0)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const infinity) (f32.const -0x1p+0)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const infinity) (f32.const 0x1p+0)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const infinity) (f32.const -0x1.fffffep+127)) (f32.const infinity)) +(assert_return (invoke "sub" (f32.const infinity) (f32.const 0x1.fffffep+127)) (f32.const infinity)) +(assert_return_nan (invoke "sub" (f32.const -infinity) (f32.const -infinity))) +(assert_return (invoke "sub" (f32.const -infinity) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "sub" (f32.const infinity) (f32.const -infinity)) (f32.const infinity)) +(assert_return_nan (invoke "sub" (f32.const infinity) (f32.const infinity))) +(assert_return (invoke "sub" (f32.const -infinity) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const -infinity) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const infinity) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const infinity) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const -nan) (f32.const -0x0p+0)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const -nan) (f32.const 0x0p+0)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const nan) (f32.const -0x0p+0)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const nan) (f32.const 0x0p+0)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const -nan) (f32.const -0x1p-149)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const -nan) (f32.const 0x1p-149)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const nan) (f32.const -0x1p-149)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const nan) (f32.const 0x1p-149)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const -nan) (f32.const -0x1p-126)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const -nan) (f32.const 0x1p-126)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const nan) (f32.const -0x1p-126)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const nan) (f32.const 0x1p-126)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const -nan) (f32.const -0x1p-1)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const -nan) (f32.const 0x1p-1)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const nan) (f32.const -0x1p-1)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const nan) (f32.const 0x1p-1)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const -nan) (f32.const -0x1p+0)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const -nan) (f32.const 0x1p+0)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const nan) (f32.const -0x1p+0)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const nan) (f32.const 0x1p+0)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const nan) (f32.const -0x1.921fb6p+2)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const nan) (f32.const 0x1.921fb6p+2)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const -nan) (f32.const -0x1.fffffep+127)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const -nan) (f32.const 0x1.fffffep+127)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const nan) (f32.const -0x1.fffffep+127)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const nan) (f32.const 0x1.fffffep+127)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const -nan) (f32.const -infinity)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const -nan) (f32.const infinity)) (f32.const -nan)) +(assert_return (invoke "sub" (f32.const nan) (f32.const -infinity)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const nan) (f32.const infinity)) (f32.const nan)) +(assert_return (invoke "sub" (f32.const -nan) (f32.const -nan)) (f32.const -nan)) +(assert_return_nan (invoke "sub" (f32.const -nan) (f32.const nan))) +(assert_return_nan (invoke "sub" (f32.const nan) (f32.const -nan))) +(assert_return (invoke "sub" (f32.const nan) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const -0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const 0x1p-149)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const -0x1p-149)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const 0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const -0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const 0x1p-126)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const -0x1p-126)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const 0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const -0x1p-1)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const 0x1p-1)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const -0x1p-1)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const 0x1p-1)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const -0x1p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const 0x1p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const -0x1p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0)) +(assert_return_nan (invoke "mul" (f32.const -0x0p+0) (f32.const -infinity))) +(assert_return_nan (invoke "mul" (f32.const -0x0p+0) (f32.const infinity))) +(assert_return_nan (invoke "mul" (f32.const 0x0p+0) (f32.const -infinity))) +(assert_return_nan (invoke "mul" (f32.const 0x0p+0) (f32.const infinity))) +(assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const -0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const 0x1p-149)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const -0x1p-149)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const 0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const -0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const 0x1p-126)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const -0x1p-126)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const 0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const -0x1p-1)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const 0x1p-1)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const -0x1p-1)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const 0x1p-1)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const -0x1p+0)) (f32.const 0x1p-149)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const 0x1p+0)) (f32.const -0x1p-149)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p-149)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p-149)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.8p-147)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.8p-147)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.8p-147)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.8p-147)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep-22)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep-22)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep-22)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep-22)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const -0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const 0x1p-149)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const -0x1p-149)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const -0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const 0x1p-126)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const -0x1p-126)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const 0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const -0x1p-1)) (f32.const 0x1p-127)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const 0x1p-1)) (f32.const -0x1p-127)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-127)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-127)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const -0x1p+0)) (f32.const 0x1p-126)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const 0x1p+0)) (f32.const -0x1p-126)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p-126)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p-126)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p-124)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p-124)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p-124)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p-124)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+1)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+1)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+1)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+1)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const -0x1p-126)) (f32.const 0x1p-127)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const 0x1p-126)) (f32.const -0x1p-127)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-127)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-127)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const -0x1p-1)) (f32.const 0x1p-2)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const 0x1p-1)) (f32.const -0x1p-2)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p-2)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p-2)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const -0x1p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const 0x1p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+1)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+1)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+1)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+1)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+126)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+126)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+126)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+126)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const -0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const 0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const -0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const 0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const -0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const 0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const 0x1.8p-147)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const -0x1.8p-147)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1.8p-147)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1.8p-147)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const 0x1.921fb6p-124)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const -0x1.921fb6p-124)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1.921fb6p-124)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1.921fb6p-124)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const 0x1.921fb6p+1)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const -0x1.921fb6p+1)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.921fb6p+1)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.921fb6p+1)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.3bd3cep+5)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.3bd3cep+5)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.3bd3cep+5)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.3bd3cep+5)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const 0x1.fffffep-22)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const -0x1.fffffep-22)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1.fffffep-22)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1.fffffep-22)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const 0x1.fffffep+1)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const -0x1.fffffep+1)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1.fffffep+1)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1.fffffep+1)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const 0x1.fffffep+126)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const -0x1.fffffep+126)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1.fffffep+126)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1.fffffep+126)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const nan)) (f32.const nan)) +(assert_return_nan (invoke "mul" (f32.const -infinity) (f32.const -0x0p+0))) +(assert_return_nan (invoke "mul" (f32.const -infinity) (f32.const 0x0p+0))) +(assert_return_nan (invoke "mul" (f32.const infinity) (f32.const -0x0p+0))) +(assert_return_nan (invoke "mul" (f32.const infinity) (f32.const 0x0p+0))) +(assert_return (invoke "mul" (f32.const -infinity) (f32.const -0x1p-149)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -infinity) (f32.const 0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const infinity) (f32.const -0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const infinity) (f32.const 0x1p-149)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -infinity) (f32.const -0x1p-126)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -infinity) (f32.const 0x1p-126)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const infinity) (f32.const -0x1p-126)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const infinity) (f32.const 0x1p-126)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -infinity) (f32.const -0x1p-1)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -infinity) (f32.const 0x1p-1)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const infinity) (f32.const -0x1p-1)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const infinity) (f32.const 0x1p-1)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -infinity) (f32.const -0x1p+0)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -infinity) (f32.const 0x1p+0)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const infinity) (f32.const -0x1p+0)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const infinity) (f32.const 0x1p+0)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const infinity) (f32.const -0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const infinity) (f32.const 0x1.fffffep+127)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -infinity) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -infinity) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const infinity) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "mul" (f32.const infinity) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "mul" (f32.const -infinity) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const -infinity) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const infinity) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const infinity) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const -nan) (f32.const -0x0p+0)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const -nan) (f32.const 0x0p+0)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const nan) (f32.const -0x0p+0)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const nan) (f32.const 0x0p+0)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const -nan) (f32.const -0x1p-149)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const -nan) (f32.const 0x1p-149)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const nan) (f32.const -0x1p-149)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const nan) (f32.const 0x1p-149)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const -nan) (f32.const -0x1p-126)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const -nan) (f32.const 0x1p-126)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const nan) (f32.const -0x1p-126)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const nan) (f32.const 0x1p-126)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const -nan) (f32.const -0x1p-1)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const -nan) (f32.const 0x1p-1)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const nan) (f32.const -0x1p-1)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const nan) (f32.const 0x1p-1)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const -nan) (f32.const -0x1p+0)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const -nan) (f32.const 0x1p+0)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const nan) (f32.const -0x1p+0)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const nan) (f32.const 0x1p+0)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const nan) (f32.const -0x1.921fb6p+2)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const nan) (f32.const 0x1.921fb6p+2)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const -nan) (f32.const -0x1.fffffep+127)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const -nan) (f32.const 0x1.fffffep+127)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const nan) (f32.const -0x1.fffffep+127)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const nan) (f32.const 0x1.fffffep+127)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const -nan) (f32.const -infinity)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const -nan) (f32.const infinity)) (f32.const -nan)) +(assert_return (invoke "mul" (f32.const nan) (f32.const -infinity)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const nan) (f32.const infinity)) (f32.const nan)) +(assert_return (invoke "mul" (f32.const -nan) (f32.const -nan)) (f32.const -nan)) +(assert_return_nan (invoke "mul" (f32.const -nan) (f32.const nan))) +(assert_return_nan (invoke "mul" (f32.const nan) (f32.const -nan))) +(assert_return (invoke "mul" (f32.const nan) (f32.const nan)) (f32.const nan)) +(assert_return_nan (invoke "div" (f32.const -0x0p+0) (f32.const -0x0p+0))) +(assert_return_nan (invoke "div" (f32.const -0x0p+0) (f32.const 0x0p+0))) +(assert_return_nan (invoke "div" (f32.const 0x0p+0) (f32.const -0x0p+0))) +(assert_return_nan (invoke "div" (f32.const 0x0p+0) (f32.const 0x0p+0))) +(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const -0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const 0x1p-149)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const -0x1p-149)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const 0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const -0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const 0x1p-126)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const -0x1p-126)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const 0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const -0x1p-1)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const 0x1p-1)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const -0x1p-1)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const 0x1p-1)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const -0x1p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const 0x1p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const -0x1p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const -infinity)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const -infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const infinity)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const -0x1p-149)) (f32.const 0x1p+0)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const 0x1p-149)) (f32.const -0x1p+0)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p+0)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p+0)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const -0x1p-126)) (f32.const 0x1p-23)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const 0x1p-126)) (f32.const -0x1p-23)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1p-23)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1p-23)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const -0x1p-1)) (f32.const 0x1p-148)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const 0x1p-1)) (f32.const -0x1p-148)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-148)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-148)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const -0x1p+0)) (f32.const 0x1p-149)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const 0x1p+0)) (f32.const -0x1p-149)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p-149)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p-149)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const -infinity)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const -infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const infinity)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const -0x1p-149)) (f32.const 0x1p+23)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const 0x1p-149)) (f32.const -0x1p+23)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1p+23)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p+23)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const -0x1p-126)) (f32.const 0x1p+0)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const 0x1p-126)) (f32.const -0x1p+0)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p+0)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p+0)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const -0x1p-1)) (f32.const 0x1p-125)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const 0x1p-1)) (f32.const -0x1p-125)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-125)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-125)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const -0x1p+0)) (f32.const 0x1p-126)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const 0x1p+0)) (f32.const -0x1p-126)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p-126)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p-126)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.45f3p-129)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.45f3p-129)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.45f3p-129)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.45f3p-129)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const -infinity)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const -infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const infinity)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const -0x1p-126)) (f32.const 0x1p+125)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const 0x1p-126)) (f32.const -0x1p+125)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p+125)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p+125)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const -0x1p-1)) (f32.const 0x1p+0)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const 0x1p-1)) (f32.const -0x1p+0)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p+0)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p+0)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const -0x1p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const 0x1p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.45f306p-4)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.45f306p-4)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.45f306p-4)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.45f306p-4)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const 0x1p-129)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const -0x1p-129)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-129)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-129)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const -infinity)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const -infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const infinity)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const -0x1p-126)) (f32.const 0x1p+126)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const 0x1p-126)) (f32.const -0x1p+126)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p+126)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p+126)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const -0x1p-1)) (f32.const 0x1p+1)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const 0x1p-1)) (f32.const -0x1p+1)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p+1)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p+1)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const -0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const 0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.45f306p-3)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.45f306p-3)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.45f306p-3)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.45f306p-3)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x1p-128)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1p-128)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-128)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-128)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const -infinity)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const -infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const infinity)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const 0x1.921fb6p+3)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const -0x1.921fb6p+3)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.921fb6p+3)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.921fb6p+3)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const 0x1p+0)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const -0x1p+0)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p+0)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p+0)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const 0x1.921fb8p-126)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const -0x1.921fb8p-126)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.921fb8p-126)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.921fb8p-126)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.45f304p+125)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.45f304p+125)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.45f304p+125)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.45f304p+125)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const 0x1p+0)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const -0x1p+0)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1p+0)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1p+0)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const infinity)) (f32.const 0x0p+0)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "div" (f32.const -infinity) (f32.const -0x0p+0)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -infinity) (f32.const 0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const infinity) (f32.const -0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const infinity) (f32.const 0x0p+0)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -infinity) (f32.const -0x1p-149)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -infinity) (f32.const 0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const infinity) (f32.const -0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const infinity) (f32.const 0x1p-149)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -infinity) (f32.const -0x1p-126)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -infinity) (f32.const 0x1p-126)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const infinity) (f32.const -0x1p-126)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const infinity) (f32.const 0x1p-126)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -infinity) (f32.const -0x1p-1)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -infinity) (f32.const 0x1p-1)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const infinity) (f32.const -0x1p-1)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const infinity) (f32.const 0x1p-1)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -infinity) (f32.const -0x1p+0)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -infinity) (f32.const 0x1p+0)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const infinity) (f32.const -0x1p+0)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const infinity) (f32.const 0x1p+0)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (f32.const infinity)) +(assert_return (invoke "div" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const infinity) (f32.const -0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "div" (f32.const infinity) (f32.const 0x1.fffffep+127)) (f32.const infinity)) +(assert_return_nan (invoke "div" (f32.const -infinity) (f32.const -infinity))) +(assert_return_nan (invoke "div" (f32.const -infinity) (f32.const infinity))) +(assert_return_nan (invoke "div" (f32.const infinity) (f32.const -infinity))) +(assert_return_nan (invoke "div" (f32.const infinity) (f32.const infinity))) +(assert_return (invoke "div" (f32.const -infinity) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const -infinity) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "div" (f32.const infinity) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const infinity) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "div" (f32.const -nan) (f32.const -0x0p+0)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const -nan) (f32.const 0x0p+0)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const nan) (f32.const -0x0p+0)) (f32.const nan)) +(assert_return (invoke "div" (f32.const nan) (f32.const 0x0p+0)) (f32.const nan)) +(assert_return (invoke "div" (f32.const -nan) (f32.const -0x1p-149)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const -nan) (f32.const 0x1p-149)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const nan) (f32.const -0x1p-149)) (f32.const nan)) +(assert_return (invoke "div" (f32.const nan) (f32.const 0x1p-149)) (f32.const nan)) +(assert_return (invoke "div" (f32.const -nan) (f32.const -0x1p-126)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const -nan) (f32.const 0x1p-126)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const nan) (f32.const -0x1p-126)) (f32.const nan)) +(assert_return (invoke "div" (f32.const nan) (f32.const 0x1p-126)) (f32.const nan)) +(assert_return (invoke "div" (f32.const -nan) (f32.const -0x1p-1)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const -nan) (f32.const 0x1p-1)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const nan) (f32.const -0x1p-1)) (f32.const nan)) +(assert_return (invoke "div" (f32.const nan) (f32.const 0x1p-1)) (f32.const nan)) +(assert_return (invoke "div" (f32.const -nan) (f32.const -0x1p+0)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const -nan) (f32.const 0x1p+0)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const nan) (f32.const -0x1p+0)) (f32.const nan)) +(assert_return (invoke "div" (f32.const nan) (f32.const 0x1p+0)) (f32.const nan)) +(assert_return (invoke "div" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const nan) (f32.const -0x1.921fb6p+2)) (f32.const nan)) +(assert_return (invoke "div" (f32.const nan) (f32.const 0x1.921fb6p+2)) (f32.const nan)) +(assert_return (invoke "div" (f32.const -nan) (f32.const -0x1.fffffep+127)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const -nan) (f32.const 0x1.fffffep+127)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const nan) (f32.const -0x1.fffffep+127)) (f32.const nan)) +(assert_return (invoke "div" (f32.const nan) (f32.const 0x1.fffffep+127)) (f32.const nan)) +(assert_return (invoke "div" (f32.const -nan) (f32.const -infinity)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const -nan) (f32.const infinity)) (f32.const -nan)) +(assert_return (invoke "div" (f32.const nan) (f32.const -infinity)) (f32.const nan)) +(assert_return (invoke "div" (f32.const nan) (f32.const infinity)) (f32.const nan)) +(assert_return (invoke "div" (f32.const -nan) (f32.const -nan)) (f32.const -nan)) +(assert_return_nan (invoke "div" (f32.const -nan) (f32.const nan))) +(assert_return_nan (invoke "div" (f32.const nan) (f32.const -nan))) +(assert_return (invoke "div" (f32.const nan) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const 0x1p-149)) (f32.const -0x0p+0)) +(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const 0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const 0x1p-126)) (f32.const -0x0p+0)) +(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const 0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const 0x1p-1)) (f32.const -0x0p+0)) +(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const 0x1p-1)) (f32.const 0x0p+0)) +(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const 0x1p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x0p+0)) +(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0)) +(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x0p+0)) +(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0)) +(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const infinity)) (f32.const 0x0p+0)) +(assert_return_nan (invoke "min" (f32.const -0x0p+0) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const -0x0p+0) (f32.const nan))) +(assert_return_nan (invoke "min" (f32.const 0x0p+0) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const 0x0p+0) (f32.const nan))) +(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const 0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const 0x1p-126)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1p-149)) +(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const 0x1p-1)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-149)) +(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const 0x1p+0)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p-149)) +(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-149)) +(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-149)) +(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const infinity)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const infinity)) (f32.const 0x1p-149)) +(assert_return_nan (invoke "min" (f32.const -0x1p-149) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const -0x1p-149) (f32.const nan))) +(assert_return_nan (invoke "min" (f32.const 0x1p-149) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const 0x1p-149) (f32.const nan))) +(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const 0x1p-149)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const 0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const 0x1p-1)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-126)) +(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const 0x1p+0)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p-126)) +(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-126)) +(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-126)) +(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const infinity)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const infinity)) (f32.const 0x1p-126)) +(assert_return_nan (invoke "min" (f32.const -0x1p-126) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const -0x1p-126) (f32.const nan))) +(assert_return_nan (invoke "min" (f32.const 0x1p-126) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const 0x1p-126) (f32.const nan))) +(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const 0x1p-126)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const 0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const 0x1p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-1)) +(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-1)) +(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const infinity)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const infinity)) (f32.const 0x1p-1)) +(assert_return_nan (invoke "min" (f32.const -0x1p-1) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const -0x1p-1) (f32.const nan))) +(assert_return_nan (invoke "min" (f32.const 0x1p-1) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const 0x1p-1) (f32.const nan))) +(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const 0x1p-126)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const 0x1p-1)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const 0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p+0)) +(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1p+0)) +(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const infinity)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const infinity)) (f32.const 0x1p+0)) +(assert_return_nan (invoke "min" (f32.const -0x1p+0) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const -0x1p+0) (f32.const nan))) +(assert_return_nan (invoke "min" (f32.const 0x1p+0) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const 0x1p+0) (f32.const nan))) +(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (f32.const 0x1.921fb6p+2)) +(assert_return_nan (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const nan))) +(assert_return_nan (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const nan))) +(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const infinity)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const infinity)) (f32.const 0x1.fffffep+127)) +(assert_return_nan (invoke "min" (f32.const -0x1.fffffep+127) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const -0x1.fffffep+127) (f32.const nan))) +(assert_return_nan (invoke "min" (f32.const 0x1.fffffep+127) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const 0x1.fffffep+127) (f32.const nan))) +(assert_return (invoke "min" (f32.const -infinity) (f32.const -0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const -infinity) (f32.const 0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const infinity) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "min" (f32.const infinity) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "min" (f32.const -infinity) (f32.const -0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const -infinity) (f32.const 0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const infinity) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "min" (f32.const infinity) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "min" (f32.const -infinity) (f32.const -0x1p-126)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const -infinity) (f32.const 0x1p-126)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const infinity) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "min" (f32.const infinity) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "min" (f32.const -infinity) (f32.const -0x1p-1)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const -infinity) (f32.const 0x1p-1)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const infinity) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "min" (f32.const infinity) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "min" (f32.const -infinity) (f32.const -0x1p+0)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const -infinity) (f32.const 0x1p+0)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const infinity) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "min" (f32.const infinity) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "min" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "min" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const infinity) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const infinity) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "min" (f32.const -infinity) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const -infinity) (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const infinity) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "min" (f32.const infinity) (f32.const infinity)) (f32.const infinity)) +(assert_return_nan (invoke "min" (f32.const -infinity) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const -infinity) (f32.const nan))) +(assert_return_nan (invoke "min" (f32.const infinity) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const infinity) (f32.const nan))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const -0x0p+0))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const 0x0p+0))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const -0x0p+0))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const 0x0p+0))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const -0x1p-149))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const 0x1p-149))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const -0x1p-149))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const 0x1p-149))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const -0x1p-126))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const 0x1p-126))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const -0x1p-126))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const 0x1p-126))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const -0x1p-1))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const 0x1p-1))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const -0x1p-1))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const 0x1p-1))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const -0x1p+0))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const 0x1p+0))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const -0x1p+0))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const 0x1p+0))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const -0x1.921fb6p+2))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const 0x1.921fb6p+2))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const -0x1.921fb6p+2))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const 0x1.921fb6p+2))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const -0x1.fffffep+127))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const 0x1.fffffep+127))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const -0x1.fffffep+127))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const 0x1.fffffep+127))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const -infinity))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const infinity))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const -infinity))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const infinity))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const -nan) (f32.const nan))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const -nan))) +(assert_return_nan (invoke "min" (f32.const nan) (f32.const nan))) +(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const -0x1p-149)) (f32.const -0x0p+0)) +(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const -0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const -0x1p-126)) (f32.const -0x0p+0)) +(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const -0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const -0x1p-1)) (f32.const -0x0p+0)) +(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const -0x1p-1)) (f32.const 0x0p+0)) +(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const -0x1p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const -0x1p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x0p+0)) +(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x0p+0)) +(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0)) +(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x0p+0)) +(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const -infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const -infinity)) (f32.const 0x0p+0)) +(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const infinity)) (f32.const infinity)) +(assert_return_nan (invoke "max" (f32.const -0x0p+0) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const -0x0p+0) (f32.const nan))) +(assert_return_nan (invoke "max" (f32.const 0x0p+0) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const 0x0p+0) (f32.const nan))) +(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const -0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1p-149)) +(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const -0x1p-126)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-149)) +(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const -0x1p-1)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p-149)) +(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const -0x1p+0)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-149)) +(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-149)) +(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const -infinity)) (f32.const -0x1p-149)) +(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const -infinity)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const infinity)) (f32.const infinity)) +(assert_return_nan (invoke "max" (f32.const -0x1p-149) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const -0x1p-149) (f32.const nan))) +(assert_return_nan (invoke "max" (f32.const 0x1p-149) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const 0x1p-149) (f32.const nan))) +(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const -0x1p-149)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const -0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-126)) +(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const -0x1p-1)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p-126)) +(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const -0x1p+0)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-126)) +(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-126)) +(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const -infinity)) (f32.const -0x1p-126)) +(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const -infinity)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const infinity)) (f32.const infinity)) +(assert_return_nan (invoke "max" (f32.const -0x1p-126) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const -0x1p-126) (f32.const nan))) +(assert_return_nan (invoke "max" (f32.const 0x1p-126) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const 0x1p-126) (f32.const nan))) +(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const -0x1p-126)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const -0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const -0x1p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-1)) +(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-1)) +(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const -infinity)) (f32.const -0x1p-1)) +(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const -infinity)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const infinity)) (f32.const infinity)) +(assert_return_nan (invoke "max" (f32.const -0x1p-1) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const -0x1p-1) (f32.const nan))) +(assert_return_nan (invoke "max" (f32.const 0x1p-1) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const 0x1p-1) (f32.const nan))) +(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const -0x1p-126)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const -0x1p-1)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const -0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p+0)) +(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1p+0)) +(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const -infinity)) (f32.const -0x1p+0)) +(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const -infinity)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const infinity)) (f32.const infinity)) +(assert_return_nan (invoke "max" (f32.const -0x1p+0) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const -0x1p+0) (f32.const nan))) +(assert_return_nan (invoke "max" (f32.const 0x1p+0) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const 0x1p+0) (f32.const nan))) +(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (f32.const infinity)) +(assert_return_nan (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const nan))) +(assert_return_nan (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const nan))) +(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const infinity)) (f32.const infinity)) +(assert_return_nan (invoke "max" (f32.const -0x1.fffffep+127) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const -0x1.fffffep+127) (f32.const nan))) +(assert_return_nan (invoke "max" (f32.const 0x1.fffffep+127) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const 0x1.fffffep+127) (f32.const nan))) +(assert_return (invoke "max" (f32.const -infinity) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "max" (f32.const -infinity) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "max" (f32.const infinity) (f32.const -0x0p+0)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const infinity) (f32.const 0x0p+0)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const -infinity) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "max" (f32.const -infinity) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "max" (f32.const infinity) (f32.const -0x1p-149)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const infinity) (f32.const 0x1p-149)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const -infinity) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "max" (f32.const -infinity) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "max" (f32.const infinity) (f32.const -0x1p-126)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const infinity) (f32.const 0x1p-126)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const -infinity) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "max" (f32.const -infinity) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "max" (f32.const infinity) (f32.const -0x1p-1)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const infinity) (f32.const 0x1p-1)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const -infinity) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "max" (f32.const -infinity) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "max" (f32.const infinity) (f32.const -0x1p+0)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const infinity) (f32.const 0x1p+0)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "max" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "max" (f32.const infinity) (f32.const -0x1.fffffep+127)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const infinity) (f32.const 0x1.fffffep+127)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const -infinity) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "max" (f32.const -infinity) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const infinity) (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "max" (f32.const infinity) (f32.const infinity)) (f32.const infinity)) +(assert_return_nan (invoke "max" (f32.const -infinity) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const -infinity) (f32.const nan))) +(assert_return_nan (invoke "max" (f32.const infinity) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const infinity) (f32.const nan))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const -0x0p+0))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const 0x0p+0))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const -0x0p+0))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const 0x0p+0))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const -0x1p-149))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const 0x1p-149))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const -0x1p-149))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const 0x1p-149))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const -0x1p-126))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const 0x1p-126))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const -0x1p-126))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const 0x1p-126))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const -0x1p-1))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const 0x1p-1))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const -0x1p-1))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const 0x1p-1))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const -0x1p+0))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const 0x1p+0))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const -0x1p+0))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const 0x1p+0))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const -0x1.921fb6p+2))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const 0x1.921fb6p+2))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const -0x1.921fb6p+2))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const 0x1.921fb6p+2))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const -0x1.fffffep+127))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const 0x1.fffffep+127))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const -0x1.fffffep+127))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const 0x1.fffffep+127))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const -infinity))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const infinity))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const -infinity))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const infinity))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const -nan) (f32.const nan))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const -nan))) +(assert_return_nan (invoke "max" (f32.const nan) (f32.const nan))) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1p-149)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1p-149)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1p-126)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1p-126)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1p-1)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1p-1)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1p-1)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1p-1)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const infinity)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -infinity)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const infinity)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -nan)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const nan)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -nan)) (f32.const -0x0p+0)) +(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const nan)) (f32.const 0x0p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -infinity)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const infinity)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -infinity)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const infinity)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -nan)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const nan)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -nan)) (f32.const -0x1p-149)) +(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const nan)) (f32.const 0x1p-149)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -infinity)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const infinity)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -infinity)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const infinity)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -nan)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const nan)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -nan)) (f32.const -0x1p-126)) +(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const nan)) (f32.const 0x1p-126)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -infinity)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const infinity)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -infinity)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const infinity)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -nan)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const nan)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -nan)) (f32.const -0x1p-1)) +(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const nan)) (f32.const 0x1p-1)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -infinity)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const infinity)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -infinity)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const infinity)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -nan)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const nan)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -nan)) (f32.const -0x1p+0)) +(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const nan)) (f32.const 0x1p+0)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const nan)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const nan)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const infinity)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const infinity)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -nan)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const nan)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -nan)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const nan)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const 0x0p+0)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const -0x0p+0)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const 0x0p+0)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const 0x1p-149)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const -0x1p-149)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const 0x1p-149)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -0x1p-126)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const 0x1p-126)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const -0x1p-126)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const 0x1p-126)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -0x1p-1)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const 0x1p-1)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const -0x1p-1)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const 0x1p-1)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -0x1p+0)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const 0x1p+0)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const -0x1p+0)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const 0x1p+0)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const -0x1.fffffep+127)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const 0x1.fffffep+127)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -nan)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const -infinity) (f32.const nan)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const -nan)) (f32.const -infinity)) +(assert_return (invoke "copysign" (f32.const infinity) (f32.const nan)) (f32.const infinity)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const -0x0p+0)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const 0x0p+0)) (f32.const nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const -0x0p+0)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const 0x0p+0)) (f32.const nan)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const -0x1p-149)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const 0x1p-149)) (f32.const nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const -0x1p-149)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const 0x1p-149)) (f32.const nan)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const -0x1p-126)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const 0x1p-126)) (f32.const nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const -0x1p-126)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const 0x1p-126)) (f32.const nan)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const -0x1p-1)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const 0x1p-1)) (f32.const nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const -0x1p-1)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const 0x1p-1)) (f32.const nan)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const -0x1p+0)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const 0x1p+0)) (f32.const nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const -0x1p+0)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const 0x1p+0)) (f32.const nan)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (f32.const nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const -0x1.921fb6p+2)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const 0x1.921fb6p+2)) (f32.const nan)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const -0x1.fffffep+127)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const 0x1.fffffep+127)) (f32.const nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const -0x1.fffffep+127)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const 0x1.fffffep+127)) (f32.const nan)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const -infinity)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const infinity)) (f32.const nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const -infinity)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const infinity)) (f32.const nan)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const -nan) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "copysign" (f32.const nan) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "sqrt" (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "sqrt" (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return_nan (invoke "sqrt" (f32.const -0x1p-149))) +(assert_return (invoke "sqrt" (f32.const 0x1p-149)) (f32.const 0x1.6a09e6p-75)) +(assert_return_nan (invoke "sqrt" (f32.const -0x1p-126))) +(assert_return (invoke "sqrt" (f32.const 0x1p-126)) (f32.const 0x1p-63)) +(assert_return_nan (invoke "sqrt" (f32.const -0x1p-1))) +(assert_return (invoke "sqrt" (f32.const 0x1p-1)) (f32.const 0x1.6a09e6p-1)) +(assert_return_nan (invoke "sqrt" (f32.const -0x1p+0))) +(assert_return (invoke "sqrt" (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return_nan (invoke "sqrt" (f32.const -0x1.921fb6p+2))) +(assert_return (invoke "sqrt" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.40d932p+1)) +(assert_return_nan (invoke "sqrt" (f32.const -0x1.fffffep+127))) +(assert_return (invoke "sqrt" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+63)) +(assert_return_nan (invoke "sqrt" (f32.const -infinity))) +(assert_return (invoke "sqrt" (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "sqrt" (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "sqrt" (f32.const nan)) (f32.const nan)) +(assert_return (invoke "floor" (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "floor" (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "floor" (f32.const -0x1p-149)) (f32.const -0x1p+0)) +(assert_return (invoke "floor" (f32.const 0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "floor" (f32.const -0x1p-126)) (f32.const -0x1p+0)) +(assert_return (invoke "floor" (f32.const 0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "floor" (f32.const -0x1p-1)) (f32.const -0x1p+0)) +(assert_return (invoke "floor" (f32.const 0x1p-1)) (f32.const 0x0p+0)) +(assert_return (invoke "floor" (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "floor" (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "floor" (f32.const -0x1.921fb6p+2)) (f32.const -0x1.cp+2)) +(assert_return (invoke "floor" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.8p+2)) +(assert_return (invoke "floor" (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "floor" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "floor" (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "floor" (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "floor" (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "floor" (f32.const nan)) (f32.const nan)) +(assert_return (invoke "ceil" (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "ceil" (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "ceil" (f32.const -0x1p-149)) (f32.const -0x0p+0)) +(assert_return (invoke "ceil" (f32.const 0x1p-149)) (f32.const 0x1p+0)) +(assert_return (invoke "ceil" (f32.const -0x1p-126)) (f32.const -0x0p+0)) +(assert_return (invoke "ceil" (f32.const 0x1p-126)) (f32.const 0x1p+0)) +(assert_return (invoke "ceil" (f32.const -0x1p-1)) (f32.const -0x0p+0)) +(assert_return (invoke "ceil" (f32.const 0x1p-1)) (f32.const 0x1p+0)) +(assert_return (invoke "ceil" (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "ceil" (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "ceil" (f32.const -0x1.921fb6p+2)) (f32.const -0x1.8p+2)) +(assert_return (invoke "ceil" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.cp+2)) +(assert_return (invoke "ceil" (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "ceil" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "ceil" (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "ceil" (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "ceil" (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "ceil" (f32.const nan)) (f32.const nan)) +(assert_return (invoke "trunc" (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "trunc" (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "trunc" (f32.const -0x1p-149)) (f32.const -0x0p+0)) +(assert_return (invoke "trunc" (f32.const 0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "trunc" (f32.const -0x1p-126)) (f32.const -0x0p+0)) +(assert_return (invoke "trunc" (f32.const 0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "trunc" (f32.const -0x1p-1)) (f32.const -0x0p+0)) +(assert_return (invoke "trunc" (f32.const 0x1p-1)) (f32.const 0x0p+0)) +(assert_return (invoke "trunc" (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "trunc" (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "trunc" (f32.const -0x1.921fb6p+2)) (f32.const -0x1.8p+2)) +(assert_return (invoke "trunc" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.8p+2)) +(assert_return (invoke "trunc" (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "trunc" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "trunc" (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "trunc" (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "trunc" (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "trunc" (f32.const nan)) (f32.const nan)) +(assert_return (invoke "nearest" (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "nearest" (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "nearest" (f32.const -0x1p-149)) (f32.const -0x0p+0)) +(assert_return (invoke "nearest" (f32.const 0x1p-149)) (f32.const 0x0p+0)) +(assert_return (invoke "nearest" (f32.const -0x1p-126)) (f32.const -0x0p+0)) +(assert_return (invoke "nearest" (f32.const 0x1p-126)) (f32.const 0x0p+0)) +(assert_return (invoke "nearest" (f32.const -0x1p-1)) (f32.const -0x0p+0)) +(assert_return (invoke "nearest" (f32.const 0x1p-1)) (f32.const 0x0p+0)) +(assert_return (invoke "nearest" (f32.const -0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "nearest" (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "nearest" (f32.const -0x1.921fb6p+2)) (f32.const -0x1.8p+2)) +(assert_return (invoke "nearest" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.8p+2)) +(assert_return (invoke "nearest" (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "nearest" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "nearest" (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "nearest" (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "nearest" (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "nearest" (f32.const nan)) (f32.const nan)) +(assert_return (invoke "abs" (f32.const -0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "abs" (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "abs" (f32.const -0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "abs" (f32.const 0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "abs" (f32.const -0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "abs" (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "abs" (f32.const -0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "abs" (f32.const 0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "abs" (f32.const -0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "abs" (f32.const 0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "abs" (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "abs" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "abs" (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "abs" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "abs" (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "abs" (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "abs" (f32.const -nan)) (f32.const nan)) +(assert_return (invoke "abs" (f32.const nan)) (f32.const nan)) +(assert_return (invoke "neg" (f32.const -0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "neg" (f32.const 0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "neg" (f32.const -0x1p-149)) (f32.const 0x1p-149)) +(assert_return (invoke "neg" (f32.const 0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "neg" (f32.const -0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "neg" (f32.const 0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "neg" (f32.const -0x1p-1)) (f32.const 0x1p-1)) +(assert_return (invoke "neg" (f32.const 0x1p-1)) (f32.const -0x1p-1)) +(assert_return (invoke "neg" (f32.const -0x1p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "neg" (f32.const 0x1p+0)) (f32.const -0x1p+0)) +(assert_return (invoke "neg" (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2)) +(assert_return (invoke "neg" (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2)) +(assert_return (invoke "neg" (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "neg" (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "neg" (f32.const -infinity)) (f32.const infinity)) +(assert_return (invoke "neg" (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "neg" (f32.const -nan)) (f32.const nan)) +(assert_return (invoke "neg" (f32.const nan)) (f32.const -nan)) diff --git a/js/src/jit-test/tests/wasm/spec/f32.wast.js b/js/src/jit-test/tests/wasm/spec/f32.wast.js new file mode 100644 index 000000000..40ce71b91 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/f32.wast.js @@ -0,0 +1 @@ +var importedArgs = ['f32.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/f32_cmp.wast b/js/src/jit-test/tests/wasm/spec/f32_cmp.wast new file mode 100644 index 000000000..9458069c3 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/f32_cmp.wast @@ -0,0 +1,1956 @@ +;; Test all the f32 comparison operators on major boundary values and all +;; special values. + +(module + (func (export "eq") (param $x f32) (param $y f32) (result i32) (f32.eq (get_local $x) (get_local $y))) + (func (export "ne") (param $x f32) (param $y f32) (result i32) (f32.ne (get_local $x) (get_local $y))) + (func (export "lt") (param $x f32) (param $y f32) (result i32) (f32.lt (get_local $x) (get_local $y))) + (func (export "le") (param $x f32) (param $y f32) (result i32) (f32.le (get_local $x) (get_local $y))) + (func (export "gt") (param $x f32) (param $y f32) (result i32) (f32.gt (get_local $x) (get_local $y))) + (func (export "ge") (param $x f32) (param $y f32) (result i32) (f32.ge (get_local $x) (get_local $y))) +) + +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -infinity) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const infinity) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const -nan) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f32.const nan) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -infinity) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const infinity) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const -nan) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f32.const nan) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -infinity) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const infinity) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const -nan) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f32.const nan) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const infinity) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const infinity) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "le" (f32.const infinity) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const infinity) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "le" (f32.const infinity) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const infinity) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f32.const infinity) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const infinity) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f32.const infinity) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const infinity) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "le" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "le" (f32.const infinity) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const infinity) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f32.const infinity) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const infinity) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -infinity) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const infinity) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const infinity) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const -nan) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f32.const nan) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -infinity) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const infinity) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const -nan) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f32.const nan) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const -0x1p-149)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const 0x1p-149)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const -0x1p-126)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const 0x1p-126)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const -0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const 0x1.fffffep+127)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -infinity) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const infinity) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const -0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const 0x1p-149)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const -0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const 0x1p-126)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const -infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const -nan) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f32.const nan) (f32.const nan)) (i32.const 0)) diff --git a/js/src/jit-test/tests/wasm/spec/f32_cmp.wast.js b/js/src/jit-test/tests/wasm/spec/f32_cmp.wast.js new file mode 100644 index 000000000..7cde94bf3 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/f32_cmp.wast.js @@ -0,0 +1 @@ +var importedArgs = ['f32_cmp.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/f64.wast b/js/src/jit-test/tests/wasm/spec/f64.wast new file mode 100644 index 000000000..26a058a25 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/f64.wast @@ -0,0 +1,2414 @@ +;; Test all the f64 operators on major boundary values and all special +;; values (except comparison operators, which are tested in f64_cmp.wast). + +(module + (func (export "add") (param $x f64) (param $y f64) (result f64) (f64.add (get_local $x) (get_local $y))) + (func (export "sub") (param $x f64) (param $y f64) (result f64) (f64.sub (get_local $x) (get_local $y))) + (func (export "mul") (param $x f64) (param $y f64) (result f64) (f64.mul (get_local $x) (get_local $y))) + (func (export "div") (param $x f64) (param $y f64) (result f64) (f64.div (get_local $x) (get_local $y))) + (func (export "sqrt") (param $x f64) (result f64) (f64.sqrt (get_local $x))) + (func (export "min") (param $x f64) (param $y f64) (result f64) (f64.min (get_local $x) (get_local $y))) + (func (export "max") (param $x f64) (param $y f64) (result f64) (f64.max (get_local $x) (get_local $y))) + (func (export "ceil") (param $x f64) (result f64) (f64.ceil (get_local $x))) + (func (export "floor") (param $x f64) (result f64) (f64.floor (get_local $x))) + (func (export "trunc") (param $x f64) (result f64) (f64.trunc (get_local $x))) + (func (export "nearest") (param $x f64) (result f64) (f64.nearest (get_local $x))) + (func (export "abs") (param $x f64) (result f64) (f64.abs (get_local $x))) + (func (export "neg") (param $x f64) (result f64) (f64.neg (get_local $x))) + (func (export "copysign") (param $x f64) (param $y f64) (result f64) (f64.copysign (get_local $x) (get_local $y))) +) + +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000002p-1022)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000002p-1022)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x1.0000000000001p-1022)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x0.fffffffffffffp-1022)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x0.fffffffffffffp-1022)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x1.0000000000001p-1022)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x1p-1022)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const -0x1p-1022)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const 0x1p-1022)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x1p-1022)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.0000000000001p-1022)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.fffffffffffffp-1022)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.fffffffffffffp-1022)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.0000000000001p-1022)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1021)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1021)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p-1)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p-1)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (f64.const -0x1p-1)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (f64.const 0x1p-1)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p+0)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const 0x1p-1)) (f64.const 0x0p+0)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const -0x1p-1)) (f64.const 0x0p+0)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p+0)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1.8p+0)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1.8p+0)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.b21fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.721fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.721fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.b21fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1.8p+0)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const 0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const -0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1.8p+0)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+1)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const -0x1p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+1)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.d21fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.521fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.521fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.d21fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.b21fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const -0x1.721fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const 0x1.721fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.b21fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.d21fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const -0x1.521fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const 0x1.521fb54442d18p+2)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.d21fb54442d18p+2)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+3)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0p+0)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+3)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0p+0)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "add" (f64.const -infinity) (f64.const -0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const -infinity) (f64.const 0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const infinity) (f64.const -0x0p+0)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const infinity) (f64.const 0x0p+0)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const -infinity) (f64.const -0x1p-1022)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const -infinity) (f64.const 0x1p-1022)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const infinity) (f64.const -0x1p-1022)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const infinity) (f64.const 0x1p-1022)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const -infinity) (f64.const -0x1p-1)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const -infinity) (f64.const 0x1p-1)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const infinity) (f64.const -0x1p-1)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const infinity) (f64.const 0x1p-1)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const -infinity) (f64.const -0x1p+0)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const -infinity) (f64.const 0x1p+0)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const infinity) (f64.const -0x1p+0)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const infinity) (f64.const 0x1p+0)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "add" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const -infinity) (f64.const -infinity)) (f64.const -infinity)) +(assert_return_nan (invoke "add" (f64.const -infinity) (f64.const infinity))) +(assert_return_nan (invoke "add" (f64.const infinity) (f64.const -infinity))) +(assert_return (invoke "add" (f64.const infinity) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "add" (f64.const -infinity) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const -infinity) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "add" (f64.const infinity) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const infinity) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "add" (f64.const -nan) (f64.const -0x0p+0)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const -nan) (f64.const 0x0p+0)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const nan) (f64.const -0x0p+0)) (f64.const nan)) +(assert_return (invoke "add" (f64.const nan) (f64.const 0x0p+0)) (f64.const nan)) +(assert_return (invoke "add" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (f64.const nan)) +(assert_return (invoke "add" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan)) +(assert_return (invoke "add" (f64.const -nan) (f64.const -0x1p-1022)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const -nan) (f64.const 0x1p-1022)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const nan) (f64.const -0x1p-1022)) (f64.const nan)) +(assert_return (invoke "add" (f64.const nan) (f64.const 0x1p-1022)) (f64.const nan)) +(assert_return (invoke "add" (f64.const -nan) (f64.const -0x1p-1)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const -nan) (f64.const 0x1p-1)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const nan) (f64.const -0x1p-1)) (f64.const nan)) +(assert_return (invoke "add" (f64.const nan) (f64.const 0x1p-1)) (f64.const nan)) +(assert_return (invoke "add" (f64.const -nan) (f64.const -0x1p+0)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const -nan) (f64.const 0x1p+0)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const nan) (f64.const -0x1p+0)) (f64.const nan)) +(assert_return (invoke "add" (f64.const nan) (f64.const 0x1p+0)) (f64.const nan)) +(assert_return (invoke "add" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan)) +(assert_return (invoke "add" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan)) +(assert_return (invoke "add" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan)) +(assert_return (invoke "add" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan)) +(assert_return (invoke "add" (f64.const -nan) (f64.const -infinity)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const -nan) (f64.const infinity)) (f64.const -nan)) +(assert_return (invoke "add" (f64.const nan) (f64.const -infinity)) (f64.const nan)) +(assert_return (invoke "add" (f64.const nan) (f64.const infinity)) (f64.const nan)) +(assert_return (invoke "add" (f64.const -nan) (f64.const -nan)) (f64.const -nan)) +(assert_return_nan (invoke "add" (f64.const -nan) (f64.const nan))) +(assert_return_nan (invoke "add" (f64.const nan) (f64.const -nan))) +(assert_return (invoke "add" (f64.const nan) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const -0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const 0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const -0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const 0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const -0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const 0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const -0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const 0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.0000000000002p-1022)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000002p-1022)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const 0x0.fffffffffffffp-1022)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const -0x1.0000000000001p-1022)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const 0x1.0000000000001p-1022)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const -0x0.fffffffffffffp-1022)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x1p-1022)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const -0x1p-1022)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const 0x1p-1022)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x1p-1022)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.fffffffffffffp-1022)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1.0000000000001p-1022)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1.0000000000001p-1022)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.fffffffffffffp-1022)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (f64.const -0x1p-1021)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (f64.const 0x1p-1021)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p-1)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p-1)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (f64.const -0x1p-1)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (f64.const 0x1p-1)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const -0x1p-1)) (f64.const 0x0p+0)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const 0x1p-1)) (f64.const -0x1p+0)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const -0x1p-1)) (f64.const 0x1p+0)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const 0x1p-1)) (f64.const 0x0p+0)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const -0x1p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const 0x1p+0)) (f64.const -0x1.8p+0)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const -0x1p+0)) (f64.const 0x1.8p+0)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const 0x1p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.721fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.b21fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.b21fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.721fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const 0x1p-1)) (f64.const -0x1.8p+0)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const -0x1p-1)) (f64.const 0x1.8p+0)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const -0x1p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const 0x1p+0)) (f64.const -0x1p+1)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const -0x1p+0)) (f64.const 0x1p+1)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.521fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.d21fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.d21fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.521fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.721fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const -0x1.b21fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const 0x1.b21fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.721fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.521fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const -0x1.d21fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const 0x1.d21fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.521fb54442d18p+2)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0p+0)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+3)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+3)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0p+0)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const -infinity) (f64.const -0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const -infinity) (f64.const 0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const infinity) (f64.const -0x0p+0)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const infinity) (f64.const 0x0p+0)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const -infinity) (f64.const -0x1p-1022)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const -infinity) (f64.const 0x1p-1022)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const infinity) (f64.const -0x1p-1022)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const infinity) (f64.const 0x1p-1022)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const -infinity) (f64.const -0x1p-1)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const -infinity) (f64.const 0x1p-1)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const infinity) (f64.const -0x1p-1)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const infinity) (f64.const 0x1p-1)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const -infinity) (f64.const -0x1p+0)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const -infinity) (f64.const 0x1p+0)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const infinity) (f64.const -0x1p+0)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const infinity) (f64.const 0x1p+0)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return (invoke "sub" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return_nan (invoke "sub" (f64.const -infinity) (f64.const -infinity))) +(assert_return (invoke "sub" (f64.const -infinity) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "sub" (f64.const infinity) (f64.const -infinity)) (f64.const infinity)) +(assert_return_nan (invoke "sub" (f64.const infinity) (f64.const infinity))) +(assert_return (invoke "sub" (f64.const -infinity) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const -infinity) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const infinity) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const infinity) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const -nan) (f64.const -0x0p+0)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const -nan) (f64.const 0x0p+0)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const nan) (f64.const -0x0p+0)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const nan) (f64.const 0x0p+0)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const -nan) (f64.const -0x1p-1022)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const -nan) (f64.const 0x1p-1022)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const nan) (f64.const -0x1p-1022)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const nan) (f64.const 0x1p-1022)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const -nan) (f64.const -0x1p-1)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const -nan) (f64.const 0x1p-1)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const nan) (f64.const -0x1p-1)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const nan) (f64.const 0x1p-1)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const -nan) (f64.const -0x1p+0)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const -nan) (f64.const 0x1p+0)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const nan) (f64.const -0x1p+0)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const nan) (f64.const 0x1p+0)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const -nan) (f64.const -infinity)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const -nan) (f64.const infinity)) (f64.const -nan)) +(assert_return (invoke "sub" (f64.const nan) (f64.const -infinity)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const nan) (f64.const infinity)) (f64.const nan)) +(assert_return (invoke "sub" (f64.const -nan) (f64.const -nan)) (f64.const -nan)) +(assert_return_nan (invoke "sub" (f64.const -nan) (f64.const nan))) +(assert_return_nan (invoke "sub" (f64.const nan) (f64.const -nan))) +(assert_return (invoke "sub" (f64.const nan) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const -0x1p-1)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const 0x1p-1)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const -0x1p-1)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const 0x1p-1)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const -0x1p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const 0x1p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const -0x1p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0)) +(assert_return_nan (invoke "mul" (f64.const -0x0p+0) (f64.const -infinity))) +(assert_return_nan (invoke "mul" (f64.const -0x0p+0) (f64.const infinity))) +(assert_return_nan (invoke "mul" (f64.const 0x0p+0) (f64.const -infinity))) +(assert_return_nan (invoke "mul" (f64.const 0x0p+0) (f64.const infinity))) +(assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0.0000000000006p-1022)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x0.0000000000006p-1022)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0.0000000000006p-1022)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0.0000000000006p-1022)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp-51)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp-51)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp-51)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp-51)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (f64.const 0x0.8p-1022)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (f64.const -0x0.8p-1022)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x0.8p-1022)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x0.8p-1022)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (f64.const 0x1p-1022)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (f64.const -0x1p-1022)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p-1022)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p-1022)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p-1020)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p-1020)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p-1020)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p-1020)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (f64.const 0x0.8p-1022)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (f64.const -0x0.8p-1022)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x0.8p-1022)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x0.8p-1022)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const -0x1p-1)) (f64.const 0x1p-2)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const 0x1p-1)) (f64.const -0x1p-2)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p-2)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p-2)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const -0x1p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const 0x1p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+1)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+1)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+1)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+1)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1022)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1022)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1022)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1022)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const -0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const 0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const -0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const 0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000006p-1022)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.0000000000006p-1022)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000006p-1022)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000006p-1022)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const 0x1.921fb54442d18p-1020)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const -0x1.921fb54442d18p-1020)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1.921fb54442d18p-1020)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1.921fb54442d18p-1020)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const 0x1.921fb54442d18p+1)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const -0x1.921fb54442d18p+1)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.921fb54442d18p+1)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.921fb54442d18p+1)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.3bd3cc9be45dep+5)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.3bd3cc9be45dep+5)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.3bd3cc9be45dep+5)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.3bd3cc9be45dep+5)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp-51)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp-51)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp-51)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp-51)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const 0x1.fffffffffffffp+1)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const -0x1.fffffffffffffp+1)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1.fffffffffffffp+1)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1.fffffffffffffp+1)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const 0x1.fffffffffffffp+1022)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const -0x1.fffffffffffffp+1022)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1.fffffffffffffp+1022)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp+1022)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan)) +(assert_return_nan (invoke "mul" (f64.const -infinity) (f64.const -0x0p+0))) +(assert_return_nan (invoke "mul" (f64.const -infinity) (f64.const 0x0p+0))) +(assert_return_nan (invoke "mul" (f64.const infinity) (f64.const -0x0p+0))) +(assert_return_nan (invoke "mul" (f64.const infinity) (f64.const 0x0p+0))) +(assert_return (invoke "mul" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -infinity) (f64.const -0x1p-1022)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -infinity) (f64.const 0x1p-1022)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const infinity) (f64.const -0x1p-1022)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const infinity) (f64.const 0x1p-1022)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -infinity) (f64.const -0x1p-1)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -infinity) (f64.const 0x1p-1)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const infinity) (f64.const -0x1p-1)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const infinity) (f64.const 0x1p-1)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -infinity) (f64.const -0x1p+0)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -infinity) (f64.const 0x1p+0)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const infinity) (f64.const -0x1p+0)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const infinity) (f64.const 0x1p+0)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -infinity) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -infinity) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const infinity) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "mul" (f64.const infinity) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "mul" (f64.const -infinity) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const -infinity) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const infinity) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const infinity) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const -nan) (f64.const -0x0p+0)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const -nan) (f64.const 0x0p+0)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const nan) (f64.const -0x0p+0)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const nan) (f64.const 0x0p+0)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const -nan) (f64.const -0x1p-1022)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const -nan) (f64.const 0x1p-1022)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const nan) (f64.const -0x1p-1022)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const nan) (f64.const 0x1p-1022)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const -nan) (f64.const -0x1p-1)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const -nan) (f64.const 0x1p-1)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const nan) (f64.const -0x1p-1)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const nan) (f64.const 0x1p-1)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const -nan) (f64.const -0x1p+0)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const -nan) (f64.const 0x1p+0)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const nan) (f64.const -0x1p+0)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const nan) (f64.const 0x1p+0)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const -nan) (f64.const -infinity)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const -nan) (f64.const infinity)) (f64.const -nan)) +(assert_return (invoke "mul" (f64.const nan) (f64.const -infinity)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const nan) (f64.const infinity)) (f64.const nan)) +(assert_return (invoke "mul" (f64.const -nan) (f64.const -nan)) (f64.const -nan)) +(assert_return_nan (invoke "mul" (f64.const -nan) (f64.const nan))) +(assert_return_nan (invoke "mul" (f64.const nan) (f64.const -nan))) +(assert_return (invoke "mul" (f64.const nan) (f64.const nan)) (f64.const nan)) +(assert_return_nan (invoke "div" (f64.const -0x0p+0) (f64.const -0x0p+0))) +(assert_return_nan (invoke "div" (f64.const -0x0p+0) (f64.const 0x0p+0))) +(assert_return_nan (invoke "div" (f64.const 0x0p+0) (f64.const -0x0p+0))) +(assert_return_nan (invoke "div" (f64.const 0x0p+0) (f64.const 0x0p+0))) +(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const -0x1p-1)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const 0x1p-1)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const -0x1p-1)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const 0x1p-1)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const -0x1p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const 0x1p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const -0x1p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const -infinity)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const -infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const infinity)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const 0x1p-52)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const -0x1p-52)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-52)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-52)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const 0x0.0000000000002p-1022)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const -0x0.0000000000002p-1022)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x0.0000000000002p-1022)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x0.0000000000002p-1022)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p+52)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p+52)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+52)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+52)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (f64.const 0x1p-1021)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (f64.const -0x1p-1021)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1021)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1021)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (f64.const 0x1p-1022)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (f64.const -0x1p-1022)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p-1022)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p-1022)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0.28be60db9391p-1022)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x0.28be60db9391p-1022)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0.28be60db9391p-1022)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0.28be60db9391p-1022)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const -infinity)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const -infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const infinity)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (f64.const 0x1p+1021)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (f64.const -0x1p+1021)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p+1021)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p+1021)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const -0x1p-1)) (f64.const 0x1p+0)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const 0x1p-1)) (f64.const -0x1p+0)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p+0)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p+0)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const -0x1p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const 0x1p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.45f306dc9c883p-4)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.45f306dc9c883p-4)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.45f306dc9c883p-4)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.45f306dc9c883p-4)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0.2p-1022)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0.2p-1022)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0.2p-1022)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.2p-1022)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const -infinity)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const -infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const infinity)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (f64.const 0x1p+1022)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (f64.const -0x1p+1022)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p+1022)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p+1022)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const -0x1p-1)) (f64.const 0x1p+1)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const 0x1p-1)) (f64.const -0x1p+1)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p+1)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p+1)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const -0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const 0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.45f306dc9c883p-3)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.45f306dc9c883p-3)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.45f306dc9c883p-3)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.45f306dc9c883p-3)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0.4p-1022)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0.4p-1022)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0.4p-1022)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.4p-1022)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const -infinity)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const -infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const infinity)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const 0x1.921fb54442d18p+3)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const -0x1.921fb54442d18p+3)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.921fb54442d18p+3)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.921fb54442d18p+3)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1p+0)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1p+0)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p+0)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p+0)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d19p-1022)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d19p-1022)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d19p-1022)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d19p-1022)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.45f306dc9c882p+1021)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.45f306dc9c882p+1021)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.45f306dc9c882p+1021)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.45f306dc9c882p+1021)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1p+0)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1p+0)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p+0)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p+0)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const 0x0p+0)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "div" (f64.const -infinity) (f64.const -0x0p+0)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -infinity) (f64.const 0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const infinity) (f64.const -0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const infinity) (f64.const 0x0p+0)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -infinity) (f64.const -0x1p-1022)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -infinity) (f64.const 0x1p-1022)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const infinity) (f64.const -0x1p-1022)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const infinity) (f64.const 0x1p-1022)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -infinity) (f64.const -0x1p-1)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -infinity) (f64.const 0x1p-1)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const infinity) (f64.const -0x1p-1)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const infinity) (f64.const 0x1p-1)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -infinity) (f64.const -0x1p+0)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -infinity) (f64.const 0x1p+0)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const infinity) (f64.const -0x1p+0)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const infinity) (f64.const 0x1p+0)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return (invoke "div" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "div" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return_nan (invoke "div" (f64.const -infinity) (f64.const -infinity))) +(assert_return_nan (invoke "div" (f64.const -infinity) (f64.const infinity))) +(assert_return_nan (invoke "div" (f64.const infinity) (f64.const -infinity))) +(assert_return_nan (invoke "div" (f64.const infinity) (f64.const infinity))) +(assert_return (invoke "div" (f64.const -infinity) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const -infinity) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "div" (f64.const infinity) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const infinity) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "div" (f64.const -nan) (f64.const -0x0p+0)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const -nan) (f64.const 0x0p+0)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const nan) (f64.const -0x0p+0)) (f64.const nan)) +(assert_return (invoke "div" (f64.const nan) (f64.const 0x0p+0)) (f64.const nan)) +(assert_return (invoke "div" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (f64.const nan)) +(assert_return (invoke "div" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan)) +(assert_return (invoke "div" (f64.const -nan) (f64.const -0x1p-1022)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const -nan) (f64.const 0x1p-1022)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const nan) (f64.const -0x1p-1022)) (f64.const nan)) +(assert_return (invoke "div" (f64.const nan) (f64.const 0x1p-1022)) (f64.const nan)) +(assert_return (invoke "div" (f64.const -nan) (f64.const -0x1p-1)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const -nan) (f64.const 0x1p-1)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const nan) (f64.const -0x1p-1)) (f64.const nan)) +(assert_return (invoke "div" (f64.const nan) (f64.const 0x1p-1)) (f64.const nan)) +(assert_return (invoke "div" (f64.const -nan) (f64.const -0x1p+0)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const -nan) (f64.const 0x1p+0)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const nan) (f64.const -0x1p+0)) (f64.const nan)) +(assert_return (invoke "div" (f64.const nan) (f64.const 0x1p+0)) (f64.const nan)) +(assert_return (invoke "div" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan)) +(assert_return (invoke "div" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan)) +(assert_return (invoke "div" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan)) +(assert_return (invoke "div" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan)) +(assert_return (invoke "div" (f64.const -nan) (f64.const -infinity)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const -nan) (f64.const infinity)) (f64.const -nan)) +(assert_return (invoke "div" (f64.const nan) (f64.const -infinity)) (f64.const nan)) +(assert_return (invoke "div" (f64.const nan) (f64.const infinity)) (f64.const nan)) +(assert_return (invoke "div" (f64.const -nan) (f64.const -nan)) (f64.const -nan)) +(assert_return_nan (invoke "div" (f64.const -nan) (f64.const nan))) +(assert_return_nan (invoke "div" (f64.const nan) (f64.const -nan))) +(assert_return (invoke "div" (f64.const nan) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const 0x1p-1)) (f64.const -0x0p+0)) +(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const 0x1p-1)) (f64.const 0x0p+0)) +(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const 0x1p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x0p+0)) +(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0)) +(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0p+0)) +(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0)) +(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const infinity)) (f64.const 0x0p+0)) +(assert_return_nan (invoke "min" (f64.const -0x0p+0) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const -0x0p+0) (f64.const nan))) +(assert_return_nan (invoke "min" (f64.const 0x0p+0) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const 0x0p+0) (f64.const nan))) +(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (f64.const 0x0.0000000000001p-1022)) +(assert_return_nan (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const nan))) +(assert_return_nan (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const nan))) +(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1022)) +(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p-1022)) +(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1022)) +(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1022)) +(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const infinity)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const infinity)) (f64.const 0x1p-1022)) +(assert_return_nan (invoke "min" (f64.const -0x1p-1022) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const -0x1p-1022) (f64.const nan))) +(assert_return_nan (invoke "min" (f64.const 0x1p-1022) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const 0x1p-1022) (f64.const nan))) +(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const 0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const 0x1p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1)) +(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1)) +(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const infinity)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const infinity)) (f64.const 0x1p-1)) +(assert_return_nan (invoke "min" (f64.const -0x1p-1) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const -0x1p-1) (f64.const nan))) +(assert_return_nan (invoke "min" (f64.const 0x1p-1) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const 0x1p-1) (f64.const nan))) +(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const 0x1p-1)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const 0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p+0)) +(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p+0)) +(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const infinity)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const infinity)) (f64.const 0x1p+0)) +(assert_return_nan (invoke "min" (f64.const -0x1p+0) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const -0x1p+0) (f64.const nan))) +(assert_return_nan (invoke "min" (f64.const 0x1p+0) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const 0x1p+0) (f64.const nan))) +(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return_nan (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const nan))) +(assert_return_nan (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const nan))) +(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return_nan (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan))) +(assert_return_nan (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan))) +(assert_return (invoke "min" (f64.const -infinity) (f64.const -0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const -infinity) (f64.const 0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const infinity) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "min" (f64.const infinity) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "min" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "min" (f64.const -infinity) (f64.const -0x1p-1022)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const -infinity) (f64.const 0x1p-1022)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const infinity) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "min" (f64.const infinity) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "min" (f64.const -infinity) (f64.const -0x1p-1)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const -infinity) (f64.const 0x1p-1)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const infinity) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "min" (f64.const infinity) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "min" (f64.const -infinity) (f64.const -0x1p+0)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const -infinity) (f64.const 0x1p+0)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const infinity) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "min" (f64.const infinity) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "min" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "min" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "min" (f64.const -infinity) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const -infinity) (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const infinity) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "min" (f64.const infinity) (f64.const infinity)) (f64.const infinity)) +(assert_return_nan (invoke "min" (f64.const -infinity) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const -infinity) (f64.const nan))) +(assert_return_nan (invoke "min" (f64.const infinity) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const infinity) (f64.const nan))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const -0x0p+0))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const 0x0p+0))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const -0x0p+0))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const 0x0p+0))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const -0x0.0000000000001p-1022))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const 0x0.0000000000001p-1022))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const -0x0.0000000000001p-1022))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const 0x0.0000000000001p-1022))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const -0x1p-1022))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const 0x1p-1022))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const -0x1p-1022))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const 0x1p-1022))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const -0x1p-1))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const 0x1p-1))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const -0x1p-1))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const 0x1p-1))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const -0x1p+0))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const 0x1p+0))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const -0x1p+0))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const 0x1p+0))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const -0x1.921fb54442d18p+2))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const 0x1.921fb54442d18p+2))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const -infinity))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const infinity))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const -infinity))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const infinity))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const -nan) (f64.const nan))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const -nan))) +(assert_return_nan (invoke "min" (f64.const nan) (f64.const nan))) +(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const -0x1p-1)) (f64.const -0x0p+0)) +(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const -0x1p-1)) (f64.const 0x0p+0)) +(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const -0x1p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const -0x1p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0p+0)) +(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0p+0)) +(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0)) +(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0p+0)) +(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const -infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const -infinity)) (f64.const 0x0p+0)) +(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const infinity)) (f64.const infinity)) +(assert_return_nan (invoke "max" (f64.const -0x0p+0) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const -0x0p+0) (f64.const nan))) +(assert_return_nan (invoke "max" (f64.const 0x0p+0) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const 0x0p+0) (f64.const nan))) +(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (f64.const infinity)) +(assert_return_nan (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const nan))) +(assert_return_nan (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const nan))) +(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1022)) +(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p-1022)) +(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1022)) +(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1022)) +(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const -infinity)) (f64.const -0x1p-1022)) +(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const -infinity)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const infinity)) (f64.const infinity)) +(assert_return_nan (invoke "max" (f64.const -0x1p-1022) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const -0x1p-1022) (f64.const nan))) +(assert_return_nan (invoke "max" (f64.const 0x1p-1022) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const 0x1p-1022) (f64.const nan))) +(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const -0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const -0x1p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1)) +(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1)) +(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const -infinity)) (f64.const -0x1p-1)) +(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const -infinity)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const infinity)) (f64.const infinity)) +(assert_return_nan (invoke "max" (f64.const -0x1p-1) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const -0x1p-1) (f64.const nan))) +(assert_return_nan (invoke "max" (f64.const 0x1p-1) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const 0x1p-1) (f64.const nan))) +(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const -0x1p-1)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const -0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p+0)) +(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p+0)) +(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const -infinity)) (f64.const -0x1p+0)) +(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const -infinity)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const infinity)) (f64.const infinity)) +(assert_return_nan (invoke "max" (f64.const -0x1p+0) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const -0x1p+0) (f64.const nan))) +(assert_return_nan (invoke "max" (f64.const 0x1p+0) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const 0x1p+0) (f64.const nan))) +(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const infinity)) +(assert_return_nan (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const nan))) +(assert_return_nan (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const nan))) +(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const infinity)) +(assert_return_nan (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan))) +(assert_return_nan (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan))) +(assert_return (invoke "max" (f64.const -infinity) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "max" (f64.const -infinity) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "max" (f64.const infinity) (f64.const -0x0p+0)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const infinity) (f64.const 0x0p+0)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "max" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const -infinity) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "max" (f64.const -infinity) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "max" (f64.const infinity) (f64.const -0x1p-1022)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const infinity) (f64.const 0x1p-1022)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const -infinity) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "max" (f64.const -infinity) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "max" (f64.const infinity) (f64.const -0x1p-1)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const infinity) (f64.const 0x1p-1)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const -infinity) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "max" (f64.const -infinity) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "max" (f64.const infinity) (f64.const -0x1p+0)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const infinity) (f64.const 0x1p+0)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "max" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "max" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const -infinity) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "max" (f64.const -infinity) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const infinity) (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "max" (f64.const infinity) (f64.const infinity)) (f64.const infinity)) +(assert_return_nan (invoke "max" (f64.const -infinity) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const -infinity) (f64.const nan))) +(assert_return_nan (invoke "max" (f64.const infinity) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const infinity) (f64.const nan))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const -0x0p+0))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const 0x0p+0))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const -0x0p+0))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const 0x0p+0))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const -0x0.0000000000001p-1022))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const 0x0.0000000000001p-1022))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const -0x0.0000000000001p-1022))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const 0x0.0000000000001p-1022))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const -0x1p-1022))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const 0x1p-1022))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const -0x1p-1022))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const 0x1p-1022))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const -0x1p-1))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const 0x1p-1))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const -0x1p-1))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const 0x1p-1))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const -0x1p+0))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const 0x1p+0))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const -0x1p+0))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const 0x1p+0))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const -0x1.921fb54442d18p+2))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const 0x1.921fb54442d18p+2))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const -infinity))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const infinity))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const -infinity))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const infinity))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const -nan) (f64.const nan))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const -nan))) +(assert_return_nan (invoke "max" (f64.const nan) (f64.const nan))) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x1p-1)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x1p-1)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x1p-1)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x1p-1)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x1p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x1p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const infinity)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -infinity)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const infinity)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -nan)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const nan)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -nan)) (f64.const -0x0p+0)) +(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const nan)) (f64.const 0x0p+0)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -infinity)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const infinity)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -infinity)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const infinity)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -nan)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const nan)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -nan)) (f64.const -0x1p-1022)) +(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const nan)) (f64.const 0x1p-1022)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -infinity)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const infinity)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -infinity)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const infinity)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -nan)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const nan)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -nan)) (f64.const -0x1p-1)) +(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const nan)) (f64.const 0x1p-1)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -infinity)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const infinity)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -infinity)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const infinity)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -nan)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const nan)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -nan)) (f64.const -0x1p+0)) +(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const nan)) (f64.const 0x1p+0)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const 0x0p+0)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const -0x0p+0)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const 0x0p+0)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -0x1p-1022)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const 0x1p-1022)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const -0x1p-1022)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const 0x1p-1022)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -0x1p-1)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const 0x1p-1)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const -0x1p-1)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const 0x1p-1)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -0x1p+0)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const 0x1p+0)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const -0x1p+0)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const 0x1p+0)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -nan)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const -infinity) (f64.const nan)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const -nan)) (f64.const -infinity)) +(assert_return (invoke "copysign" (f64.const infinity) (f64.const nan)) (f64.const infinity)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const -0x0p+0)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const 0x0p+0)) (f64.const nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const -0x0p+0)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const 0x0p+0)) (f64.const nan)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const -0x1p-1022)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const 0x1p-1022)) (f64.const nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const -0x1p-1022)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const 0x1p-1022)) (f64.const nan)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const -0x1p-1)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const 0x1p-1)) (f64.const nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const -0x1p-1)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const 0x1p-1)) (f64.const nan)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const -0x1p+0)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const 0x1p+0)) (f64.const nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const -0x1p+0)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const 0x1p+0)) (f64.const nan)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const -infinity)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const infinity)) (f64.const nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const -infinity)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const infinity)) (f64.const nan)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const -nan) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "copysign" (f64.const nan) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "sqrt" (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "sqrt" (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return_nan (invoke "sqrt" (f64.const -0x0.0000000000001p-1022))) +(assert_return (invoke "sqrt" (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-537)) +(assert_return_nan (invoke "sqrt" (f64.const -0x1p-1022))) +(assert_return (invoke "sqrt" (f64.const 0x1p-1022)) (f64.const 0x1p-511)) +(assert_return_nan (invoke "sqrt" (f64.const -0x1p-1))) +(assert_return (invoke "sqrt" (f64.const 0x1p-1)) (f64.const 0x1.6a09e667f3bcdp-1)) +(assert_return_nan (invoke "sqrt" (f64.const -0x1p+0))) +(assert_return (invoke "sqrt" (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return_nan (invoke "sqrt" (f64.const -0x1.921fb54442d18p+2))) +(assert_return (invoke "sqrt" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.40d931ff62705p+1)) +(assert_return_nan (invoke "sqrt" (f64.const -0x1.fffffffffffffp+1023))) +(assert_return (invoke "sqrt" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+511)) +(assert_return_nan (invoke "sqrt" (f64.const -infinity))) +(assert_return (invoke "sqrt" (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "sqrt" (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "sqrt" (f64.const nan)) (f64.const nan)) +(assert_return (invoke "floor" (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "floor" (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "floor" (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "floor" (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "floor" (f64.const -0x1p-1022)) (f64.const -0x1p+0)) +(assert_return (invoke "floor" (f64.const 0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "floor" (f64.const -0x1p-1)) (f64.const -0x1p+0)) +(assert_return (invoke "floor" (f64.const 0x1p-1)) (f64.const 0x0p+0)) +(assert_return (invoke "floor" (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "floor" (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "floor" (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.cp+2)) +(assert_return (invoke "floor" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.8p+2)) +(assert_return (invoke "floor" (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "floor" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "floor" (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "floor" (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "floor" (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "floor" (f64.const nan)) (f64.const nan)) +(assert_return (invoke "ceil" (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "ceil" (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "ceil" (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "ceil" (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "ceil" (f64.const -0x1p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "ceil" (f64.const 0x1p-1022)) (f64.const 0x1p+0)) +(assert_return (invoke "ceil" (f64.const -0x1p-1)) (f64.const -0x0p+0)) +(assert_return (invoke "ceil" (f64.const 0x1p-1)) (f64.const 0x1p+0)) +(assert_return (invoke "ceil" (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "ceil" (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "ceil" (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.8p+2)) +(assert_return (invoke "ceil" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.cp+2)) +(assert_return (invoke "ceil" (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "ceil" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "ceil" (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "ceil" (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "ceil" (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "ceil" (f64.const nan)) (f64.const nan)) +(assert_return (invoke "trunc" (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "trunc" (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "trunc" (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "trunc" (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "trunc" (f64.const -0x1p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "trunc" (f64.const 0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "trunc" (f64.const -0x1p-1)) (f64.const -0x0p+0)) +(assert_return (invoke "trunc" (f64.const 0x1p-1)) (f64.const 0x0p+0)) +(assert_return (invoke "trunc" (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "trunc" (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "trunc" (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.8p+2)) +(assert_return (invoke "trunc" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.8p+2)) +(assert_return (invoke "trunc" (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "trunc" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "trunc" (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "trunc" (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "trunc" (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "trunc" (f64.const nan)) (f64.const nan)) +(assert_return (invoke "nearest" (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "nearest" (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "nearest" (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "nearest" (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "nearest" (f64.const -0x1p-1022)) (f64.const -0x0p+0)) +(assert_return (invoke "nearest" (f64.const 0x1p-1022)) (f64.const 0x0p+0)) +(assert_return (invoke "nearest" (f64.const -0x1p-1)) (f64.const -0x0p+0)) +(assert_return (invoke "nearest" (f64.const 0x1p-1)) (f64.const 0x0p+0)) +(assert_return (invoke "nearest" (f64.const -0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "nearest" (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "nearest" (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.8p+2)) +(assert_return (invoke "nearest" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.8p+2)) +(assert_return (invoke "nearest" (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "nearest" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "nearest" (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "nearest" (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "nearest" (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "nearest" (f64.const nan)) (f64.const nan)) +(assert_return (invoke "abs" (f64.const -0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "abs" (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "abs" (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "abs" (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "abs" (f64.const -0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "abs" (f64.const 0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "abs" (f64.const -0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "abs" (f64.const 0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "abs" (f64.const -0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "abs" (f64.const 0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "abs" (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "abs" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "abs" (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "abs" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "abs" (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "abs" (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "abs" (f64.const -nan)) (f64.const nan)) +(assert_return (invoke "abs" (f64.const nan)) (f64.const nan)) +(assert_return (invoke "neg" (f64.const -0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "neg" (f64.const 0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "neg" (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022)) +(assert_return (invoke "neg" (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022)) +(assert_return (invoke "neg" (f64.const -0x1p-1022)) (f64.const 0x1p-1022)) +(assert_return (invoke "neg" (f64.const 0x1p-1022)) (f64.const -0x1p-1022)) +(assert_return (invoke "neg" (f64.const -0x1p-1)) (f64.const 0x1p-1)) +(assert_return (invoke "neg" (f64.const 0x1p-1)) (f64.const -0x1p-1)) +(assert_return (invoke "neg" (f64.const -0x1p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "neg" (f64.const 0x1p+0)) (f64.const -0x1p+0)) +(assert_return (invoke "neg" (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2)) +(assert_return (invoke "neg" (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2)) +(assert_return (invoke "neg" (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023)) +(assert_return (invoke "neg" (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023)) +(assert_return (invoke "neg" (f64.const -infinity)) (f64.const infinity)) +(assert_return (invoke "neg" (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "neg" (f64.const -nan)) (f64.const nan)) +(assert_return (invoke "neg" (f64.const nan)) (f64.const -nan)) diff --git a/js/src/jit-test/tests/wasm/spec/f64.wast.js b/js/src/jit-test/tests/wasm/spec/f64.wast.js new file mode 100644 index 000000000..5e0957bd1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/f64.wast.js @@ -0,0 +1 @@ +var importedArgs = ['f64.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/f64_cmp.wast b/js/src/jit-test/tests/wasm/spec/f64_cmp.wast new file mode 100644 index 000000000..f4958b8f9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/f64_cmp.wast @@ -0,0 +1,1956 @@ +;; Test all the f64 comparison operators on major boundary values and all +;; special values. + +(module + (func (export "eq") (param $x f64) (param $y f64) (result i32) (f64.eq (get_local $x) (get_local $y))) + (func (export "ne") (param $x f64) (param $y f64) (result i32) (f64.ne (get_local $x) (get_local $y))) + (func (export "lt") (param $x f64) (param $y f64) (result i32) (f64.lt (get_local $x) (get_local $y))) + (func (export "le") (param $x f64) (param $y f64) (result i32) (f64.le (get_local $x) (get_local $y))) + (func (export "gt") (param $x f64) (param $y f64) (result i32) (f64.gt (get_local $x) (get_local $y))) + (func (export "ge") (param $x f64) (param $y f64) (result i32) (f64.ge (get_local $x) (get_local $y))) +) + +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -infinity) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const infinity) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const -nan) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "eq" (f64.const nan) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -infinity) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const infinity) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const -nan) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const -nan)) (i32.const 1)) +(assert_return (invoke "ne" (f64.const nan) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -infinity) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const infinity) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const -nan) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "lt" (f64.const nan) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const infinity) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const infinity) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "le" (f64.const infinity) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const infinity) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "le" (f64.const infinity) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const infinity) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "le" (f64.const infinity) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const infinity) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "le" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "le" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f64.const infinity) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const infinity) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -infinity) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const infinity) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const infinity) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const -nan) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "le" (f64.const nan) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -infinity) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const infinity) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const -nan) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "gt" (f64.const nan) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const -0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const 0x0p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const -0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const 0x1p-1022)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const -0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const 0x1p-1)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const -0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const -infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const infinity)) (i32.const 1)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -infinity) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const infinity) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const -0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const 0x0p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const -0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const 0x1p-1)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const -0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const 0x1p+0)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const -infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const infinity)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const -nan) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const -nan)) (i32.const 0)) +(assert_return (invoke "ge" (f64.const nan) (f64.const nan)) (i32.const 0)) diff --git a/js/src/jit-test/tests/wasm/spec/f64_cmp.wast.js b/js/src/jit-test/tests/wasm/spec/f64_cmp.wast.js new file mode 100644 index 000000000..59af4e936 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/f64_cmp.wast.js @@ -0,0 +1 @@ +var importedArgs = ['f64_cmp.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/fac.wast b/js/src/jit-test/tests/wasm/spec/fac.wast new file mode 100644 index 000000000..be587520c --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/fac.wast @@ -0,0 +1,85 @@ +(module + ;; Recursive factorial + (func (export "fac-rec") (param i64) (result i64) + (if i64 (i64.eq (get_local 0) (i64.const 0)) + (i64.const 1) + (i64.mul (get_local 0) (call 0 (i64.sub (get_local 0) (i64.const 1)))) + ) + ) + + ;; Recursive factorial named + (func $fac-rec-named (export "fac-rec-named") (param $n i64) (result i64) + (if i64 (i64.eq (get_local $n) (i64.const 0)) + (i64.const 1) + (i64.mul + (get_local $n) + (call $fac-rec-named (i64.sub (get_local $n) (i64.const 1))) + ) + ) + ) + + ;; Iterative factorial + (func (export "fac-iter") (param i64) (result i64) + (local i64 i64) + (set_local 1 (get_local 0)) + (set_local 2 (i64.const 1)) + (block + (loop + (if + (i64.eq (get_local 1) (i64.const 0)) + (br 2) + (block + (set_local 2 (i64.mul (get_local 1) (get_local 2))) + (set_local 1 (i64.sub (get_local 1) (i64.const 1))) + ) + ) + (br 0) + ) + ) + (get_local 2) + ) + + ;; Iterative factorial named + (func (export "fac-iter-named") (param $n i64) (result i64) + (local $i i64) + (local $res i64) + (set_local $i (get_local $n)) + (set_local $res (i64.const 1)) + (block $done + (loop $loop + (if + (i64.eq (get_local $i) (i64.const 0)) + (br $done) + (block + (set_local $res (i64.mul (get_local $i) (get_local $res))) + (set_local $i (i64.sub (get_local $i) (i64.const 1))) + ) + ) + (br $loop) + ) + ) + (get_local $res) + ) + + ;; Optimized factorial. + (func (export "fac-opt") (param i64) (result i64) + (local i64) + (set_local 1 (i64.const 1)) + (block + (br_if 0 (i64.lt_s (get_local 0) (i64.const 2))) + (loop + (set_local 1 (i64.mul (get_local 1) (get_local 0))) + (set_local 0 (i64.add (get_local 0) (i64.const -1))) + (br_if 0 (i64.gt_s (get_local 0) (i64.const 1))) + ) + ) + (get_local 1) + ) +) + +(assert_return (invoke "fac-rec" (i64.const 25)) (i64.const 7034535277573963776)) +(assert_return (invoke "fac-iter" (i64.const 25)) (i64.const 7034535277573963776)) +(assert_return (invoke "fac-rec-named" (i64.const 25)) (i64.const 7034535277573963776)) +(assert_return (invoke "fac-iter-named" (i64.const 25)) (i64.const 7034535277573963776)) +(assert_return (invoke "fac-opt" (i64.const 25)) (i64.const 7034535277573963776)) +(assert_trap (invoke "fac-rec" (i64.const 1073741824)) "call stack exhausted") diff --git a/js/src/jit-test/tests/wasm/spec/fac.wast.js b/js/src/jit-test/tests/wasm/spec/fac.wast.js new file mode 100644 index 000000000..5d30e518a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/fac.wast.js @@ -0,0 +1 @@ +var importedArgs = ['fac.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/float_exprs.wast b/js/src/jit-test/tests/wasm/spec/float_exprs.wast new file mode 100644 index 000000000..ad8f769f0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/float_exprs.wast @@ -0,0 +1,1979 @@ +;; Test interesting floating-point "expressions". These tests contain code +;; patterns which tempt common value-changing optimizations. + +;; Test that x*y+z is not done with x87-style intermediate precision. + +(module + (func (export "f64.no_contraction") (param $x f64) (param $y f64) (param $z f64) (result f64) + (f64.add (f64.mul (get_local $x) (get_local $y)) (get_local $z))) +) + +(assert_return (invoke "f64.no_contraction" (f64.const -0x1.9e87ce14273afp-103) (f64.const 0x1.2515ad31db63ep+664) (f64.const 0x1.868c6685e6185p+533)) (f64.const -0x1.da94885b11493p+561)) +(assert_return (invoke "f64.no_contraction" (f64.const 0x1.da21c460a6f44p+52) (f64.const 0x1.60859d2e7714ap-321) (f64.const 0x1.e63f1b7b660e1p-302)) (f64.const 0x1.4672f256d1794p-268)) +(assert_return (invoke "f64.no_contraction" (f64.const -0x1.f3eaf43f327cp-594) (f64.const 0x1.dfcc009906b57p+533) (f64.const 0x1.5984e03c520a1p-104)) (f64.const -0x1.d4797fb3db166p-60)) +(assert_return (invoke "f64.no_contraction" (f64.const 0x1.dab6c772cb2e2p-69) (f64.const -0x1.d761663679a84p-101) (f64.const 0x1.f22f92c843226p-218)) (f64.const -0x1.b50d72dfcef68p-169)) +(assert_return (invoke "f64.no_contraction" (f64.const -0x1.87c5def1e4d3dp-950) (f64.const -0x1.50cd5dab2207fp+935) (f64.const 0x1.e629bd0da8c5dp-54)) (f64.const 0x1.01b6feb4e78a7p-14)) + +;; Test that x*y+z is not folded to fma. + +(module + (func (export "f32.no_fma") (param $x f32) (param $y f32) (param $z f32) (result f32) + (f32.add (f32.mul (get_local $x) (get_local $y)) (get_local $z))) + (func (export "f64.no_fma") (param $x f64) (param $y f64) (param $z f64) (result f64) + (f64.add (f64.mul (get_local $x) (get_local $y)) (get_local $z))) +) + +(assert_return (invoke "f32.no_fma" (f32.const 0x1.a78402p+124) (f32.const 0x1.cf8548p-23) (f32.const 0x1.992adap+107)) (f32.const 0x1.a5262cp+107)) +(assert_return (invoke "f32.no_fma" (f32.const 0x1.ed15a4p-28) (f32.const -0x1.613c72p-50) (f32.const 0x1.4757bp-88)) (f32.const -0x1.5406b8p-77)) +(assert_return (invoke "f32.no_fma" (f32.const 0x1.ae63a2p+37) (f32.const 0x1.b3a59ap-13) (f32.const 0x1.c16918p+10)) (f32.const 0x1.6e385cp+25)) +(assert_return (invoke "f32.no_fma" (f32.const 0x1.2a77fap-8) (f32.const -0x1.bb7356p+22) (f32.const -0x1.32be2ap+1)) (f32.const -0x1.0286d4p+15)) +(assert_return (invoke "f32.no_fma" (f32.const 0x1.298fb6p+126) (f32.const -0x1.03080cp-70) (f32.const -0x1.418de6p+34)) (f32.const -0x1.2d15c6p+56)) +(assert_return (invoke "f64.no_fma" (f64.const 0x1.ac357ff46eed4p+557) (f64.const 0x1.852c01a5e7297p+430) (f64.const -0x1.05995704eda8ap+987)) (f64.const 0x1.855d905d338ep+987)) +(assert_return (invoke "f64.no_fma" (f64.const 0x1.e2fd6bf32010cp+749) (f64.const 0x1.01c2238d405e4p-130) (f64.const 0x1.2ecc0db4b9f94p+573)) (f64.const 0x1.e64eb07e063bcp+619)) +(assert_return (invoke "f64.no_fma" (f64.const 0x1.92b7c7439ede3p-721) (f64.const -0x1.6aa97586d3de6p+1011) (f64.const 0x1.8de4823f6358ap+237)) (f64.const -0x1.1d4139fd20ecdp+291)) +(assert_return (invoke "f64.no_fma" (f64.const -0x1.466d30bddb453p-386) (f64.const -0x1.185a4d739c7aap+443) (f64.const 0x1.5f9c436fbfc7bp+55)) (f64.const 0x1.bd61a350fcc1ap+57)) +(assert_return (invoke "f64.no_fma" (f64.const 0x1.7e2c44058a799p+52) (f64.const 0x1.c73b71765b8b2p+685) (f64.const -0x1.16c641df0b108p+690)) (f64.const 0x1.53ccb53de0bd1p+738)) + +;; Test that x+0.0 is not folded to x. +;; See IEEE 754-2008 10.4 "Literal meaning and value-changing optimizations". + +(module + (func (export "f32.no_fold_add_zero") (param $x f32) (result f32) + (f32.add (get_local $x) (f32.const 0.0))) + (func (export "f64.no_fold_add_zero") (param $x f64) (result f64) + (f64.add (get_local $x) (f64.const 0.0))) +) + +(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 (invoke "f32.no_fold_add_zero" (f32.const nan:0x200000)) (f32.const nan:0x600000)) +(assert_return (invoke "f64.no_fold_add_zero" (f64.const nan:0x4000000000000)) (f64.const nan:0xc000000000000)) + +;; Test that 0.0 - x is not folded to -x. + +(module + (func (export "f32.no_fold_zero_sub") (param $x f32) (result f32) + (f32.sub (f32.const 0.0) (get_local $x))) + (func (export "f64.no_fold_zero_sub") (param $x f64) (result f64) + (f64.sub (f64.const 0.0) (get_local $x))) +) + +(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 (invoke "f32.no_fold_zero_sub" (f32.const nan:0x200000)) (f32.const nan:0x600000)) +(assert_return (invoke "f64.no_fold_zero_sub" (f64.const nan:0x4000000000000)) (f64.const nan:0xc000000000000)) + +;; Test that x - 0.0 is not folded to x. + +(module + (func (export "f32.no_fold_sub_zero") (param $x f32) (result f32) + (f32.sub (get_local $x) (f32.const 0.0))) + (func (export "f64.no_fold_sub_zero") (param $x f64) (result f64) + (f64.sub (get_local $x) (f64.const 0.0))) +) + +(assert_return (invoke "f32.no_fold_sub_zero" (f32.const nan:0x200000)) (f32.const nan:0x600000)) +(assert_return (invoke "f64.no_fold_sub_zero" (f64.const nan:0x4000000000000)) (f64.const nan:0xc000000000000)) + +;; Test that x*0.0 is not folded to 0.0. + +(module + (func (export "f32.no_fold_mul_zero") (param $x f32) (result f32) + (f32.mul (get_local $x) (f32.const 0.0))) + (func (export "f64.no_fold_mul_zero") (param $x f64) (result f64) + (f64.mul (get_local $x) (f64.const 0.0))) +) + +(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 (invoke "f32.no_fold_mul_zero" (f32.const nan:0x200000)) (f32.const nan:0x600000)) +(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 (invoke "f64.no_fold_mul_zero" (f64.const nan:0x4000000000000)) (f64.const nan:0xc000000000000)) + +;; Test that x*1.0 is not folded to x. +;; See IEEE 754-2008 10.4 "Literal meaning and value-changing optimizations". + +(module + (func (export "f32.no_fold_mul_one") (param $x f32) (result f32) + (f32.mul (get_local $x) (f32.const 1.0))) + (func (export "f64.no_fold_mul_one") (param $x f64) (result f64) + (f64.mul (get_local $x) (f64.const 1.0))) +) + +(assert_return (invoke "f32.no_fold_mul_one" (f32.const nan:0x200000)) (f32.const nan:0x600000)) +(assert_return (invoke "f64.no_fold_mul_one" (f64.const nan:0x4000000000000)) (f64.const nan:0xc000000000000)) + +;; Test that 0.0/x is not folded to 0.0. + +(module + (func (export "f32.no_fold_zero_div") (param $x f32) (result f32) + (f32.div (f32.const 0.0) (get_local $x))) + (func (export "f64.no_fold_zero_div") (param $x f64) (result f64) + (f64.div (f64.const 0.0) (get_local $x))) +) + +(assert_return_nan (invoke "f32.no_fold_zero_div" (f32.const 0.0))) +(assert_return_nan (invoke "f32.no_fold_zero_div" (f32.const -0.0))) +(assert_return (invoke "f32.no_fold_zero_div" (f32.const nan)) (f32.const nan)) +(assert_return (invoke "f32.no_fold_zero_div" (f32.const nan:0x200000)) (f32.const nan:0x600000)) +(assert_return_nan (invoke "f64.no_fold_zero_div" (f64.const 0.0))) +(assert_return_nan (invoke "f64.no_fold_zero_div" (f64.const -0.0))) +(assert_return (invoke "f64.no_fold_zero_div" (f64.const nan)) (f64.const nan)) +(assert_return (invoke "f64.no_fold_zero_div" (f64.const nan:0x4000000000000)) (f64.const nan:0xc000000000000)) + +;; Test that x/1.0 is not folded to x. + +(module + (func (export "f32.no_fold_div_one") (param $x f32) (result f32) + (f32.div (get_local $x) (f32.const 1.0))) + (func (export "f64.no_fold_div_one") (param $x f64) (result f64) + (f64.div (get_local $x) (f64.const 1.0))) +) + +(assert_return (invoke "f32.no_fold_div_one" (f32.const nan:0x200000)) (f32.const nan:0x600000)) +(assert_return (invoke "f64.no_fold_div_one" (f64.const nan:0x4000000000000)) (f64.const nan:0xc000000000000)) + +;; Test that x/-1.0 is not folded to -x. + +(module + (func (export "f32.no_fold_div_neg1") (param $x f32) (result f32) + (f32.div (get_local $x) (f32.const -1.0))) + (func (export "f64.no_fold_div_neg1") (param $x f64) (result f64) + (f64.div (get_local $x) (f64.const -1.0))) +) + +(assert_return (invoke "f32.no_fold_div_neg1" (f32.const nan:0x200000)) (f32.const nan:0x600000)) +(assert_return (invoke "f64.no_fold_div_neg1" (f64.const nan:0x4000000000000)) (f64.const nan:0xc000000000000)) + +;; Test that -0.0 - x is not folded to -x. + +(module + (func (export "f32.no_fold_neg0_sub") (param $x f32) (result f32) + (f32.sub (f32.const -0.0) (get_local $x))) + (func (export "f64.no_fold_neg0_sub") (param $x f64) (result f64) + (f64.sub (f64.const -0.0) (get_local $x))) +) + +(assert_return (invoke "f32.no_fold_neg0_sub" (f32.const nan:0x200000)) (f32.const nan:0x600000)) +(assert_return (invoke "f64.no_fold_neg0_sub" (f64.const nan:0x4000000000000)) (f64.const nan:0xc000000000000)) + +;; Test that -1.0 * x is not folded to -x. + +(module + (func (export "f32.no_fold_neg1_mul") (param $x f32) (result f32) + (f32.mul (f32.const -1.0) (get_local $x))) + (func (export "f64.no_fold_neg1_mul") (param $x f64) (result f64) + (f64.mul (f64.const -1.0) (get_local $x))) +) + +(assert_return (invoke "f32.no_fold_neg1_mul" (f32.const nan:0x200000)) (f32.const nan:0x600000)) +(assert_return (invoke "f64.no_fold_neg1_mul" (f64.const nan:0x4000000000000)) (f64.const nan:0xc000000000000)) + +;; Test that x == x is not folded to true. + +(module + (func (export "f32.no_fold_eq_self") (param $x f32) (result i32) + (f32.eq (get_local $x) (get_local $x))) + (func (export "f64.no_fold_eq_self") (param $x f64) (result i32) + (f64.eq (get_local $x) (get_local $x))) +) + +(assert_return (invoke "f32.no_fold_eq_self" (f32.const nan)) (i32.const 0)) +(assert_return (invoke "f64.no_fold_eq_self" (f64.const nan)) (i32.const 0)) + +;; Test that x != x is not folded to false. + +(module + (func (export "f32.no_fold_ne_self") (param $x f32) (result i32) + (f32.ne (get_local $x) (get_local $x))) + (func (export "f64.no_fold_ne_self") (param $x f64) (result i32) + (f64.ne (get_local $x) (get_local $x))) +) + +(assert_return (invoke "f32.no_fold_ne_self" (f32.const nan)) (i32.const 1)) +(assert_return (invoke "f64.no_fold_ne_self" (f64.const nan)) (i32.const 1)) + +;; Test that x - x is not folded to 0.0. + +(module + (func (export "f32.no_fold_sub_self") (param $x f32) (result f32) + (f32.sub (get_local $x) (get_local $x))) + (func (export "f64.no_fold_sub_self") (param $x f64) (result f64) + (f64.sub (get_local $x) (get_local $x))) +) + +(assert_return_nan (invoke "f32.no_fold_sub_self" (f32.const infinity))) +(assert_return (invoke "f32.no_fold_sub_self" (f32.const nan)) (f32.const nan)) +(assert_return_nan (invoke "f64.no_fold_sub_self" (f64.const infinity))) +(assert_return (invoke "f64.no_fold_sub_self" (f64.const nan)) (f64.const nan)) + +;; Test that x/3 is not folded to x*(1/3). + +(module + (func (export "f32.no_fold_div_3") (param $x f32) (result f32) + (f32.div (get_local $x) (f32.const 3.0))) + (func (export "f64.no_fold_div_3") (param $x f64) (result f64) + (f64.div (get_local $x) (f64.const 3.0))) +) + +(assert_return (invoke "f32.no_fold_div_3" (f32.const -0x1.359c26p+50)) (f32.const -0x1.9cd032p+48)) +(assert_return (invoke "f32.no_fold_div_3" (f32.const -0x1.e45646p+93)) (f32.const -0x1.42e42ep+92)) +(assert_return (invoke "f32.no_fold_div_3" (f32.const -0x1.2a3916p-83)) (f32.const -0x1.8da172p-85)) +(assert_return (invoke "f32.no_fold_div_3" (f32.const -0x1.1f8b38p-124)) (f32.const -0x1.7f644ap-126)) +(assert_return (invoke "f32.no_fold_div_3" (f32.const -0x1.d64f64p-56)) (f32.const -0x1.398a42p-57)) +(assert_return (invoke "f64.no_fold_div_3" (f64.const -0x1.a8a88d29e2cc3p+632)) (f64.const -0x1.1b1b08c69732dp+631)) +(assert_return (invoke "f64.no_fold_div_3" (f64.const -0x1.bcf52dc950972p-167)) (f64.const -0x1.28a373db8b0f7p-168)) +(assert_return (invoke "f64.no_fold_div_3" (f64.const 0x1.bd3c0d989f7a4p-874)) (f64.const 0x1.28d2b3bb14fc3p-875)) +(assert_return (invoke "f64.no_fold_div_3" (f64.const -0x1.0138bf530a53cp+1007)) (f64.const -0x1.56f6546eb86fbp+1005)) +(assert_return (invoke "f64.no_fold_div_3" (f64.const 0x1.052b87f9d794dp+415)) (f64.const 0x1.5c3a0aa274c67p+413)) + +;; Test that (x*z)+(y*z) is not folded to (x+y)*z + +(module + (func (export "f32.no_factor") (param $x f32) (param $y f32) (param $z f32) (result f32) + (f32.add (f32.mul (get_local $x) (get_local $z)) (f32.mul (get_local $y) (get_local $z)))) + (func (export "f64.no_factor") (param $x f64) (param $y f64) (param $z f64) (result f64) + (f64.add (f64.mul (get_local $x) (get_local $z)) (f64.mul (get_local $y) (get_local $z)))) +) + +(assert_return (invoke "f32.no_factor" (f32.const -0x1.4e2352p+40) (f32.const -0x1.842e2cp+49) (f32.const 0x1.eea602p+59)) (f32.const -0x1.77a7dp+109)) +(assert_return (invoke "f32.no_factor" (f32.const -0x1.b4e7f6p-6) (f32.const 0x1.8c990cp-5) (f32.const -0x1.70cc02p-9)) (f32.const -0x1.00a342p-14)) +(assert_return (invoke "f32.no_factor" (f32.const -0x1.06722ep-41) (f32.const 0x1.eed3cep-64) (f32.const 0x1.5c5558p+123)) (f32.const -0x1.651aaep+82)) +(assert_return (invoke "f32.no_factor" (f32.const -0x1.f8c6a4p-64) (f32.const 0x1.08c806p-83) (f32.const 0x1.b5ceccp+118)) (f32.const -0x1.afa15p+55)) +(assert_return (invoke "f32.no_factor" (f32.const -0x1.3aaa1ep-84) (f32.const 0x1.c6d5eep-71) (f32.const 0x1.8d2924p+20)) (f32.const 0x1.60c9cep-50)) +(assert_return (invoke "f64.no_factor" (f64.const 0x1.3adeda9144977p-424) (f64.const 0x1.c15af887049e1p-462) (f64.const -0x1.905179c4c4778p-225)) (f64.const -0x1.ec606bcb87b1ap-649)) +(assert_return (invoke "f64.no_factor" (f64.const 0x1.3c84821c1d348p-662) (f64.const -0x1.4ffd4c77ad037p-1009) (f64.const -0x1.dd275335c6f4p-957)) (f64.const 0x0p+0)) +(assert_return (invoke "f64.no_factor" (f64.const -0x1.074f372347051p-334) (f64.const -0x1.aaeef661f4c96p-282) (f64.const -0x1.9bd34abe8696dp+479)) (f64.const 0x1.5767029593e2p+198)) +(assert_return (invoke "f64.no_factor" (f64.const -0x1.c4ded58a6f389p-289) (f64.const 0x1.ba6fdef5d59c9p-260) (f64.const -0x1.c1201c0470205p-253)) (f64.const -0x1.841ada2e0f184p-512)) +(assert_return (invoke "f64.no_factor" (f64.const 0x1.9d3688f8e375ap-608) (f64.const 0x1.bf91311588256p-579) (f64.const -0x1.1605a6b5d5ff8p+489)) (f64.const -0x1.e6118ca76af53p-90)) + +;; Test that (x+y)*z is not folded to (x*z)+(y*z) + +(module + (func (export "f32.no_distribute") (param $x f32) (param $y f32) (param $z f32) (result f32) + (f32.mul (f32.add (get_local $x) (get_local $y)) (get_local $z))) + (func (export "f64.no_distribute") (param $x f64) (param $y f64) (param $z f64) (result f64) + (f64.mul (f64.add (get_local $x) (get_local $y)) (get_local $z))) +) + +(assert_return (invoke "f32.no_distribute" (f32.const -0x1.4e2352p+40) (f32.const -0x1.842e2cp+49) (f32.const 0x1.eea602p+59)) (f32.const -0x1.77a7d2p+109)) +(assert_return (invoke "f32.no_distribute" (f32.const -0x1.b4e7f6p-6) (f32.const 0x1.8c990cp-5) (f32.const -0x1.70cc02p-9)) (f32.const -0x1.00a34p-14)) +(assert_return (invoke "f32.no_distribute" (f32.const -0x1.06722ep-41) (f32.const 0x1.eed3cep-64) (f32.const 0x1.5c5558p+123)) (f32.const -0x1.651abp+82)) +(assert_return (invoke "f32.no_distribute" (f32.const -0x1.f8c6a4p-64) (f32.const 0x1.08c806p-83) (f32.const 0x1.b5ceccp+118)) (f32.const -0x1.afa14ep+55)) +(assert_return (invoke "f32.no_distribute" (f32.const -0x1.3aaa1ep-84) (f32.const 0x1.c6d5eep-71) (f32.const 0x1.8d2924p+20)) (f32.const 0x1.60c9ccp-50)) +(assert_return (invoke "f64.no_distribute" (f64.const 0x1.3adeda9144977p-424) (f64.const 0x1.c15af887049e1p-462) (f64.const -0x1.905179c4c4778p-225)) (f64.const -0x1.ec606bcb87b1bp-649)) +(assert_return (invoke "f64.no_distribute" (f64.const 0x1.3c84821c1d348p-662) (f64.const -0x1.4ffd4c77ad037p-1009) (f64.const -0x1.dd275335c6f4p-957)) (f64.const -0x0p+0)) +(assert_return (invoke "f64.no_distribute" (f64.const -0x1.074f372347051p-334) (f64.const -0x1.aaeef661f4c96p-282) (f64.const -0x1.9bd34abe8696dp+479)) (f64.const 0x1.5767029593e1fp+198)) +(assert_return (invoke "f64.no_distribute" (f64.const -0x1.c4ded58a6f389p-289) (f64.const 0x1.ba6fdef5d59c9p-260) (f64.const -0x1.c1201c0470205p-253)) (f64.const -0x1.841ada2e0f183p-512)) +(assert_return (invoke "f64.no_distribute" (f64.const 0x1.9d3688f8e375ap-608) (f64.const 0x1.bf91311588256p-579) (f64.const -0x1.1605a6b5d5ff8p+489)) (f64.const -0x1.e6118ca76af52p-90)) + +;; Test that x*(y/z) is not folded to (x*y)/z + +(module + (func (export "f32.no_regroup_div_mul") (param $x f32) (param $y f32) (param $z f32) (result f32) + (f32.mul (get_local $x) (f32.div (get_local $y) (get_local $z)))) + (func (export "f64.no_regroup_div_mul") (param $x f64) (param $y f64) (param $z f64) (result f64) + (f64.mul (get_local $x) (f64.div (get_local $y) (get_local $z)))) +) + +(assert_return (invoke "f32.no_regroup_div_mul" (f32.const -0x1.2d14a6p-115) (f32.const -0x1.575a6cp-64) (f32.const 0x1.5cee0ep-116)) (f32.const 0x1.2844cap-63)) +(assert_return (invoke "f32.no_regroup_div_mul" (f32.const -0x1.454738p+91) (f32.const -0x1.b28a66p-115) (f32.const -0x1.f53908p+72)) (f32.const -0x0p+0)) +(assert_return (invoke "f32.no_regroup_div_mul" (f32.const -0x1.6be56ep+16) (f32.const -0x1.b46fc6p-21) (f32.const -0x1.a51df6p-123)) (f32.const -0x1.792258p+118)) +(assert_return (invoke "f32.no_regroup_div_mul" (f32.const -0x1.c343f8p-94) (f32.const 0x1.e4d906p+73) (f32.const 0x1.be69f8p+68)) (f32.const -0x1.ea1df2p-89)) +(assert_return (invoke "f32.no_regroup_div_mul" (f32.const 0x1.c6ae76p+112) (f32.const 0x1.fc953cp+24) (f32.const -0x1.60b3e8p+71)) (f32.const -0x1.47d0eap+66)) +(assert_return (invoke "f64.no_regroup_div_mul" (f64.const 0x1.3c04b815e30bp-423) (f64.const -0x1.379646fd98127p-119) (f64.const 0x1.bddb158506031p-642)) (f64.const -0x1.b9b3301f2dd2dp+99)) +(assert_return (invoke "f64.no_regroup_div_mul" (f64.const 0x1.46b3a402f86d5p+337) (f64.const 0x1.6fbf1b9e1798dp-447) (f64.const -0x1.bd9704a5a6a06p+797)) (f64.const -0x0p+0)) +(assert_return (invoke "f64.no_regroup_div_mul" (f64.const 0x1.6c9765bb4347fp-479) (f64.const 0x1.a4af42e34a141p+902) (f64.const 0x1.d2dde70eb68f9p-448)) (f64.const infinity)) +(assert_return (invoke "f64.no_regroup_div_mul" (f64.const -0x1.706023645be72p+480) (f64.const -0x1.6c229f7d9101dp+611) (f64.const -0x1.4d50fa68d3d9ep+836)) (f64.const -0x1.926fa3cacc651p+255)) +(assert_return (invoke "f64.no_regroup_div_mul" (f64.const 0x1.8cc63d8caf4c7p-599) (f64.const 0x1.8671ac4c35753p-878) (f64.const -0x1.ef35b1695e659p-838)) (f64.const -0x1.38d55f56406dp-639)) + +;; Test that (x*y)/z is not folded to x*(y/z) + +(module + (func (export "f32.no_regroup_mul_div") (param $x f32) (param $y f32) (param $z f32) (result f32) + (f32.div (f32.mul (get_local $x) (get_local $y)) (get_local $z))) + (func (export "f64.no_regroup_mul_div") (param $x f64) (param $y f64) (param $z f64) (result f64) + (f64.div (f64.mul (get_local $x) (get_local $y)) (get_local $z))) +) + +(assert_return (invoke "f32.no_regroup_mul_div" (f32.const -0x1.2d14a6p-115) (f32.const -0x1.575a6cp-64) (f32.const 0x1.5cee0ep-116)) (f32.const 0x0p+0)) +(assert_return (invoke "f32.no_regroup_mul_div" (f32.const -0x1.454738p+91) (f32.const -0x1.b28a66p-115) (f32.const -0x1.f53908p+72)) (f32.const -0x1.1a00e8p-96)) +(assert_return (invoke "f32.no_regroup_mul_div" (f32.const -0x1.6be56ep+16) (f32.const -0x1.b46fc6p-21) (f32.const -0x1.a51df6p-123)) (f32.const -0x1.79225ap+118)) +(assert_return (invoke "f32.no_regroup_mul_div" (f32.const -0x1.c343f8p-94) (f32.const 0x1.e4d906p+73) (f32.const 0x1.be69f8p+68)) (f32.const -0x1.ea1df4p-89)) +(assert_return (invoke "f32.no_regroup_mul_div" (f32.const 0x1.c6ae76p+112) (f32.const 0x1.fc953cp+24) (f32.const -0x1.60b3e8p+71)) (f32.const -infinity)) +(assert_return (invoke "f64.no_regroup_mul_div" (f64.const 0x1.3c04b815e30bp-423) (f64.const -0x1.379646fd98127p-119) (f64.const 0x1.bddb158506031p-642)) (f64.const -0x1.b9b3301f2dd2ep+99)) +(assert_return (invoke "f64.no_regroup_mul_div" (f64.const 0x1.46b3a402f86d5p+337) (f64.const 0x1.6fbf1b9e1798dp-447) (f64.const -0x1.bd9704a5a6a06p+797)) (f64.const -0x1.0da0b6328e09p-907)) +(assert_return (invoke "f64.no_regroup_mul_div" (f64.const 0x1.6c9765bb4347fp-479) (f64.const 0x1.a4af42e34a141p+902) (f64.const 0x1.d2dde70eb68f9p-448)) (f64.const 0x1.4886b6d9a9a79p+871)) +(assert_return (invoke "f64.no_regroup_mul_div" (f64.const -0x1.706023645be72p+480) (f64.const -0x1.6c229f7d9101dp+611) (f64.const -0x1.4d50fa68d3d9ep+836)) (f64.const -infinity)) +(assert_return (invoke "f64.no_regroup_mul_div" (f64.const 0x1.8cc63d8caf4c7p-599) (f64.const 0x1.8671ac4c35753p-878) (f64.const -0x1.ef35b1695e659p-838)) (f64.const -0x0p+0)) + +;; Test that x+y+z+w is not reassociated. + +(module + (func (export "f32.no_reassociate_add") (param $x f32) (param $y f32) (param $z f32) (param $w f32) (result f32) + (f32.add (f32.add (f32.add (get_local $x) (get_local $y)) (get_local $z)) (get_local $w))) + (func (export "f64.no_reassociate_add") (param $x f64) (param $y f64) (param $z f64) (param $w f64) (result f64) + (f64.add (f64.add (f64.add (get_local $x) (get_local $y)) (get_local $z)) (get_local $w))) +) + +(assert_return (invoke "f32.no_reassociate_add" (f32.const -0x1.5f7ddcp+44) (f32.const 0x1.854e1p+34) (f32.const -0x1.b2068cp+47) (f32.const -0x1.209692p+41)) (f32.const -0x1.e26c76p+47)) +(assert_return (invoke "f32.no_reassociate_add" (f32.const 0x1.da3b78p-9) (f32.const -0x1.4312fap-7) (f32.const 0x1.0395e6p-4) (f32.const -0x1.6d5ea6p-7)) (f32.const 0x1.78b31ap-5)) +(assert_return (invoke "f32.no_reassociate_add" (f32.const -0x1.fdb93ap+34) (f32.const -0x1.b6fce6p+41) (f32.const 0x1.c131d8p+44) (f32.const 0x1.8835b6p+38)) (f32.const 0x1.8ff3a2p+44)) +(assert_return (invoke "f32.no_reassociate_add" (f32.const 0x1.1739fcp+47) (f32.const 0x1.a4b186p+49) (f32.const -0x1.0c623cp+35) (f32.const 0x1.16a102p+51)) (f32.const 0x1.913ff6p+51)) +(assert_return (invoke "f32.no_reassociate_add" (f32.const 0x1.733cfap+108) (f32.const -0x1.38d30cp+108) (f32.const 0x1.2f5854p+105) (f32.const -0x1.ccb058p+94)) (f32.const 0x1.813716p+106)) +(assert_return (invoke "f64.no_reassociate_add" (f64.const -0x1.697a4d9ff19a6p+841) (f64.const 0x1.b305466238397p+847) (f64.const 0x1.e0b2d9bfb4e72p+855) (f64.const -0x1.6e1f3ae2b06bbp+857)) (f64.const -0x1.eb0e5936f087ap+856)) +(assert_return (invoke "f64.no_reassociate_add" (f64.const 0x1.00ef6746b30e1p-543) (f64.const 0x1.cc1cfafdf3fe1p-544) (f64.const -0x1.f7726df3ecba6p-543) (f64.const -0x1.b26695f99d307p-594)) (f64.const -0x1.074892e3fad76p-547)) +(assert_return (invoke "f64.no_reassociate_add" (f64.const -0x1.e807b3bd6d854p+440) (f64.const 0x1.cedae26c2c5fp+407) (f64.const -0x1.00ab6e1442541p+437) (f64.const 0x1.28538a55997bdp+397)) (f64.const -0x1.040e90bf871ebp+441)) +(assert_return (invoke "f64.no_reassociate_add" (f64.const -0x1.ba2b6f35a2402p-317) (f64.const 0x1.ad1c3fea7cd9ep-307) (f64.const -0x1.93aace2bf1261p-262) (f64.const 0x1.9fddbe472847ep-260)) (f64.const 0x1.3af30abc2c01bp-260)) +(assert_return (invoke "f64.no_reassociate_add" (f64.const -0x1.ccb9c6092fb1dp+641) (f64.const -0x1.4b7c28c108244p+614) (f64.const 0x1.8a7cefef4bde1p+646) (f64.const -0x1.901b28b08b482p+644)) (f64.const 0x1.1810579194126p+646)) + +;; Test that x*y*z*w is not reassociated. + +(module + (func (export "f32.no_reassociate_mul") (param $x f32) (param $y f32) (param $z f32) (param $w f32) (result f32) + (f32.mul (f32.mul (f32.mul (get_local $x) (get_local $y)) (get_local $z)) (get_local $w))) + (func (export "f64.no_reassociate_mul") (param $x f64) (param $y f64) (param $z f64) (param $w f64) (result f64) + (f64.mul (f64.mul (f64.mul (get_local $x) (get_local $y)) (get_local $z)) (get_local $w))) +) + +(assert_return (invoke "f32.no_reassociate_mul" (f32.const 0x1.950ba8p-116) (f32.const 0x1.efdacep-33) (f32.const -0x1.5f9bcp+102) (f32.const 0x1.f04508p-56)) (f32.const -0x1.ff356ep-101)) +(assert_return (invoke "f32.no_reassociate_mul" (f32.const 0x1.5990aep-56) (f32.const -0x1.7dfb04p+102) (f32.const -0x1.4f774ap-125) (f32.const -0x1.595fe6p+70)) (f32.const -0x1.c7c8fcp-8)) +(assert_return (invoke "f32.no_reassociate_mul" (f32.const 0x1.6ad9a4p-48) (f32.const -0x1.9138aap+55) (f32.const -0x1.4a774ep-40) (f32.const 0x1.1ff08p+76)) (f32.const 0x1.9cd8ecp+44)) +(assert_return (invoke "f32.no_reassociate_mul" (f32.const 0x1.e1caecp-105) (f32.const 0x1.af0dd2p+77) (f32.const -0x1.016eep+56) (f32.const -0x1.ab70d6p+59)) (f32.const 0x1.54870ep+89)) +(assert_return (invoke "f32.no_reassociate_mul" (f32.const -0x1.3b1dcp-99) (f32.const 0x1.4e5a34p-49) (f32.const -0x1.38ba5ap+3) (f32.const 0x1.7fb8eep+59)) (f32.const 0x1.5bbf98p-85)) +(assert_return (invoke "f64.no_reassociate_mul" (f64.const -0x1.e7842ab7181p-667) (f64.const -0x1.fabf40ceeceafp+990) (f64.const -0x1.1a38a825ab01ap-376) (f64.const -0x1.27e8ea469b14fp+664)) (f64.const 0x1.336eb428af4f3p+613)) +(assert_return (invoke "f64.no_reassociate_mul" (f64.const 0x1.4ca2292a6acbcp+454) (f64.const 0x1.6ffbab850089ap-516) (f64.const -0x1.547c32e1f5b93p-899) (f64.const -0x1.c7571d9388375p+540)) (f64.const 0x1.1ac796954fc1p-419)) +(assert_return (invoke "f64.no_reassociate_mul" (f64.const 0x1.73881a52e0401p-501) (f64.const -0x1.1b68dd9efb1a7p+788) (f64.const 0x1.d1c5e6a3eb27cp-762) (f64.const -0x1.56cb2fcc7546fp+88)) (f64.const 0x1.f508db92c34efp-386)) +(assert_return (invoke "f64.no_reassociate_mul" (f64.const 0x1.2efa87859987cp+692) (f64.const 0x1.68e4373e241p-423) (f64.const 0x1.4e2d0fb383a57p+223) (f64.const -0x1.301d3265c737bp-23)) (f64.const -0x1.4b2b6c393f30cp+470)) +(assert_return (invoke "f64.no_reassociate_mul" (f64.const 0x1.1013f7498b95fp-234) (f64.const 0x1.d2d1c36fff138p-792) (f64.const -0x1.cbf1824ea7bfdp+728) (f64.const -0x1.440da9c8b836dp-599)) (f64.const 0x1.1a16512881c91p-895)) + +;; Test that x/0 is not folded away. + +(module + (func (export "f32.no_fold_div_0") (param $x f32) (result f32) + (f32.div (get_local $x) (f32.const 0.0))) + (func (export "f64.no_fold_div_0") (param $x f64) (result f64) + (f64.div (get_local $x) (f64.const 0.0))) +) + +(assert_return (invoke "f32.no_fold_div_0" (f32.const 1.0)) (f32.const infinity)) +(assert_return (invoke "f32.no_fold_div_0" (f32.const -1.0)) (f32.const -infinity)) +(assert_return (invoke "f32.no_fold_div_0" (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "f32.no_fold_div_0" (f32.const -infinity)) (f32.const -infinity)) +(assert_return_nan (invoke "f32.no_fold_div_0" (f32.const 0))) +(assert_return_nan (invoke "f32.no_fold_div_0" (f32.const -0))) +(assert_return (invoke "f32.no_fold_div_0" (f32.const nan:0x200000)) (f32.const nan:0x600000)) +(assert_return (invoke "f32.no_fold_div_0" (f32.const nan)) (f32.const nan)) +(assert_return (invoke "f64.no_fold_div_0" (f64.const 1.0)) (f64.const infinity)) +(assert_return (invoke "f64.no_fold_div_0" (f64.const -1.0)) (f64.const -infinity)) +(assert_return (invoke "f64.no_fold_div_0" (f64.const infinity)) (f64.const infinity)) +(assert_return (invoke "f64.no_fold_div_0" (f64.const -infinity)) (f64.const -infinity)) +(assert_return_nan (invoke "f64.no_fold_div_0" (f64.const 0))) +(assert_return_nan (invoke "f64.no_fold_div_0" (f64.const -0))) +(assert_return (invoke "f64.no_fold_div_0" (f64.const nan)) (f64.const nan)) +(assert_return (invoke "f64.no_fold_div_0" (f64.const nan:0x4000000000000)) (f64.const nan:0xc000000000000)) + +;; Test that x/-0 is not folded away. + +(module + (func (export "f32.no_fold_div_neg0") (param $x f32) (result f32) + (f32.div (get_local $x) (f32.const -0.0))) + (func (export "f64.no_fold_div_neg0") (param $x f64) (result f64) + (f64.div (get_local $x) (f64.const -0.0))) +) + +(assert_return (invoke "f32.no_fold_div_neg0" (f32.const 1.0)) (f32.const -infinity)) +(assert_return (invoke "f32.no_fold_div_neg0" (f32.const -1.0)) (f32.const infinity)) +(assert_return (invoke "f32.no_fold_div_neg0" (f32.const infinity)) (f32.const -infinity)) +(assert_return (invoke "f32.no_fold_div_neg0" (f32.const -infinity)) (f32.const infinity)) +(assert_return_nan (invoke "f32.no_fold_div_neg0" (f32.const 0))) +(assert_return_nan (invoke "f32.no_fold_div_neg0" (f32.const -0))) +(assert_return (invoke "f32.no_fold_div_neg0" (f32.const nan:0x200000)) (f32.const nan:0x600000)) +(assert_return (invoke "f32.no_fold_div_neg0" (f32.const nan)) (f32.const nan)) +(assert_return (invoke "f64.no_fold_div_neg0" (f64.const 1.0)) (f64.const -infinity)) +(assert_return (invoke "f64.no_fold_div_neg0" (f64.const -1.0)) (f64.const infinity)) +(assert_return (invoke "f64.no_fold_div_neg0" (f64.const infinity)) (f64.const -infinity)) +(assert_return (invoke "f64.no_fold_div_neg0" (f64.const -infinity)) (f64.const infinity)) +(assert_return_nan (invoke "f64.no_fold_div_neg0" (f64.const 0))) +(assert_return_nan (invoke "f64.no_fold_div_neg0" (f64.const -0))) +(assert_return (invoke "f64.no_fold_div_neg0" (f64.const nan)) (f64.const nan)) +(assert_return (invoke "f64.no_fold_div_neg0" (f64.const nan:0x4000000000000)) (f64.const nan:0xc000000000000)) + +;; Test that sqrt(x*x+y*y) is not folded to hypot. + +(module + (func (export "f32.no_fold_to_hypot") (param $x f32) (param $y f32) (result f32) + (f32.sqrt (f32.add (f32.mul (get_local $x) (get_local $x)) + (f32.mul (get_local $y) (get_local $y))))) + (func (export "f64.no_fold_to_hypot") (param $x f64) (param $y f64) (result f64) + (f64.sqrt (f64.add (f64.mul (get_local $x) (get_local $x)) + (f64.mul (get_local $y) (get_local $y))))) +) + +(assert_return (invoke "f32.no_fold_to_hypot" (f32.const 0x1.c2f338p-81) (f32.const 0x1.401b5ep-68)) (f32.const 0x1.401cccp-68)) +(assert_return (invoke "f32.no_fold_to_hypot" (f32.const -0x1.c38d1p-71) (f32.const -0x1.359ddp-107)) (f32.const 0x1.c36a62p-71)) +(assert_return (invoke "f32.no_fold_to_hypot" (f32.const -0x1.99e0cap-114) (f32.const -0x1.ed0c6cp-69)) (f32.const 0x1.ed0e48p-69)) +(assert_return (invoke "f32.no_fold_to_hypot" (f32.const -0x1.1b6ceap+5) (f32.const 0x1.5440bep+17)) (f32.const 0x1.5440cp+17)) +(assert_return (invoke "f32.no_fold_to_hypot" (f32.const 0x1.8f019ep-76) (f32.const -0x1.182308p-71)) (f32.const 0x1.17e2bcp-71)) +(assert_return (invoke "f64.no_fold_to_hypot" (f64.const 0x1.1a0ac4f7c8711p-636) (f64.const 0x1.1372ebafff551p-534)) (f64.const 0x1.13463fa37014ep-534)) +(assert_return (invoke "f64.no_fold_to_hypot" (f64.const 0x1.b793512167499p+395) (f64.const -0x1.11cbc52af4c36p+410)) (f64.const 0x1.11cbc530783a2p+410)) +(assert_return (invoke "f64.no_fold_to_hypot" (f64.const 0x1.76777f44ff40bp-536) (f64.const -0x1.c3896e4dc1fbp-766)) (f64.const 0x1.8p-536)) +(assert_return (invoke "f64.no_fold_to_hypot" (f64.const -0x1.889ac72cc6b5dp-521) (f64.const 0x1.8d7084e659f3bp-733)) (f64.const 0x1.889ac72ca843ap-521)) +(assert_return (invoke "f64.no_fold_to_hypot" (f64.const 0x1.5ee588c02cb08p-670) (f64.const -0x1.05ce25788d9ecp-514)) (f64.const 0x1.05ce25788d9dfp-514)) + +;; Test that 1.0/x isn't approximated. + +(module + (func (export "f32.no_approximate_reciprocal") (param $x f32) (result f32) + (f32.div (f32.const 1.0) (get_local $x))) +) + +(assert_return (invoke "f32.no_approximate_reciprocal" (f32.const -0x1.2900b6p-10)) (f32.const -0x1.b950d4p+9)) +(assert_return (invoke "f32.no_approximate_reciprocal" (f32.const 0x1.e7212p+127)) (f32.const 0x1.0d11f8p-128)) +(assert_return (invoke "f32.no_approximate_reciprocal" (f32.const -0x1.42a466p-93)) (f32.const -0x1.963ee6p+92)) +(assert_return (invoke "f32.no_approximate_reciprocal" (f32.const 0x1.5d0c32p+76)) (f32.const 0x1.778362p-77)) +(assert_return (invoke "f32.no_approximate_reciprocal" (f32.const -0x1.601de2p-82)) (f32.const -0x1.743d7ep+81)) + +;; Test that 1.0/sqrt(x) isn't approximated or fused. + +(module + (func (export "f32.no_approximate_reciprocal_sqrt") (param $x f32) (result f32) + (f32.div (f32.const 1.0) (f32.sqrt (get_local $x)))) + (func (export "f64.no_fuse_reciprocal_sqrt") (param $x f64) (result f64) + (f64.div (f64.const 1.0) (f64.sqrt (get_local $x)))) +) + +(assert_return (invoke "f32.no_approximate_reciprocal_sqrt" (f32.const 0x1.6af12ap-43)) (f32.const 0x1.300ed4p+21)) +(assert_return (invoke "f32.no_approximate_reciprocal_sqrt" (f32.const 0x1.e82fc6p-8)) (f32.const 0x1.72c376p+3)) +(assert_return (invoke "f32.no_approximate_reciprocal_sqrt" (f32.const 0x1.b9fa9cp-66)) (f32.const 0x1.85a9bap+32)) +(assert_return (invoke "f32.no_approximate_reciprocal_sqrt" (f32.const 0x1.f4f546p-44)) (f32.const 0x1.6e01c2p+21)) +(assert_return (invoke "f32.no_approximate_reciprocal_sqrt" (f32.const 0x1.5da7aap-86)) (f32.const 0x1.b618cap+42)) + +(assert_return (invoke "f64.no_fuse_reciprocal_sqrt" (f64.const 0x1.1568a63b55fa3p+889)) (f64.const 0x1.5bc9c74c9952p-445)) +(assert_return (invoke "f64.no_fuse_reciprocal_sqrt" (f64.const 0x1.239fcd0939cafp+311)) (f64.const 0x1.5334a922b4818p-156)) +(assert_return (invoke "f64.no_fuse_reciprocal_sqrt" (f64.const 0x1.6e36a24e11054p+104)) (f64.const 0x1.ac13f20977f29p-53)) +(assert_return (invoke "f64.no_fuse_reciprocal_sqrt" (f64.const 0x1.23ee173219f83p+668)) (f64.const 0x1.df753e055862dp-335)) +(assert_return (invoke "f64.no_fuse_reciprocal_sqrt" (f64.const 0x1.b30f74caf9babp+146)) (f64.const 0x1.88bfc3d1764a9p-74)) + +;; Test that sqrt(1.0/x) isn't approximated. + +(module + (func (export "f32.no_approximate_sqrt_reciprocal") (param $x f32) (result f32) + (f32.sqrt (f32.div (f32.const 1.0) (get_local $x)))) +) + +(assert_return (invoke "f32.no_approximate_sqrt_reciprocal" (f32.const 0x1.a4c986p+60)) (f32.const 0x1.8f5ac6p-31)) +(assert_return (invoke "f32.no_approximate_sqrt_reciprocal" (f32.const 0x1.50511ep-9)) (f32.const 0x1.3bdd46p+4)) +(assert_return (invoke "f32.no_approximate_sqrt_reciprocal" (f32.const 0x1.125ec2p+69)) (f32.const 0x1.5db572p-35)) +(assert_return (invoke "f32.no_approximate_sqrt_reciprocal" (f32.const 0x1.ba4c5p+13)) (f32.const 0x1.136f16p-7)) +(assert_return (invoke "f32.no_approximate_sqrt_reciprocal" (f32.const 0x1.4a5be2p+104)) (f32.const 0x1.c2b5bp-53)) + +;; Test that converting i32/i64 to f32/f64 and back isn't folded away + +(module + (func (export "i32.no_fold_f32_s") (param i32) (result i32) + (i32.trunc_s/f32 (f32.convert_s/i32 (get_local 0)))) + (func (export "i32.no_fold_f32_u") (param i32) (result i32) + (i32.trunc_u/f32 (f32.convert_u/i32 (get_local 0)))) + (func (export "i64.no_fold_f64_s") (param i64) (result i64) + (i64.trunc_s/f64 (f64.convert_s/i64 (get_local 0)))) + (func (export "i64.no_fold_f64_u") (param i64) (result i64) + (i64.trunc_u/f64 (f64.convert_u/i64 (get_local 0)))) +) + +(assert_return (invoke "i32.no_fold_f32_s" (i32.const 0x1000000)) (i32.const 0x1000000)) +(assert_return (invoke "i32.no_fold_f32_s" (i32.const 0x1000001)) (i32.const 0x1000000)) +(assert_return (invoke "i32.no_fold_f32_s" (i32.const 0xf0000010)) (i32.const 0xf0000010)) + +(assert_return (invoke "i32.no_fold_f32_u" (i32.const 0x1000000)) (i32.const 0x1000000)) +(assert_return (invoke "i32.no_fold_f32_u" (i32.const 0x1000001)) (i32.const 0x1000000)) +(assert_return (invoke "i32.no_fold_f32_u" (i32.const 0xf0000010)) (i32.const 0xf0000000)) + +(assert_return (invoke "i64.no_fold_f64_s" (i64.const 0x20000000000000)) (i64.const 0x20000000000000)) +(assert_return (invoke "i64.no_fold_f64_s" (i64.const 0x20000000000001)) (i64.const 0x20000000000000)) +(assert_return (invoke "i64.no_fold_f64_s" (i64.const 0xf000000000000400)) (i64.const 0xf000000000000400)) + +(assert_return (invoke "i64.no_fold_f64_u" (i64.const 0x20000000000000)) (i64.const 0x20000000000000)) +(assert_return (invoke "i64.no_fold_f64_u" (i64.const 0x20000000000001)) (i64.const 0x20000000000000)) +(assert_return (invoke "i64.no_fold_f64_u" (i64.const 0xf000000000000400)) (i64.const 0xf000000000000000)) + +;; Test that x+y-y is not folded to x. + +(module + (func (export "f32.no_fold_add_sub") (param $x f32) (param $y f32) (result f32) + (f32.sub (f32.add (get_local $x) (get_local $y)) (get_local $y))) + (func (export "f64.no_fold_add_sub") (param $x f64) (param $y f64) (result f64) + (f64.sub (f64.add (get_local $x) (get_local $y)) (get_local $y))) +) + +(assert_return (invoke "f32.no_fold_add_sub" (f32.const 0x1.b553e4p-47) (f32.const -0x1.67db2cp-26)) (f32.const 0x1.cp-47)) +(assert_return (invoke "f32.no_fold_add_sub" (f32.const -0x1.a884dp-23) (f32.const 0x1.f2ae1ep-19)) (f32.const -0x1.a884ep-23)) +(assert_return (invoke "f32.no_fold_add_sub" (f32.const -0x1.fc04fp+82) (f32.const -0x1.65403ap+101)) (f32.const -0x1p+83)) +(assert_return (invoke "f32.no_fold_add_sub" (f32.const 0x1.870fa2p-78) (f32.const 0x1.c54916p-56)) (f32.const 0x1.8p-78)) +(assert_return (invoke "f32.no_fold_add_sub" (f32.const -0x1.17e966p-108) (f32.const -0x1.5fa61ap-84)) (f32.const -0x1p-107)) + +(assert_return (invoke "f64.no_fold_add_sub" (f64.const -0x1.1053ea172dba8p-874) (f64.const 0x1.113c413408ac8p-857)) (f64.const -0x1.1053ea172p-874)) +(assert_return (invoke "f64.no_fold_add_sub" (f64.const 0x1.e377d54807972p-546) (f64.const 0x1.040a0a4d1ff7p-526)) (f64.const 0x1.e377d548p-546)) +(assert_return (invoke "f64.no_fold_add_sub" (f64.const -0x1.75f53cd926b62p-30) (f64.const -0x1.66b176e602bb5p-3)) (f64.const -0x1.75f53dp-30)) +(assert_return (invoke "f64.no_fold_add_sub" (f64.const -0x1.c450ff28332ap-341) (f64.const 0x1.15a5855023baep-305)) (f64.const -0x1.c451p-341)) +(assert_return (invoke "f64.no_fold_add_sub" (f64.const -0x1.1ad4a596d3ea8p-619) (f64.const -0x1.17d81a41c0ea8p-588)) (f64.const -0x1.1ad4a8p-619)) + +;; Test that x-y+y is not folded to x. + +(module + (func (export "f32.no_fold_sub_add") (param $x f32) (param $y f32) (result f32) + (f32.add (f32.sub (get_local $x) (get_local $y)) (get_local $y))) + (func (export "f64.no_fold_sub_add") (param $x f64) (param $y f64) (result f64) + (f64.add (f64.sub (get_local $x) (get_local $y)) (get_local $y))) +) + +(assert_return (invoke "f32.no_fold_sub_add" (f32.const -0x1.523cb8p+9) (f32.const 0x1.93096cp+8)) (f32.const -0x1.523cbap+9)) +(assert_return (invoke "f32.no_fold_sub_add" (f32.const -0x1.a31a1p-111) (f32.const 0x1.745efp-95)) (f32.const -0x1.a4p-111)) +(assert_return (invoke "f32.no_fold_sub_add" (f32.const 0x1.3d5328p+26) (f32.const 0x1.58567p+35)) (f32.const 0x1.3d54p+26)) +(assert_return (invoke "f32.no_fold_sub_add" (f32.const 0x1.374e26p-39) (f32.const -0x1.66a5p-27)) (f32.const 0x1.374p-39)) +(assert_return (invoke "f32.no_fold_sub_add" (f32.const 0x1.320facp-3) (f32.const -0x1.ac069ap+14)) (f32.const 0x1.34p-3)) + +(assert_return (invoke "f64.no_fold_sub_add" (f64.const 0x1.8f92aad2c9b8dp+255) (f64.const -0x1.08cd4992266cbp+259)) (f64.const 0x1.8f92aad2c9b9p+255)) +(assert_return (invoke "f64.no_fold_sub_add" (f64.const 0x1.5aaff55742c8bp-666) (f64.const 0x1.8f5f47181f46dp-647)) (f64.const 0x1.5aaff5578p-666)) +(assert_return (invoke "f64.no_fold_sub_add" (f64.const 0x1.21bc52967a98dp+251) (f64.const -0x1.fcffaa32d0884p+300)) (f64.const 0x1.2p+251)) +(assert_return (invoke "f64.no_fold_sub_add" (f64.const 0x1.9c78361f47374p-26) (f64.const -0x1.69d69f4edc61cp-13)) (f64.const 0x1.9c78361f48p-26)) +(assert_return (invoke "f64.no_fold_sub_add" (f64.const 0x1.4dbe68e4afab2p-367) (f64.const -0x1.dc24e5b39cd02p-361)) (f64.const 0x1.4dbe68e4afacp-367)) + +;; Test that x*y/y is not folded to x. + +(module + (func (export "f32.no_fold_mul_div") (param $x f32) (param $y f32) (result f32) + (f32.div (f32.mul (get_local $x) (get_local $y)) (get_local $y))) + (func (export "f64.no_fold_mul_div") (param $x f64) (param $y f64) (result f64) + (f64.div (f64.mul (get_local $x) (get_local $y)) (get_local $y))) +) + +(assert_return (invoke "f32.no_fold_mul_div" (f32.const -0x1.cd859ap+54) (f32.const 0x1.6ca936p-47)) (f32.const -0x1.cd8598p+54)) +(assert_return (invoke "f32.no_fold_mul_div" (f32.const -0x1.0b56b8p-26) (f32.const 0x1.48264cp-106)) (f32.const -0x1.0b56a4p-26)) +(assert_return (invoke "f32.no_fold_mul_div" (f32.const -0x1.e7555cp-48) (f32.const -0x1.9161cp+48)) (f32.const -0x1.e7555ap-48)) +(assert_return (invoke "f32.no_fold_mul_div" (f32.const 0x1.aaa50ep+52) (f32.const -0x1.dfb39ep+60)) (f32.const 0x1.aaa50cp+52)) +(assert_return (invoke "f32.no_fold_mul_div" (f32.const -0x1.2b7dfap-92) (f32.const -0x1.7c4ca6p-37)) (f32.const -0x1.2b7dfep-92)) + +(assert_return (invoke "f64.no_fold_mul_div" (f64.const -0x1.3d79ff4118a1ap-837) (f64.const -0x1.b8b5dda31808cp-205)) (f64.const -0x1.3d79ff412263ep-837)) +(assert_return (invoke "f64.no_fold_mul_div" (f64.const 0x1.f894d1ee6b3a4p+384) (f64.const 0x1.8c2606d03d58ap+585)) (f64.const 0x1.f894d1ee6b3a5p+384)) +(assert_return (invoke "f64.no_fold_mul_div" (f64.const -0x1.a022260acc993p+238) (f64.const -0x1.5fbc128fc8e3cp-552)) (f64.const -0x1.a022260acc992p+238)) +(assert_return (invoke "f64.no_fold_mul_div" (f64.const 0x1.9d4b8ed174f54p-166) (f64.const 0x1.ee3d467aeeac6p-906)) (f64.const 0x1.8dcc95a053b2bp-166)) +(assert_return (invoke "f64.no_fold_mul_div" (f64.const -0x1.e95ea897cdcd4p+660) (f64.const -0x1.854d5df085f2ep-327)) (f64.const -0x1.e95ea897cdcd5p+660)) + +;; Test that x/y*y is not folded to x. + +(module + (func (export "f32.no_fold_div_mul") (param $x f32) (param $y f32) (result f32) + (f32.mul (f32.div (get_local $x) (get_local $y)) (get_local $y))) + (func (export "f64.no_fold_div_mul") (param $x f64) (param $y f64) (result f64) + (f64.mul (f64.div (get_local $x) (get_local $y)) (get_local $y))) +) + +(assert_return (invoke "f32.no_fold_div_mul" (f32.const -0x1.dc6364p+38) (f32.const 0x1.d630ecp+29)) (f32.const -0x1.dc6362p+38)) +(assert_return (invoke "f32.no_fold_div_mul" (f32.const -0x1.1f9836p-52) (f32.const -0x1.16c4e4p-18)) (f32.const -0x1.1f9838p-52)) +(assert_return (invoke "f32.no_fold_div_mul" (f32.const 0x1.c5972cp-126) (f32.const -0x1.d6659ep+7)) (f32.const 0x1.c5980ep-126)) +(assert_return (invoke "f32.no_fold_div_mul" (f32.const -0x1.2e3a9ep-74) (f32.const -0x1.353994p+59)) (f32.const -0x1.2e3a4p-74)) +(assert_return (invoke "f32.no_fold_div_mul" (f32.const 0x1.d96b82p-98) (f32.const 0x1.95d908p+27)) (f32.const 0x1.d96b84p-98)) + +(assert_return (invoke "f64.no_fold_div_mul" (f64.const 0x1.d01f913a52481p-876) (f64.const -0x1.2cd0668b28344p+184)) (f64.const 0x1.d020daf71cdcp-876)) +(assert_return (invoke "f64.no_fold_div_mul" (f64.const -0x1.81cb7d400918dp-714) (f64.const 0x1.7caa643586d6ep-53)) (f64.const -0x1.81cb7d400918ep-714)) +(assert_return (invoke "f64.no_fold_div_mul" (f64.const -0x1.66904c97b5c8ep-145) (f64.const 0x1.5c3481592ad4cp+428)) (f64.const -0x1.66904c97b5c8dp-145)) +(assert_return (invoke "f64.no_fold_div_mul" (f64.const -0x1.e75859d2f0765p-278) (f64.const -0x1.5f19b6ab497f9p+283)) (f64.const -0x1.e75859d2f0764p-278)) +(assert_return (invoke "f64.no_fold_div_mul" (f64.const -0x1.515fe9c3b5f5p+620) (f64.const 0x1.36be869c99f7ap+989)) (f64.const -0x1.515fe9c3b5f4fp+620)) + +;; Test that promote(demote(x)) is not folded to x. + +(module + (func (export "no_fold_demote_promote") (param $x f64) (result f64) + (f64.promote/f32 (f32.demote/f64 (get_local $x)))) +) + +(assert_return (invoke "no_fold_demote_promote" (f64.const -0x1.dece272390f5dp-133)) (f64.const -0x1.decep-133)) +(assert_return (invoke "no_fold_demote_promote" (f64.const -0x1.19e6c79938a6fp-85)) (f64.const -0x1.19e6c8p-85)) +(assert_return (invoke "no_fold_demote_promote" (f64.const 0x1.49b297ec44dc1p+107)) (f64.const 0x1.49b298p+107)) +(assert_return (invoke "no_fold_demote_promote" (f64.const -0x1.74f5bd865163p-88)) (f64.const -0x1.74f5bep-88)) +(assert_return (invoke "no_fold_demote_promote" (f64.const 0x1.26d675662367ep+104)) (f64.const 0x1.26d676p+104)) + +;; Test that demote(promote(x)) is not folded to x, and aside from NaN is +;; bit-preserving. + +(module + (func (export "no_fold_promote_demote") (param $x f32) (result f32) + (f32.demote/f64 (f64.promote/f32 (get_local $x)))) +) + +(assert_return (invoke "no_fold_promote_demote" (f32.const nan:0x200000)) (f32.const nan:0x600000)) +(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)) +(assert_return (invoke "no_fold_promote_demote" (f32.const -0x1p-149)) (f32.const -0x1p-149)) +(assert_return (invoke "no_fold_promote_demote" (f32.const 0x1.fffffcp-127)) (f32.const 0x1.fffffcp-127)) +(assert_return (invoke "no_fold_promote_demote" (f32.const -0x1.fffffcp-127)) (f32.const -0x1.fffffcp-127)) +(assert_return (invoke "no_fold_promote_demote" (f32.const 0x1p-126)) (f32.const 0x1p-126)) +(assert_return (invoke "no_fold_promote_demote" (f32.const -0x1p-126)) (f32.const -0x1p-126)) +(assert_return (invoke "no_fold_promote_demote" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "no_fold_promote_demote" (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) +(assert_return (invoke "no_fold_promote_demote" (f32.const infinity)) (f32.const infinity)) +(assert_return (invoke "no_fold_promote_demote" (f32.const -infinity)) (f32.const -infinity)) + +;; Test that demote(x+promote(y)) is not folded to demote(x)+y. + +(module + (func (export "no_demote_mixed_add") (param $x f64) (param $y f32) (result f32) + (f32.demote/f64 (f64.add (get_local $x) (f64.promote/f32 (get_local $y))))) + (func (export "no_demote_mixed_add_commuted") (param $y f32) (param $x f64) (result f32) + (f32.demote/f64 (f64.add (f64.promote/f32 (get_local $y)) (get_local $x)))) +) + +(assert_return (invoke "no_demote_mixed_add" (f64.const 0x1.f51a9d04854f9p-95) (f32.const 0x1.3f4e9cp-119)) (f32.const 0x1.f51a9ep-95)) +(assert_return (invoke "no_demote_mixed_add" (f64.const 0x1.065b3d81ad8dp+37) (f32.const 0x1.758cd8p+38)) (f32.const 0x1.f8ba76p+38)) +(assert_return (invoke "no_demote_mixed_add" (f64.const 0x1.626c80963bd17p-119) (f32.const -0x1.9bbf86p-121)) (f32.const 0x1.f6f93ep-120)) +(assert_return (invoke "no_demote_mixed_add" (f64.const -0x1.0d5110e3385bbp-20) (f32.const 0x1.096f4ap-29)) (f32.const -0x1.0ccc5ap-20)) +(assert_return (invoke "no_demote_mixed_add" (f64.const -0x1.73852db4e5075p-20) (f32.const -0x1.24e474p-41)) (f32.const -0x1.738536p-20)) + +(assert_return (invoke "no_demote_mixed_add_commuted" (f32.const 0x1.3f4e9cp-119) (f64.const 0x1.f51a9d04854f9p-95)) (f32.const 0x1.f51a9ep-95)) +(assert_return (invoke "no_demote_mixed_add_commuted" (f32.const 0x1.758cd8p+38) (f64.const 0x1.065b3d81ad8dp+37)) (f32.const 0x1.f8ba76p+38)) +(assert_return (invoke "no_demote_mixed_add_commuted" (f32.const -0x1.9bbf86p-121) (f64.const 0x1.626c80963bd17p-119)) (f32.const 0x1.f6f93ep-120)) +(assert_return (invoke "no_demote_mixed_add_commuted" (f32.const 0x1.096f4ap-29) (f64.const -0x1.0d5110e3385bbp-20)) (f32.const -0x1.0ccc5ap-20)) +(assert_return (invoke "no_demote_mixed_add_commuted" (f32.const -0x1.24e474p-41) (f64.const -0x1.73852db4e5075p-20)) (f32.const -0x1.738536p-20)) + +;; Test that demote(x-promote(y)) is not folded to demote(x)-y. + +(module + (func (export "no_demote_mixed_sub") (param $x f64) (param $y f32) (result f32) + (f32.demote/f64 (f64.sub (get_local $x) (f64.promote/f32 (get_local $y))))) +) + +(assert_return (invoke "no_demote_mixed_sub" (f64.const 0x1.a0a183220e9b1p+82) (f32.const 0x1.c5acf8p+61)) (f32.const 0x1.a0a174p+82)) +(assert_return (invoke "no_demote_mixed_sub" (f64.const -0x1.6e2c5ac39f63ep+30) (f32.const 0x1.d48ca4p+17)) (f32.const -0x1.6e3bp+30)) +(assert_return (invoke "no_demote_mixed_sub" (f64.const -0x1.98c74350dde6ap+6) (f32.const 0x1.9d69bcp-12)) (f32.const -0x1.98c7aap+6)) +(assert_return (invoke "no_demote_mixed_sub" (f64.const 0x1.0459f34091dbfp-54) (f32.const 0x1.61ad08p-71)) (f32.const 0x1.045942p-54)) +(assert_return (invoke "no_demote_mixed_sub" (f64.const 0x1.a7498dca3fdb7p+14) (f32.const 0x1.ed21c8p+15)) (f32.const -0x1.197d02p+15)) + +;; Test that converting between integer and float and back isn't folded away. + +(module + (func (export "f32.i32.no_fold_trunc_s_convert_s") (param $x f32) (result f32) + (f32.convert_s/i32 (i32.trunc_s/f32 (get_local $x)))) + (func (export "f32.i32.no_fold_trunc_u_convert_s") (param $x f32) (result f32) + (f32.convert_s/i32 (i32.trunc_u/f32 (get_local $x)))) + (func (export "f32.i32.no_fold_trunc_s_convert_u") (param $x f32) (result f32) + (f32.convert_u/i32 (i32.trunc_s/f32 (get_local $x)))) + (func (export "f32.i32.no_fold_trunc_u_convert_u") (param $x f32) (result f32) + (f32.convert_u/i32 (i32.trunc_u/f32 (get_local $x)))) + (func (export "f64.i32.no_fold_trunc_s_convert_s") (param $x f64) (result f64) + (f64.convert_s/i32 (i32.trunc_s/f64 (get_local $x)))) + (func (export "f64.i32.no_fold_trunc_u_convert_s") (param $x f64) (result f64) + (f64.convert_s/i32 (i32.trunc_u/f64 (get_local $x)))) + (func (export "f64.i32.no_fold_trunc_s_convert_u") (param $x f64) (result f64) + (f64.convert_u/i32 (i32.trunc_s/f64 (get_local $x)))) + (func (export "f64.i32.no_fold_trunc_u_convert_u") (param $x f64) (result f64) + (f64.convert_u/i32 (i32.trunc_u/f64 (get_local $x)))) + (func (export "f32.i64.no_fold_trunc_s_convert_s") (param $x f32) (result f32) + (f32.convert_s/i64 (i64.trunc_s/f32 (get_local $x)))) + (func (export "f32.i64.no_fold_trunc_u_convert_s") (param $x f32) (result f32) + (f32.convert_s/i64 (i64.trunc_u/f32 (get_local $x)))) + (func (export "f32.i64.no_fold_trunc_s_convert_u") (param $x f32) (result f32) + (f32.convert_u/i64 (i64.trunc_s/f32 (get_local $x)))) + (func (export "f32.i64.no_fold_trunc_u_convert_u") (param $x f32) (result f32) + (f32.convert_u/i64 (i64.trunc_u/f32 (get_local $x)))) + (func (export "f64.i64.no_fold_trunc_s_convert_s") (param $x f64) (result f64) + (f64.convert_s/i64 (i64.trunc_s/f64 (get_local $x)))) + (func (export "f64.i64.no_fold_trunc_u_convert_s") (param $x f64) (result f64) + (f64.convert_s/i64 (i64.trunc_u/f64 (get_local $x)))) + (func (export "f64.i64.no_fold_trunc_s_convert_u") (param $x f64) (result f64) + (f64.convert_u/i64 (i64.trunc_s/f64 (get_local $x)))) + (func (export "f64.i64.no_fold_trunc_u_convert_u") (param $x f64) (result f64) + (f64.convert_u/i64 (i64.trunc_u/f64 (get_local $x)))) +) + +(assert_return (invoke "f32.i32.no_fold_trunc_s_convert_s" (f32.const 1.5)) (f32.const 1.0)) +(assert_return (invoke "f32.i32.no_fold_trunc_s_convert_s" (f32.const -1.5)) (f32.const -1.0)) +(assert_return (invoke "f32.i32.no_fold_trunc_u_convert_s" (f32.const 1.5)) (f32.const 1.0)) +(assert_return (invoke "f32.i32.no_fold_trunc_u_convert_s" (f32.const -0.5)) (f32.const 0.0)) +(assert_return (invoke "f32.i32.no_fold_trunc_s_convert_u" (f32.const 1.5)) (f32.const 1.0)) +(assert_return (invoke "f32.i32.no_fold_trunc_s_convert_u" (f32.const -1.5)) (f32.const 0x1p+32)) +(assert_return (invoke "f32.i32.no_fold_trunc_u_convert_u" (f32.const 1.5)) (f32.const 1.0)) +(assert_return (invoke "f32.i32.no_fold_trunc_u_convert_u" (f32.const -0.5)) (f32.const 0.0)) + +(assert_return (invoke "f64.i32.no_fold_trunc_s_convert_s" (f64.const 1.5)) (f64.const 1.0)) +(assert_return (invoke "f64.i32.no_fold_trunc_s_convert_s" (f64.const -1.5)) (f64.const -1.0)) +(assert_return (invoke "f64.i32.no_fold_trunc_u_convert_s" (f64.const 1.5)) (f64.const 1.0)) +(assert_return (invoke "f64.i32.no_fold_trunc_u_convert_s" (f64.const -0.5)) (f64.const 0.0)) +(assert_return (invoke "f64.i32.no_fold_trunc_s_convert_u" (f64.const 1.5)) (f64.const 1.0)) +(assert_return (invoke "f64.i32.no_fold_trunc_s_convert_u" (f64.const -1.5)) (f64.const 0x1.fffffffep+31)) +(assert_return (invoke "f64.i32.no_fold_trunc_u_convert_u" (f64.const 1.5)) (f64.const 1.0)) +(assert_return (invoke "f64.i32.no_fold_trunc_u_convert_u" (f64.const -0.5)) (f64.const 0.0)) + +(assert_return (invoke "f32.i64.no_fold_trunc_s_convert_s" (f32.const 1.5)) (f32.const 1.0)) +(assert_return (invoke "f32.i64.no_fold_trunc_s_convert_s" (f32.const -1.5)) (f32.const -1.0)) +(assert_return (invoke "f32.i64.no_fold_trunc_u_convert_s" (f32.const 1.5)) (f32.const 1.0)) +(assert_return (invoke "f32.i64.no_fold_trunc_u_convert_s" (f32.const -0.5)) (f32.const 0.0)) +(assert_return (invoke "f32.i64.no_fold_trunc_s_convert_u" (f32.const 1.5)) (f32.const 1.0)) +(assert_return (invoke "f32.i64.no_fold_trunc_s_convert_u" (f32.const -1.5)) (f32.const 0x1p+64)) +(assert_return (invoke "f32.i64.no_fold_trunc_u_convert_u" (f32.const 1.5)) (f32.const 1.0)) +(assert_return (invoke "f32.i64.no_fold_trunc_u_convert_u" (f32.const -0.5)) (f32.const 0.0)) + +(assert_return (invoke "f64.i64.no_fold_trunc_s_convert_s" (f64.const 1.5)) (f64.const 1.0)) +(assert_return (invoke "f64.i64.no_fold_trunc_s_convert_s" (f64.const -1.5)) (f64.const -1.0)) +(assert_return (invoke "f64.i64.no_fold_trunc_u_convert_s" (f64.const 1.5)) (f64.const 1.0)) +(assert_return (invoke "f64.i64.no_fold_trunc_u_convert_s" (f64.const -0.5)) (f64.const 0.0)) +(assert_return (invoke "f64.i64.no_fold_trunc_s_convert_u" (f64.const 1.5)) (f64.const 1.0)) +(assert_return (invoke "f64.i64.no_fold_trunc_s_convert_u" (f64.const -1.5)) (f64.const 0x1p+64)) +(assert_return (invoke "f64.i64.no_fold_trunc_u_convert_u" (f64.const 1.5)) (f64.const 1.0)) +(assert_return (invoke "f64.i64.no_fold_trunc_u_convert_u" (f64.const -0.5)) (f64.const 0.0)) + +;; Test that dividing by a loop-invariant constant isn't optimized to be a +;; multiplication by a reciprocal, which would be particularly tempting since +;; the reciprocal computation could be hoisted. + +(module + (memory 1 1) + (func (export "init") (param $i i32) (param $x f32) (f32.store (get_local $i) (get_local $x))) + + (func (export "run") (param $n i32) (param $z f32) + (local $i i32) + (block $exit + (loop $cont + (f32.store + (get_local $i) + (f32.div (f32.load (get_local $i)) (get_local $z)) + ) + (set_local $i (i32.add (get_local $i) (i32.const 4))) + (br_if $cont (i32.lt_u (get_local $i) (get_local $n))) + ) + ) + ) + + (func (export "check") (param $i i32) (result f32) (f32.load (get_local $i))) +) + +(invoke "init" (i32.const 0) (f32.const 15.1)) +(invoke "init" (i32.const 4) (f32.const 15.2)) +(invoke "init" (i32.const 8) (f32.const 15.3)) +(invoke "init" (i32.const 12) (f32.const 15.4)) +(assert_return (invoke "check" (i32.const 0)) (f32.const 15.1)) +(assert_return (invoke "check" (i32.const 4)) (f32.const 15.2)) +(assert_return (invoke "check" (i32.const 8)) (f32.const 15.3)) +(assert_return (invoke "check" (i32.const 12)) (f32.const 15.4)) +(invoke "run" (i32.const 16) (f32.const 3.0)) +(assert_return (invoke "check" (i32.const 0)) (f32.const 0x1.422222p+2)) +(assert_return (invoke "check" (i32.const 4)) (f32.const 0x1.444444p+2)) +(assert_return (invoke "check" (i32.const 8)) (f32.const 0x1.466666p+2)) +(assert_return (invoke "check" (i32.const 12)) (f32.const 0x1.488888p+2)) + +(module + (memory 1 1) + (func (export "init") (param $i i32) (param $x f64) (f64.store (get_local $i) (get_local $x))) + + (func (export "run") (param $n i32) (param $z f64) + (local $i i32) + (block $exit + (loop $cont + (f64.store + (get_local $i) + (f64.div (f64.load (get_local $i)) (get_local $z)) + ) + (set_local $i (i32.add (get_local $i) (i32.const 8))) + (br_if $cont (i32.lt_u (get_local $i) (get_local $n))) + ) + ) + ) + + (func (export "check") (param $i i32) (result f64) (f64.load (get_local $i))) +) + +(invoke "init" (i32.const 0) (f64.const 15.1)) +(invoke "init" (i32.const 8) (f64.const 15.2)) +(invoke "init" (i32.const 16) (f64.const 15.3)) +(invoke "init" (i32.const 24) (f64.const 15.4)) +(assert_return (invoke "check" (i32.const 0)) (f64.const 15.1)) +(assert_return (invoke "check" (i32.const 8)) (f64.const 15.2)) +(assert_return (invoke "check" (i32.const 16)) (f64.const 15.3)) +(assert_return (invoke "check" (i32.const 24)) (f64.const 15.4)) +(invoke "run" (i32.const 32) (f64.const 3.0)) +(assert_return (invoke "check" (i32.const 0)) (f64.const 0x1.4222222222222p+2)) +(assert_return (invoke "check" (i32.const 8)) (f64.const 0x1.4444444444444p+2)) +(assert_return (invoke "check" (i32.const 16)) (f64.const 0x1.4666666666667p+2)) +(assert_return (invoke "check" (i32.const 24)) (f64.const 0x1.4888888888889p+2)) + +;; Test that ult/ugt/etc. aren't folded to olt/ogt/etc. + +(module + (func (export "f32.ult") (param $x f32) (param $y f32) (result i32) (i32.eqz (f32.ge (get_local $x) (get_local $y)))) + (func (export "f32.ule") (param $x f32) (param $y f32) (result i32) (i32.eqz (f32.gt (get_local $x) (get_local $y)))) + (func (export "f32.ugt") (param $x f32) (param $y f32) (result i32) (i32.eqz (f32.le (get_local $x) (get_local $y)))) + (func (export "f32.uge") (param $x f32) (param $y f32) (result i32) (i32.eqz (f32.lt (get_local $x) (get_local $y)))) + + (func (export "f64.ult") (param $x f64) (param $y f64) (result i32) (i32.eqz (f64.ge (get_local $x) (get_local $y)))) + (func (export "f64.ule") (param $x f64) (param $y f64) (result i32) (i32.eqz (f64.gt (get_local $x) (get_local $y)))) + (func (export "f64.ugt") (param $x f64) (param $y f64) (result i32) (i32.eqz (f64.le (get_local $x) (get_local $y)))) + (func (export "f64.uge") (param $x f64) (param $y f64) (result i32) (i32.eqz (f64.lt (get_local $x) (get_local $y)))) +) + +(assert_return (invoke "f32.ult" (f32.const 3.0) (f32.const 2.0)) (i32.const 0)) +(assert_return (invoke "f32.ult" (f32.const 2.0) (f32.const 2.0)) (i32.const 0)) +(assert_return (invoke "f32.ult" (f32.const 2.0) (f32.const 3.0)) (i32.const 1)) +(assert_return (invoke "f32.ult" (f32.const 2.0) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "f32.ule" (f32.const 3.0) (f32.const 2.0)) (i32.const 0)) +(assert_return (invoke "f32.ule" (f32.const 2.0) (f32.const 2.0)) (i32.const 1)) +(assert_return (invoke "f32.ule" (f32.const 2.0) (f32.const 3.0)) (i32.const 1)) +(assert_return (invoke "f32.ule" (f32.const 2.0) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "f32.ugt" (f32.const 3.0) (f32.const 2.0)) (i32.const 1)) +(assert_return (invoke "f32.ugt" (f32.const 2.0) (f32.const 2.0)) (i32.const 0)) +(assert_return (invoke "f32.ugt" (f32.const 2.0) (f32.const 3.0)) (i32.const 0)) +(assert_return (invoke "f32.ugt" (f32.const 2.0) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "f32.uge" (f32.const 3.0) (f32.const 2.0)) (i32.const 1)) +(assert_return (invoke "f32.uge" (f32.const 2.0) (f32.const 2.0)) (i32.const 1)) +(assert_return (invoke "f32.uge" (f32.const 2.0) (f32.const 3.0)) (i32.const 0)) +(assert_return (invoke "f32.uge" (f32.const 2.0) (f32.const nan)) (i32.const 1)) +(assert_return (invoke "f64.ult" (f64.const 3.0) (f64.const 2.0)) (i32.const 0)) +(assert_return (invoke "f64.ult" (f64.const 2.0) (f64.const 2.0)) (i32.const 0)) +(assert_return (invoke "f64.ult" (f64.const 2.0) (f64.const 3.0)) (i32.const 1)) +(assert_return (invoke "f64.ult" (f64.const 2.0) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "f64.ule" (f64.const 3.0) (f64.const 2.0)) (i32.const 0)) +(assert_return (invoke "f64.ule" (f64.const 2.0) (f64.const 2.0)) (i32.const 1)) +(assert_return (invoke "f64.ule" (f64.const 2.0) (f64.const 3.0)) (i32.const 1)) +(assert_return (invoke "f64.ule" (f64.const 2.0) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "f64.ugt" (f64.const 3.0) (f64.const 2.0)) (i32.const 1)) +(assert_return (invoke "f64.ugt" (f64.const 2.0) (f64.const 2.0)) (i32.const 0)) +(assert_return (invoke "f64.ugt" (f64.const 2.0) (f64.const 3.0)) (i32.const 0)) +(assert_return (invoke "f64.ugt" (f64.const 2.0) (f64.const nan)) (i32.const 1)) +(assert_return (invoke "f64.uge" (f64.const 3.0) (f64.const 2.0)) (i32.const 1)) +(assert_return (invoke "f64.uge" (f64.const 2.0) (f64.const 2.0)) (i32.const 1)) +(assert_return (invoke "f64.uge" (f64.const 2.0) (f64.const 3.0)) (i32.const 0)) +(assert_return (invoke "f64.uge" (f64.const 2.0) (f64.const nan)) (i32.const 1)) + +;; Test that x<y?x:y, etc. using select aren't folded to min, etc. + +(module + (func (export "f32.no_fold_lt_select") (param $x f32) (param $y f32) (result f32) (select (get_local $x) (get_local $y) (f32.lt (get_local $x) (get_local $y)))) + (func (export "f32.no_fold_le_select") (param $x f32) (param $y f32) (result f32) (select (get_local $x) (get_local $y) (f32.le (get_local $x) (get_local $y)))) + (func (export "f32.no_fold_gt_select") (param $x f32) (param $y f32) (result f32) (select (get_local $x) (get_local $y) (f32.gt (get_local $x) (get_local $y)))) + (func (export "f32.no_fold_ge_select") (param $x f32) (param $y f32) (result f32) (select (get_local $x) (get_local $y) (f32.ge (get_local $x) (get_local $y)))) + + (func (export "f64.no_fold_lt_select") (param $x f64) (param $y f64) (result f64) (select (get_local $x) (get_local $y) (f64.lt (get_local $x) (get_local $y)))) + (func (export "f64.no_fold_le_select") (param $x f64) (param $y f64) (result f64) (select (get_local $x) (get_local $y) (f64.le (get_local $x) (get_local $y)))) + (func (export "f64.no_fold_gt_select") (param $x f64) (param $y f64) (result f64) (select (get_local $x) (get_local $y) (f64.gt (get_local $x) (get_local $y)))) + (func (export "f64.no_fold_ge_select") (param $x f64) (param $y f64) (result f64) (select (get_local $x) (get_local $y) (f64.ge (get_local $x) (get_local $y)))) +) + +(assert_return (invoke "f32.no_fold_lt_select" (f32.const 0.0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "f32.no_fold_lt_select" (f32.const nan) (f32.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_lt_select" (f32.const 0.0) (f32.const -0.0)) (f32.const -0.0)) +(assert_return (invoke "f32.no_fold_lt_select" (f32.const -0.0) (f32.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_le_select" (f32.const 0.0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "f32.no_fold_le_select" (f32.const nan) (f32.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_le_select" (f32.const 0.0) (f32.const -0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_le_select" (f32.const -0.0) (f32.const 0.0)) (f32.const -0.0)) +(assert_return (invoke "f32.no_fold_gt_select" (f32.const 0.0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "f32.no_fold_gt_select" (f32.const nan) (f32.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_gt_select" (f32.const 0.0) (f32.const -0.0)) (f32.const -0.0)) +(assert_return (invoke "f32.no_fold_gt_select" (f32.const -0.0) (f32.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_ge_select" (f32.const 0.0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "f32.no_fold_ge_select" (f32.const nan) (f32.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_ge_select" (f32.const 0.0) (f32.const -0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_ge_select" (f32.const -0.0) (f32.const 0.0)) (f32.const -0.0)) +(assert_return (invoke "f64.no_fold_lt_select" (f64.const 0.0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "f64.no_fold_lt_select" (f64.const nan) (f64.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_lt_select" (f64.const 0.0) (f64.const -0.0)) (f64.const -0.0)) +(assert_return (invoke "f64.no_fold_lt_select" (f64.const -0.0) (f64.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_le_select" (f64.const 0.0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "f64.no_fold_le_select" (f64.const nan) (f64.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_le_select" (f64.const 0.0) (f64.const -0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_le_select" (f64.const -0.0) (f64.const 0.0)) (f64.const -0.0)) +(assert_return (invoke "f64.no_fold_gt_select" (f64.const 0.0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "f64.no_fold_gt_select" (f64.const nan) (f64.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_gt_select" (f64.const 0.0) (f64.const -0.0)) (f64.const -0.0)) +(assert_return (invoke "f64.no_fold_gt_select" (f64.const -0.0) (f64.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_ge_select" (f64.const 0.0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "f64.no_fold_ge_select" (f64.const nan) (f64.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_ge_select" (f64.const 0.0) (f64.const -0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_ge_select" (f64.const -0.0) (f64.const 0.0)) (f64.const -0.0)) + +;; Test that x<y?x:y, etc. using if and else aren't folded to min, etc. + +(module + (func (export "f32.no_fold_lt_if") (param $x f32) (param $y f32) (result f32) (if f32 (f32.lt (get_local $x) (get_local $y)) (get_local $x) (get_local $y))) + (func (export "f32.no_fold_le_if") (param $x f32) (param $y f32) (result f32) (if f32 (f32.le (get_local $x) (get_local $y)) (get_local $x) (get_local $y))) + (func (export "f32.no_fold_gt_if") (param $x f32) (param $y f32) (result f32) (if f32 (f32.gt (get_local $x) (get_local $y)) (get_local $x) (get_local $y))) + (func (export "f32.no_fold_ge_if") (param $x f32) (param $y f32) (result f32) (if f32 (f32.ge (get_local $x) (get_local $y)) (get_local $x) (get_local $y))) + + (func (export "f64.no_fold_lt_if") (param $x f64) (param $y f64) (result f64) (if f64 (f64.lt (get_local $x) (get_local $y)) (get_local $x) (get_local $y))) + (func (export "f64.no_fold_le_if") (param $x f64) (param $y f64) (result f64) (if f64 (f64.le (get_local $x) (get_local $y)) (get_local $x) (get_local $y))) + (func (export "f64.no_fold_gt_if") (param $x f64) (param $y f64) (result f64) (if f64 (f64.gt (get_local $x) (get_local $y)) (get_local $x) (get_local $y))) + (func (export "f64.no_fold_ge_if") (param $x f64) (param $y f64) (result f64) (if f64 (f64.ge (get_local $x) (get_local $y)) (get_local $x) (get_local $y))) +) + +(assert_return (invoke "f32.no_fold_lt_if" (f32.const 0.0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "f32.no_fold_lt_if" (f32.const nan) (f32.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_lt_if" (f32.const 0.0) (f32.const -0.0)) (f32.const -0.0)) +(assert_return (invoke "f32.no_fold_lt_if" (f32.const -0.0) (f32.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_le_if" (f32.const 0.0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "f32.no_fold_le_if" (f32.const nan) (f32.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_le_if" (f32.const 0.0) (f32.const -0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_le_if" (f32.const -0.0) (f32.const 0.0)) (f32.const -0.0)) +(assert_return (invoke "f32.no_fold_gt_if" (f32.const 0.0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "f32.no_fold_gt_if" (f32.const nan) (f32.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_gt_if" (f32.const 0.0) (f32.const -0.0)) (f32.const -0.0)) +(assert_return (invoke "f32.no_fold_gt_if" (f32.const -0.0) (f32.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_ge_if" (f32.const 0.0) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "f32.no_fold_ge_if" (f32.const nan) (f32.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_ge_if" (f32.const 0.0) (f32.const -0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_ge_if" (f32.const -0.0) (f32.const 0.0)) (f32.const -0.0)) +(assert_return (invoke "f64.no_fold_lt_if" (f64.const 0.0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "f64.no_fold_lt_if" (f64.const nan) (f64.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_lt_if" (f64.const 0.0) (f64.const -0.0)) (f64.const -0.0)) +(assert_return (invoke "f64.no_fold_lt_if" (f64.const -0.0) (f64.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_le_if" (f64.const 0.0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "f64.no_fold_le_if" (f64.const nan) (f64.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_le_if" (f64.const 0.0) (f64.const -0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_le_if" (f64.const -0.0) (f64.const 0.0)) (f64.const -0.0)) +(assert_return (invoke "f64.no_fold_gt_if" (f64.const 0.0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "f64.no_fold_gt_if" (f64.const nan) (f64.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_gt_if" (f64.const 0.0) (f64.const -0.0)) (f64.const -0.0)) +(assert_return (invoke "f64.no_fold_gt_if" (f64.const -0.0) (f64.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_ge_if" (f64.const 0.0) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "f64.no_fold_ge_if" (f64.const nan) (f64.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_ge_if" (f64.const 0.0) (f64.const -0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_ge_if" (f64.const -0.0) (f64.const 0.0)) (f64.const -0.0)) + +;; Test that x<0?-x:0, etc. using select aren't folded to abs + +(module + (func (export "f32.no_fold_lt_select_to_abs") (param $x f32) (result f32) (select (f32.neg (get_local $x)) (get_local $x) (f32.lt (get_local $x) (f32.const 0.0)))) + (func (export "f32.no_fold_le_select_to_abs") (param $x f32) (result f32) (select (f32.neg (get_local $x)) (get_local $x) (f32.le (get_local $x) (f32.const -0.0)))) + (func (export "f32.no_fold_gt_select_to_abs") (param $x f32) (result f32) (select (get_local $x) (f32.neg (get_local $x)) (f32.gt (get_local $x) (f32.const -0.0)))) + (func (export "f32.no_fold_ge_select_to_abs") (param $x f32) (result f32) (select (get_local $x) (f32.neg (get_local $x)) (f32.ge (get_local $x) (f32.const 0.0)))) + + (func (export "f64.no_fold_lt_select_to_abs") (param $x f64) (result f64) (select (f64.neg (get_local $x)) (get_local $x) (f64.lt (get_local $x) (f64.const 0.0)))) + (func (export "f64.no_fold_le_select_to_abs") (param $x f64) (result f64) (select (f64.neg (get_local $x)) (get_local $x) (f64.le (get_local $x) (f64.const -0.0)))) + (func (export "f64.no_fold_gt_select_to_abs") (param $x f64) (result f64) (select (get_local $x) (f64.neg (get_local $x)) (f64.gt (get_local $x) (f64.const -0.0)))) + (func (export "f64.no_fold_ge_select_to_abs") (param $x f64) (result f64) (select (get_local $x) (f64.neg (get_local $x)) (f64.ge (get_local $x) (f64.const 0.0)))) +) + +(assert_return (invoke "f32.no_fold_lt_select_to_abs" (f32.const nan:0x200000)) (f32.const nan:0x200000)) +(assert_return (invoke "f32.no_fold_lt_select_to_abs" (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "f32.no_fold_lt_select_to_abs" (f32.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_lt_select_to_abs" (f32.const -0.0)) (f32.const -0.0)) +(assert_return (invoke "f32.no_fold_le_select_to_abs" (f32.const nan:0x200000)) (f32.const nan:0x200000)) +(assert_return (invoke "f32.no_fold_le_select_to_abs" (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "f32.no_fold_le_select_to_abs" (f32.const 0.0)) (f32.const -0.0)) +(assert_return (invoke "f32.no_fold_le_select_to_abs" (f32.const -0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_gt_select_to_abs" (f32.const nan:0x200000)) (f32.const -nan:0x200000)) +(assert_return (invoke "f32.no_fold_gt_select_to_abs" (f32.const -nan)) (f32.const nan)) +(assert_return (invoke "f32.no_fold_gt_select_to_abs" (f32.const 0.0)) (f32.const -0.0)) +(assert_return (invoke "f32.no_fold_gt_select_to_abs" (f32.const -0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_ge_select_to_abs" (f32.const nan:0x200000)) (f32.const -nan:0x200000)) +(assert_return (invoke "f32.no_fold_ge_select_to_abs" (f32.const -nan)) (f32.const nan)) +(assert_return (invoke "f32.no_fold_ge_select_to_abs" (f32.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_ge_select_to_abs" (f32.const -0.0)) (f32.const -0.0)) +(assert_return (invoke "f64.no_fold_lt_select_to_abs" (f64.const nan:0x4000000000000)) (f64.const nan:0x4000000000000)) +(assert_return (invoke "f64.no_fold_lt_select_to_abs" (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "f64.no_fold_lt_select_to_abs" (f64.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_lt_select_to_abs" (f64.const -0.0)) (f64.const -0.0)) +(assert_return (invoke "f64.no_fold_le_select_to_abs" (f64.const nan:0x4000000000000)) (f64.const nan:0x4000000000000)) +(assert_return (invoke "f64.no_fold_le_select_to_abs" (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "f64.no_fold_le_select_to_abs" (f64.const 0.0)) (f64.const -0.0)) +(assert_return (invoke "f64.no_fold_le_select_to_abs" (f64.const -0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_gt_select_to_abs" (f64.const nan:0x4000000000000)) (f64.const -nan:0x4000000000000)) +(assert_return (invoke "f64.no_fold_gt_select_to_abs" (f64.const -nan)) (f64.const nan)) +(assert_return (invoke "f64.no_fold_gt_select_to_abs" (f64.const 0.0)) (f64.const -0.0)) +(assert_return (invoke "f64.no_fold_gt_select_to_abs" (f64.const -0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_ge_select_to_abs" (f64.const nan:0x4000000000000)) (f64.const -nan:0x4000000000000)) +(assert_return (invoke "f64.no_fold_ge_select_to_abs" (f64.const -nan)) (f64.const nan)) +(assert_return (invoke "f64.no_fold_ge_select_to_abs" (f64.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_ge_select_to_abs" (f64.const -0.0)) (f64.const -0.0)) + +;; Test that x<0?-x:0, etc. using if aren't folded to abs + +(module + (func (export "f32.no_fold_lt_if_to_abs") (param $x f32) (result f32) (if f32 (f32.lt (get_local $x) (f32.const 0.0)) (f32.neg (get_local $x)) (get_local $x))) + (func (export "f32.no_fold_le_if_to_abs") (param $x f32) (result f32) (if f32 (f32.le (get_local $x) (f32.const -0.0)) (f32.neg (get_local $x)) (get_local $x))) + (func (export "f32.no_fold_gt_if_to_abs") (param $x f32) (result f32) (if f32 (f32.gt (get_local $x) (f32.const -0.0)) (get_local $x) (f32.neg (get_local $x)))) + (func (export "f32.no_fold_ge_if_to_abs") (param $x f32) (result f32) (if f32 (f32.ge (get_local $x) (f32.const 0.0)) (get_local $x) (f32.neg (get_local $x)))) + + (func (export "f64.no_fold_lt_if_to_abs") (param $x f64) (result f64) (if f64 (f64.lt (get_local $x) (f64.const 0.0)) (f64.neg (get_local $x)) (get_local $x))) + (func (export "f64.no_fold_le_if_to_abs") (param $x f64) (result f64) (if f64 (f64.le (get_local $x) (f64.const -0.0)) (f64.neg (get_local $x)) (get_local $x))) + (func (export "f64.no_fold_gt_if_to_abs") (param $x f64) (result f64) (if f64 (f64.gt (get_local $x) (f64.const -0.0)) (get_local $x) (f64.neg (get_local $x)))) + (func (export "f64.no_fold_ge_if_to_abs") (param $x f64) (result f64) (if f64 (f64.ge (get_local $x) (f64.const 0.0)) (get_local $x) (f64.neg (get_local $x)))) +) + +(assert_return (invoke "f32.no_fold_lt_if_to_abs" (f32.const nan:0x200000)) (f32.const nan:0x200000)) +(assert_return (invoke "f32.no_fold_lt_if_to_abs" (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "f32.no_fold_lt_if_to_abs" (f32.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_lt_if_to_abs" (f32.const -0.0)) (f32.const -0.0)) +(assert_return (invoke "f32.no_fold_le_if_to_abs" (f32.const nan:0x200000)) (f32.const nan:0x200000)) +(assert_return (invoke "f32.no_fold_le_if_to_abs" (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "f32.no_fold_le_if_to_abs" (f32.const 0.0)) (f32.const -0.0)) +(assert_return (invoke "f32.no_fold_le_if_to_abs" (f32.const -0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_gt_if_to_abs" (f32.const nan:0x200000)) (f32.const -nan:0x200000)) +(assert_return (invoke "f32.no_fold_gt_if_to_abs" (f32.const -nan)) (f32.const nan)) +(assert_return (invoke "f32.no_fold_gt_if_to_abs" (f32.const 0.0)) (f32.const -0.0)) +(assert_return (invoke "f32.no_fold_gt_if_to_abs" (f32.const -0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_ge_if_to_abs" (f32.const nan:0x200000)) (f32.const -nan:0x200000)) +(assert_return (invoke "f32.no_fold_ge_if_to_abs" (f32.const -nan)) (f32.const nan)) +(assert_return (invoke "f32.no_fold_ge_if_to_abs" (f32.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_ge_if_to_abs" (f32.const -0.0)) (f32.const -0.0)) +(assert_return (invoke "f64.no_fold_lt_if_to_abs" (f64.const nan:0x4000000000000)) (f64.const nan:0x4000000000000)) +(assert_return (invoke "f64.no_fold_lt_if_to_abs" (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "f64.no_fold_lt_if_to_abs" (f64.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_lt_if_to_abs" (f64.const -0.0)) (f64.const -0.0)) +(assert_return (invoke "f64.no_fold_le_if_to_abs" (f64.const nan:0x4000000000000)) (f64.const nan:0x4000000000000)) +(assert_return (invoke "f64.no_fold_le_if_to_abs" (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "f64.no_fold_le_if_to_abs" (f64.const 0.0)) (f64.const -0.0)) +(assert_return (invoke "f64.no_fold_le_if_to_abs" (f64.const -0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_gt_if_to_abs" (f64.const nan:0x4000000000000)) (f64.const -nan:0x4000000000000)) +(assert_return (invoke "f64.no_fold_gt_if_to_abs" (f64.const -nan)) (f64.const nan)) +(assert_return (invoke "f64.no_fold_gt_if_to_abs" (f64.const 0.0)) (f64.const -0.0)) +(assert_return (invoke "f64.no_fold_gt_if_to_abs" (f64.const -0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_ge_if_to_abs" (f64.const nan:0x4000000000000)) (f64.const -nan:0x4000000000000)) +(assert_return (invoke "f64.no_fold_ge_if_to_abs" (f64.const -nan)) (f64.const nan)) +(assert_return (invoke "f64.no_fold_ge_if_to_abs" (f64.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_ge_if_to_abs" (f64.const -0.0)) (f64.const -0.0)) + +;; Test for a historic spreadsheet bug. +;; https://support.microsoft.com/en-us/kb/78113 + +(module + (func (export "incorrect_correction") (result f32) + (f32.sub (f32.sub (f32.add (f32.const 1.333) (f32.const 1.225)) (f32.const 1.333)) (f32.const 1.225)) + ) +) + +(assert_return (invoke "incorrect_correction") (f32.const 0x1p-23)) + +(module + (func (export "incorrect_correction") (result f64) + (f64.sub (f64.sub (f64.add (f64.const 1.333) (f64.const 1.225)) (f64.const 1.333)) (f64.const 1.225)) + ) +) + +(assert_return (invoke "incorrect_correction") (f64.const -0x1p-52)) + +;; Test for a historical calculator bug. +;; http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=735 + +(module + (func (export "calculate") (result f32) + (local $x f32) + (local $r f32) + (local $q f32) + (local $z0 f32) + (local $z1 f32) + (set_local $x (f32.const 156.25)) + (set_local $r (f32.const 208.333333334)) + (set_local $q (f32.const 1.77951304201)) + (set_local $z0 (f32.div (f32.mul (f32.neg (get_local $r)) (get_local $x)) (f32.sub (f32.mul (get_local $x) (get_local $q)) (get_local $r)))) + (set_local $z1 (f32.div (f32.mul (f32.neg (get_local $r)) (get_local $x)) (f32.sub (f32.mul (get_local $x) (get_local $q)) (get_local $r)))) + (block (br_if 0 (f32.eq (get_local $z0) (get_local $z1))) (unreachable)) + (get_local $z1) + ) +) + +(assert_return (invoke "calculate") (f32.const -0x1.d2ed46p+8)) + +(module + (func (export "calculate") (result f64) + (local $x f64) + (local $r f64) + (local $q f64) + (local $z0 f64) + (local $z1 f64) + (set_local $x (f64.const 156.25)) + (set_local $r (f64.const 208.333333334)) + (set_local $q (f64.const 1.77951304201)) + (set_local $z0 (f64.div (f64.mul (f64.neg (get_local $r)) (get_local $x)) (f64.sub (f64.mul (get_local $x) (get_local $q)) (get_local $r)))) + (set_local $z1 (f64.div (f64.mul (f64.neg (get_local $r)) (get_local $x)) (f64.sub (f64.mul (get_local $x) (get_local $q)) (get_local $r)))) + (block (br_if 0 (f64.eq (get_local $z0) (get_local $z1))) (unreachable)) + (get_local $z1) + ) +) + +(assert_return (invoke "calculate") (f64.const -0x1.d2ed4d0218c93p+8)) + +;; Test that 0 - (-0 - x) is not optimized to x. +;; https://llvm.org/bugs/show_bug.cgi?id=26746 + +(module + (func (export "llvm_pr26746") (param $x f32) (result f32) + (f32.sub (f32.const 0.0) (f32.sub (f32.const -0.0) (get_local $x))) + ) +) + +(assert_return (invoke "llvm_pr26746" (f32.const -0.0)) (f32.const 0.0)) + +;; Test for improperly reassociating an addition and a conversion. +;; https://llvm.org/bugs/show_bug.cgi?id=27153 + +(module + (func (export "llvm_pr27153") (param $x i32) (result f32) + (f32.add (f32.convert_s/i32 (i32.and (get_local $x) (i32.const 268435455))) (f32.const -8388608.0)) + ) +) + +(assert_return (invoke "llvm_pr27153" (i32.const 33554434)) (f32.const 25165824.000000)) + +;; Test that (float)x + (float)y is not optimized to (float)(x + y) when unsafe. +;; https://llvm.org/bugs/show_bug.cgi?id=27036 + +(module + (func (export "llvm_pr27036") (param $x i32) (param $y i32) (result f32) + (f32.add (f32.convert_s/i32 (i32.or (get_local $x) (i32.const -25034805))) + (f32.convert_s/i32 (i32.and (get_local $y) (i32.const 14942208)))) + ) +) + +(assert_return (invoke "llvm_pr27036" (i32.const -25034805) (i32.const 14942208)) (f32.const -0x1.340068p+23)) + +;; Test for bugs in old versions of historic IEEE 754 platforms as reported in: +;; +;; N. L. Schryer. 1981. A Test of a Computer's Floating-Point Arithmetic Unit. +;; Tech. Rep. Computer Science Technical Report 89, AT&T Bell Laboratories, Feb. +;; +;; specifically, the appendices describing IEEE systems with "The Past" sections +;; describing specific bugs. The 0 < 0 bug is omitted here due to being already +;; covered elsewhere. +(module + (func (export "thepast0") (param $a f64) (param $b f64) (param $c f64) (param $d f64) (result f64) + (f64.div (f64.mul (get_local $a) (get_local $b)) (f64.mul (get_local $c) (get_local $d))) + ) + + (func (export "thepast1") (param $a f64) (param $b f64) (param $c f64) (result f64) + (f64.sub (f64.mul (get_local $a) (get_local $b)) (get_local $c)) + ) + + (func (export "thepast2") (param $a f32) (param $b f32) (param $c f32) (result f32) + (f32.mul (f32.mul (get_local $a) (get_local $b)) (get_local $c)) + ) +) + +(assert_return (invoke "thepast0" (f64.const 0x1p-1021) (f64.const 0x1.fffffffffffffp-1) (f64.const 0x1p1) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp-1022)) +(assert_return (invoke "thepast1" (f64.const 0x1p-54) (f64.const 0x1.fffffffffffffp-1) (f64.const 0x1p-54)) (f64.const -0x1p-107)) +(assert_return (invoke "thepast2" (f32.const 0x1p-125) (f32.const 0x1p-1) (f32.const 0x1p0)) (f32.const 0x1p-126)) + +;; Test for floating point tolerances observed in some GPUs. +;; https://community.amd.com/thread/145582 + +(module + (func (export "inverse") (param $x f32) (result f32) + (f32.div (f32.const 1.0) (get_local $x)) + ) +) + +(assert_return (invoke "inverse" (f32.const 96.0)) (f32.const 0x1.555556p-7)) + +;; Test for incorrect rounding on sqrt(4.0). +;; http://www.askvg.com/microsoft-windows-calculator-bug/ + +(module + (func (export "f32_sqrt_minus_2") (param $x f32) (result f32) + (f32.sub (f32.sqrt (get_local $x)) (f32.const 2.0)) + ) + + (func (export "f64_sqrt_minus_2") (param $x f64) (result f64) + (f64.sub (f64.sqrt (get_local $x)) (f64.const 2.0)) + ) +) + +(assert_return (invoke "f32_sqrt_minus_2" (f32.const 4.0)) (f32.const 0.0)) +(assert_return (invoke "f64_sqrt_minus_2" (f64.const 4.0)) (f64.const 0.0)) + +;; Test that 1.0 / (1.0 / x) is not optimized to x. + +(module + (func (export "f32.no_fold_recip_recip") (param $x f32) (result f32) + (f32.div (f32.const 1.0) (f32.div (f32.const 1.0) (get_local $x)))) + + (func (export "f64.no_fold_recip_recip") (param $x f64) (result f64) + (f64.div (f64.const 1.0) (f64.div (f64.const 1.0) (get_local $x)))) +) + +(assert_return (invoke "f32.no_fold_recip_recip" (f32.const -0x1.e8bf18p+65)) (f32.const -0x1.e8bf16p+65)) +(assert_return (invoke "f32.no_fold_recip_recip" (f32.const 0x1.e24248p-77)) (f32.const 0x1.e24246p-77)) +(assert_return (invoke "f32.no_fold_recip_recip" (f32.const 0x1.caf0e8p-64)) (f32.const 0x1.caf0eap-64)) +(assert_return (invoke "f32.no_fold_recip_recip" (f32.const -0x1.e66982p+4)) (f32.const -0x1.e66984p+4)) +(assert_return (invoke "f32.no_fold_recip_recip" (f32.const 0x1.f99916p+70)) (f32.const 0x1.f99914p+70)) + +(assert_return (invoke "f32.no_fold_recip_recip" (f32.const -0x0p+0)) (f32.const -0x0p+0)) +(assert_return (invoke "f32.no_fold_recip_recip" (f32.const 0x0p+0)) (f32.const 0x0p+0)) +(assert_return (invoke "f32.no_fold_recip_recip" (f32.const -infinity)) (f32.const -infinity)) +(assert_return (invoke "f32.no_fold_recip_recip" (f32.const infinity)) (f32.const infinity)) + +(assert_return (invoke "f64.no_fold_recip_recip" (f64.const -0x1.d81248dda63dp+148)) (f64.const -0x1.d81248dda63d1p+148)) +(assert_return (invoke "f64.no_fold_recip_recip" (f64.const -0x1.f4750312039e3p+66)) (f64.const -0x1.f4750312039e2p+66)) +(assert_return (invoke "f64.no_fold_recip_recip" (f64.const 0x1.fa50630eec7f6p+166)) (f64.const 0x1.fa50630eec7f5p+166)) +(assert_return (invoke "f64.no_fold_recip_recip" (f64.const 0x1.db0598617ba92p-686)) (f64.const 0x1.db0598617ba91p-686)) +(assert_return (invoke "f64.no_fold_recip_recip" (f64.const 0x1.85f1638a0c82bp+902)) (f64.const 0x1.85f1638a0c82ap+902)) + +(assert_return (invoke "f64.no_fold_recip_recip" (f64.const -0x0p+0)) (f64.const -0x0p+0)) +(assert_return (invoke "f64.no_fold_recip_recip" (f64.const 0x0p+0)) (f64.const 0x0p+0)) +(assert_return (invoke "f64.no_fold_recip_recip" (f64.const -infinity)) (f64.const -infinity)) +(assert_return (invoke "f64.no_fold_recip_recip" (f64.const infinity)) (f64.const infinity)) + +;; Test that (x+y) * (x-y) is not optimized to x*x - y*y. + +(module + (func (export "f32.no_algebraic_factoring") (param $x f32) (param $y f32) (result f32) + (f32.mul (f32.add (get_local $x) (get_local $y)) + (f32.sub (get_local $x) (get_local $y)))) + + (func (export "f64.no_algebraic_factoring") (param $x f64) (param $y f64) (result f64) + (f64.mul (f64.add (get_local $x) (get_local $y)) + (f64.sub (get_local $x) (get_local $y)))) +) + +(assert_return (invoke "f32.no_algebraic_factoring" (f32.const -0x1.ef678ep-55) (f32.const 0x1.c160b8p-54)) (f32.const -0x1.129402p-107)) +(assert_return (invoke "f32.no_algebraic_factoring" (f32.const -0x1.2d76bcp+24) (f32.const 0x1.f4089cp+24)) (f32.const -0x1.36d89ap+49)) +(assert_return (invoke "f32.no_algebraic_factoring" (f32.const 0x1.7ca2b2p+45) (f32.const -0x1.08513cp+47)) (f32.const -0x1.db10dep+93)) +(assert_return (invoke "f32.no_algebraic_factoring" (f32.const 0x1.7d5e3p+17) (f32.const -0x1.c783b4p+7)) (f32.const 0x1.1c10a6p+35)) +(assert_return (invoke "f32.no_algebraic_factoring" (f32.const -0x1.daf96p+7) (f32.const -0x1.dac6bp+19)) (f32.const -0x1.b8422ep+39)) + +(assert_return (invoke "f64.no_algebraic_factoring" (f64.const 0x1.e17c0a02ac6b5p-476) (f64.const 0x1.e8f13f1fcdc14p-463)) (f64.const -0x1.d2ec518f62863p-925)) +(assert_return (invoke "f64.no_algebraic_factoring" (f64.const 0x1.971b55a57e3a3p-377) (f64.const 0x1.edeb4233c1b27p-399)) (f64.const 0x1.43b3f69fb258bp-753)) +(assert_return (invoke "f64.no_algebraic_factoring" (f64.const -0x1.c3b9dc02472fap-378) (f64.const -0x1.74e9faebaff14p-369)) (f64.const -0x1.0f9c07e8caa25p-737)) +(assert_return (invoke "f64.no_algebraic_factoring" (f64.const -0x1.afaf4688ed019p+179) (f64.const 0x1.b07171cb49e94p+188)) (f64.const -0x1.6d3f2e2bebcf7p+377)) +(assert_return (invoke "f64.no_algebraic_factoring" (f64.const 0x1.4377a98948f12p+114) (f64.const -0x1.500c05bd24c97p+90)) (f64.const 0x1.98b72dbf7bf72p+228)) + +;; Test that x*x - y*y is not optimized to (x+y) * (x-y). + +(module + (func (export "f32.no_algebraic_factoring") (param $x f32) (param $y f32) (result f32) + (f32.sub (f32.mul (get_local $x) (get_local $x)) + (f32.mul (get_local $y) (get_local $y)))) + + (func (export "f64.no_algebraic_factoring") (param $x f64) (param $y f64) (result f64) + (f64.sub (f64.mul (get_local $x) (get_local $x)) + (f64.mul (get_local $y) (get_local $y)))) +) + +(assert_return (invoke "f32.no_algebraic_factoring" (f32.const 0x1.8e2c14p-46) (f32.const 0x1.bad59ap-39)) (f32.const -0x1.7efe5p-77)) +(assert_return (invoke "f32.no_algebraic_factoring" (f32.const -0x1.7ef192p+41) (f32.const -0x1.db184ap+33)) (f32.const 0x1.1e6932p+83)) +(assert_return (invoke "f32.no_algebraic_factoring" (f32.const 0x1.7eb458p-12) (f32.const -0x1.52c498p-13)) (f32.const 0x1.cc0bc6p-24)) +(assert_return (invoke "f32.no_algebraic_factoring" (f32.const 0x1.2675c6p-44) (f32.const -0x1.edd31ap-46)) (f32.const 0x1.17294cp-88)) +(assert_return (invoke "f32.no_algebraic_factoring" (f32.const 0x1.9a5f92p+51) (f32.const -0x1.2b0098p+52)) (f32.const -0x1.7189a6p+103)) + +(assert_return (invoke "f64.no_algebraic_factoring" (f64.const 0x1.749a128f18f69p+356) (f64.const -0x1.0bc97ee1354e1p+337)) (f64.const 0x1.0f28115518d74p+713)) +(assert_return (invoke "f64.no_algebraic_factoring" (f64.const -0x1.2dab01b2215eap+309) (f64.const -0x1.e12b288bff2bdp+331)) (f64.const -0x1.c4319ad25d201p+663)) +(assert_return (invoke "f64.no_algebraic_factoring" (f64.const 0x1.3ed898431e102p+42) (f64.const -0x1.c409183fa92e6p+39)) (f64.const 0x1.80a611103c71dp+84)) +(assert_return (invoke "f64.no_algebraic_factoring" (f64.const -0x1.be663e4c0e4b2p+182) (f64.const -0x1.da85703760d25p+166)) (f64.const 0x1.853434f1a2ffep+365)) +(assert_return (invoke "f64.no_algebraic_factoring" (f64.const -0x1.230e09952df1cp-236) (f64.const -0x1.fa2752adfadc9p-237)) (f64.const 0x1.42e43156bd1b8p-474)) + +;; Test that plain summation is not reassociated, and that Kahan summation +;; isn't optimized into plain summation. + +(module + (memory (data + "\c4\c5\57\24\a5\84\c8\0b\6d\b8\4b\2e\f2\76\17\1c\ca\4a\56\1e\1b\6e\71\22" + "\5d\17\1e\6e\bf\cd\14\5c\c7\21\55\51\39\9c\1f\b2\51\f0\a3\93\d7\c1\2c\ae" + "\7e\a8\28\3a\01\21\f4\0a\58\93\f8\42\77\9f\83\39\6a\5f\ba\f7\0a\d8\51\6a" + "\34\ca\ad\c6\34\0e\d8\26\dc\4c\33\1c\ed\29\90\a8\78\0f\d1\ce\76\31\23\83" + "\b8\35\e8\f2\44\b0\d3\a1\fc\bb\32\e1\b0\ba\69\44\09\d6\d9\7d\ff\2e\c0\5a" + "\36\14\33\14\3e\a9\fa\87\6d\8b\bc\ce\9d\a7\fd\c4\e9\85\3f\dd\d7\e1\18\a6" + "\50\26\72\6e\3f\73\0f\f8\12\93\23\34\61\76\12\48\c0\9b\05\93\eb\ac\86\de" + "\94\3e\55\e8\8c\e8\dd\e4\fc\95\47\be\56\03\21\20\4c\e6\bf\7b\f6\7f\d5\ba" + "\73\1c\c1\14\8f\c4\27\96\b3\bd\33\ff\78\41\5f\c0\5a\ce\f6\67\6e\73\9a\17" + "\66\70\03\f8\ce\27\a3\52\b2\9f\3b\bf\fb\ae\ed\d3\5a\f8\37\57\f0\f5\6e\ef" + "\b1\4d\70\3d\54\a7\01\9a\85\08\48\91\f5\9d\0c\60\87\5b\d9\54\1e\51\6d\88" + "\8e\08\8c\a5\71\3a\56\08\67\46\8f\8f\13\2a\2c\ec\2c\1f\b4\62\2b\6f\41\0a" + "\c4\65\42\a2\31\6b\2c\7d\3e\bb\75\ac\86\97\30\d9\48\cd\9a\1f\56\c4\c6\e4" + "\12\c0\9d\fb\ee\02\8c\ce\1c\f2\1e\a1\78\23\db\c4\1e\49\03\d3\71\cc\08\50" + "\c5\d8\5c\ed\d5\b5\65\ac\b5\c9\21\d2\c9\29\76\de\f0\30\1a\5b\3c\f2\3b\db" + "\3a\39\82\3a\16\08\6f\a8\f1\be\69\69\99\71\a6\05\d3\14\93\2a\16\f2\2f\11" + "\c7\7e\20\bb\91\44\ee\f8\e4\01\53\c0\b9\7f\f0\bf\f0\03\9c\6d\b1\df\a2\44" + "\01\6d\6b\71\2b\5c\b3\21\19\46\5e\8f\db\91\d3\7c\78\6b\b7\12\00\8f\eb\bd" + "\8a\f5\d4\2e\c4\c1\1e\df\73\63\59\47\49\03\0a\b7\cf\24\cf\9c\0e\44\7a\9e" + "\14\fb\42\bf\9d\39\30\9e\a0\ab\2f\d1\ae\9e\6a\83\43\e3\55\7d\85\bf\63\8a" + "\f8\96\10\1f\fe\6d\e7\22\1b\e1\69\46\8a\44\c8\c8\f9\0c\2b\19\07\a5\02\3e" + "\f2\30\10\9a\85\8a\5f\ef\81\45\a0\77\b1\03\10\73\4b\ae\98\9d\47\bf\9a\2d" + "\3a\d5\0f\03\66\e3\3d\53\d9\40\ce\1f\6f\32\2f\21\2b\23\21\6c\62\d4\a7\3e" + "\a8\ce\28\31\2d\00\3d\67\5e\af\a0\cf\2e\d2\b9\6b\84\eb\69\08\3c\62\36\be" + "\12\fd\36\7f\88\3e\ad\bc\0b\c0\41\c4\50\b6\e3\50\31\e8\ce\e2\96\65\55\9c" + "\16\46\e6\b0\2d\3a\e8\81\05\b0\bf\34\f7\bc\10\1c\fb\cc\3c\f1\85\97\42\9f" + "\eb\14\8d\3c\bf\d7\17\88\49\9d\8b\2b\b2\3a\83\d1\4f\04\9e\a1\0f\ad\08\9d" + "\54\af\d1\82\c3\ec\32\2f\02\8f\05\21\2d\a2\b7\e4\f4\6f\2e\81\2b\0b\9c\fc" + "\cb\fe\74\02\f9\db\f4\f3\ea\00\a8\ec\d1\99\74\26\dd\d6\34\d5\25\b1\46\dd" + "\9c\aa\71\f5\60\b0\88\c8\e0\0b\59\5a\25\4f\29\66\f9\e3\2e\fe\e9\da\e5\18" + "\4f\27\62\f4\ce\a4\21\95\74\c7\57\64\27\9a\4c\fd\54\7d\61\ce\c3\ac\87\46" + "\9c\fa\ff\09\ca\79\97\67\24\74\ca\d4\21\83\26\25\19\12\37\64\19\e5\65\e0" + "\74\75\8e\dd\c8\ef\74\c7\d8\21\2b\79\04\51\46\65\60\03\5d\fa\d8\f4\65\a4" + "\9e\5d\23\da\d7\8a\92\80\a4\de\78\3c\f1\57\42\6d\cd\c9\2f\d5\a4\9e\ab\40" + "\f4\cb\1b\d7\a3\ca\fc\eb\a7\01\b2\9a\69\4e\46\9b\18\4e\dd\79\a7\aa\a6\52" + "\39\1e\ef\30\cc\9b\bd\5b\ee\4c\21\6d\30\00\72\b0\46\5f\08\cf\c5\b9\e0\3e" + "\c2\b3\0c\dc\8e\64\de\19\42\79\cf\43\ea\43\5d\8e\88\f7\ab\15\dc\3f\c8\67" + "\20\db\b8\64\b1\47\1f\de\f2\cb\3f\59\9f\d8\46\90\dc\ae\2f\22\f9\e2\31\89" + "\d9\9c\1c\4c\d3\a9\4a\57\84\9c\9f\ea\2c\3c\ae\3c\c3\1e\8b\e5\4e\17\01\25" + "\db\34\46\5f\15\ea\05\0c\7c\d9\45\8c\19\d0\73\8a\96\16\dd\44\f9\05\b7\5b" + "\71\b0\e6\21\36\5f\75\89\91\73\75\ab\7d\ae\d3\73\ec\37\c6\ea\55\75\ef\ea" + "\ab\8b\7b\11\dc\6d\1a\b2\6a\c4\25\cf\aa\e3\9f\49\49\89\cb\37\9b\0a\a7\01" + "\60\70\dc\b7\c8\83\e1\42\f5\be\ad\62\94\ad\8d\a1" + )) + + (func (export "f32.kahan_sum") (param $p i32) (param $n i32) (result f32) + (local $sum f32) + (local $c f32) + (local $t f32) + (block $exit + (loop $top + (set_local $t + (f32.sub + (f32.sub + (tee_local $sum + (f32.add + (get_local $c) + (tee_local $t + (f32.sub (f32.load (get_local $p)) (get_local $t)) + ) + ) + ) + (get_local $c) + ) + (get_local $t) + ) + ) + (set_local $p (i32.add (get_local $p) (i32.const 4))) + (set_local $c (get_local $sum)) + (br_if $top (tee_local $n (i32.add (get_local $n) (i32.const -1)))) + ) + ) + (get_local $sum) + ) + + (func (export "f32.plain_sum") (param $p i32) (param $n i32) (result f32) + (local $sum f32) + (block $exit + (loop $top + (set_local $sum (f32.add (get_local $sum) (f32.load (get_local $p)))) + (set_local $p (i32.add (get_local $p) (i32.const 4))) + (set_local $n (i32.add (get_local $n) (i32.const -1))) + (br_if $top (get_local $n)) + ) + ) + (get_local $sum) + ) +) + +(assert_return (invoke "f32.kahan_sum" (i32.const 0) (i32.const 256)) (f32.const -0x1.101a1ap+104)) +(assert_return (invoke "f32.plain_sum" (i32.const 0) (i32.const 256)) (f32.const -0x1.a0343ap+103)) + +(module + (memory (data "\13\05\84\42\5d\a2\2c\c6\43\db\55\a9\cd\da\55\e3\73\fc\58\d6\ba\d5\00\fd\83\35\42\88\8b\13\5d\38\4a\47\0d\72\73\a1\1a\ef\c4\45\17\57\d8\c9\46\e0\8d\6c\e1\37\70\c8\83\5b\55\5e\5a\2d\73\1e\56\c8\e1\6d\69\14\78\0a\8a\5a\64\3a\09\c7\a8\87\c5\f0\d3\5d\e6\03\fc\93\be\26\ca\d6\a9\91\60\bd\b0\ed\ae\f7\30\7e\92\3a\6f\a7\59\8e\aa\7d\bf\67\58\2a\54\f8\4e\fe\ed\35\58\a6\51\bf\42\e5\4b\66\27\24\6d\7f\42\2d\28\92\18\ec\08\ae\e7\55\da\b1\a6\65\a5\72\50\47\1b\b8\a9\54\d7\a6\06\5b\0f\42\58\83\8a\17\82\c6\10\43\a0\c0\2e\6d\bc\5a\85\53\72\7f\ad\44\bc\30\3c\55\b2\24\9a\74\3a\9e\e1\d8\0f\70\fc\a9\3a\cd\93\4b\ec\e3\7e\dd\5d\27\cd\f8\a0\9d\1c\11\c0\57\2e\fd\c8\13\32\cc\3a\1a\7d\a3\41\55\ed\c3\82\49\2a\04\1e\ef\73\b9\2e\2e\e3\5f\f4\df\e6\b2\33\0c\39\3f\6f\44\6a\03\c1\42\b9\fa\b1\c8\ed\a5\58\99\7f\ed\b4\72\9e\79\eb\fb\43\82\45\aa\bb\95\d2\ff\28\9e\f6\a1\ad\95\d6\55\95\0d\6f\60\11\c7\78\3e\49\f2\7e\48\f4\a2\71\d0\13\8e\b3\de\99\52\e3\45\74\ea\76\0e\1b\2a\c8\ee\14\01\c4\50\5b\36\3c\ef\ba\72\a2\a6\08\f8\7b\36\9d\f9\ef\0b\c7\56\2d\5c\f0\9d\5d\de\fc\b8\ad\0f\64\0e\97\15\32\26\c2\31\e6\05\1e\ef\cb\17\1b\6d\15\0b\74\5d\d3\2e\f8\6b\86\b4\ba\73\52\53\99\a9\76\20\45\c9\40\80\6b\14\ed\a1\fa\80\46\e6\26\d2\e6\98\c4\57\bf\c4\1c\a4\90\7a\36\94\14\ba\15\89\6e\e6\9c\37\8c\f4\de\12\22\5d\a1\79\50\67\0d\3d\7a\e9\d4\aa\2e\7f\2a\7a\30\3d\ea\5d\12\48\fe\e1\18\cd\a4\57\a2\87\3e\b6\9a\8b\db\da\9d\78\9c\cf\8d\b1\4f\90\b4\34\e0\9d\f6\ca\fe\4c\3b\78\6d\0a\5c\18\9f\61\b9\dd\b4\e0\0f\76\e0\1b\69\0d\5e\58\73\70\5e\0e\2d\a1\7d\ff\20\eb\91\34\92\ac\38\72\2a\1f\8e\71\2e\6a\f1\af\c7\27\70\d9\c4\57\f7\d2\3c\1d\b8\f0\f0\64\cf\dc\ae\be\a3\cc\3e\22\7d\4e\69\21\63\17\ed\03\02\54\9a\0f\50\4e\13\5a\35\a1\22\a4\df\86\c2\74\79\16\b8\69\69\a0\52\5d\11\64\bd\5b\93\fc\69\a0\f4\13\d0\81\51\dd\fa\0c\15\c3\7a\c9\62\7a\a9\1d\c9\e6\5a\b3\5b\97\02\3c\64\22\12\3c\22\90\64\2d\30\54\4c\b4\a1\22\09\57\22\5e\8e\38\2b\02\a8\ae\f6\be\0d\2b\f2\03\ad\fa\10\01\71\77\2a\30\02\95\f6\00\3e\d0\c4\8d\34\19\50\21\0a\bc\50\da\3c\30\d6\3a\31\94\8d\3a\fe\ef\14\57\9d\4b\93\00\96\24\0c\6f\fd\bc\23\76\02\6c\eb\52\72\80\11\7e\80\3a\13\12\38\1d\38\49\95\40\27\8a\44\7b\e8\dc\6d\8c\8c\8e\3c\b5\b3\18\0e\f6\08\1a\84\41\35\ff\8b\b8\93\40\ea\e1\51\1d\89\a5\8d\42\68\29\ea\2f\c1\7a\52\eb\90\5d\4d\d6\80\e3\d7\75\48\ce\ed\d3\01\1c\8d\5b\a5\94\0d\78\cf\f1\06\13\2f\98\02\a4\6d\2e\6c\f2\d5\74\29\89\4c\f9\03\f5\c7\18\ad\7a\f0\68\f8\5c\d6\59\87\6e\d6\3f\06\be\86\20\e3\41\91\22\f3\6e\8b\f0\68\1c\57\a7\fc\b0\7c\9e\99\0b\96\1a\89\5f\e6\0d\7c\08\51\a0\a2\67\9a\47\00\93\6b\f9\28\f0\68\db\62\f1\e0\65\2c\53\33\e0\a7\ca\11\42\30\f6\af\01\c1\65\3d\32\01\6f\ab\2e\be\d3\8b\be\14\c3\ff\ec\fb\f0\f9\c5\0c\05\6f\01\09\6b\e3\34\31\0c\1f\66\a6\42\bc\1a\87\49\16\16\8c\b0\90\0d\34\8c\0a\e1\09\5e\10\a4\6b\56\cc\f0\c9\bb\dc\b8\5c\ce\f6\cc\8d\75\7e\b3\07\88\04\2f\b4\5e\c9\e3\4a\23\73\19\62\6c\9a\03\76\44\86\9c\60\fc\db\72\8f\27\a0\dd\b3\c5\da\ff\f9\ec\6a\b1\7b\d3\cf\50\37\c9\7a\78\0c\e4\3a\b6\f5\e6\f4\98\6e\42\7d\35\73\8b\45\c0\56\97\cd\6d\ce\cf\ad\31\b3\c3\54\fa\ef\d5\c0\f4\6a\5f\54\e7\49\3e\33\0a\30\38\fd\d9\05\ff\a5\3f\57\46\14\b5\91\17\ca\6b\98\23\7a\65\b3\6c\02\b4\cc\79\5d\58\d8\b3\d5\94\ae\f4\6d\75\65\f7\92\bf\7e\47\4c\3c\ee\db\ac\f1\32\5d\fb\6f\41\1c\34\c8\83\4f\c2\58\01\be\05\3e\66\16\a6\04\6d\5d\4f\86\09\27\82\25\12\cd\3a\cd\ce\6b\bc\ca\ac\28\9b\ee\6a\25\86\9e\45\70\c6\d2\bd\3b\7d\42\e5\27\af\c7\1d\f4\81\c8\b3\76\8a\a8\36\a3\ae\2a\e6\18\e1\36\22\ad\f6\25\72\b0\39\8b\01\9a\22\7b\84\c3\2d\5f\72\a4\98\ac\15\70\e7\d4\18\e2\7d\d2\30\7c\33\08\cd\ca\c4\22\85\88\75\81\c6\4a\74\58\8d\e0\e8\ac\c5\ab\75\5a\f4\28\12\f0\18\45\52\f2\97\b2\93\41\6f\8d\7f\db\70\fb\a3\5d\1f\a7\8d\98\20\2b\22\9f\3a\01\b5\8b\1b\d2\cb\14\03\0e\14\14\d2\19\5a\1f\ce\5e\cd\81\79\15\01\ca\de\73\74\8c\56\20\9f\77\2d\25\16\f6\61\51\1d\a4\8e\9b\98\a5\c6\ec\a8\45\57\82\59\78\0d\90\b4\df\51\b0\c3\82\94\cc\b3\53\09\15\6d\96\6c\3a\40\47\b7\4a\7a\05\2f\a1\1e\8c\9d\a0\20\88\fb\52\b7\9f\f3\f3\bb\5f\e7\8a\61\a7\21\b1\ac\fa\09\aa\a4\6c\bc\24\80\ba\2a\e9\65\ff\70\ff\cc\fa\65\87\76\f3\c5\15\ce\cb\e8\42\31\00\0c\91\57\d9\e0\9d\35\54\24\ad\a4\d8\f9\08\67\63\c8\cf\81\dd\90\a2\d7\c4\07\4a\e6\10\6f\67\e7\27\d4\23\59\18\f2\a8\9d\5f\d8\94\30\aa\54\86\4f\87\9d\82\b5\26\ca\a6\96\bf\cf\55\f9\9d\37\01\19\48\43\c5\94\6c\f3\74\97\58\4c\3c\9d\08\e8\04\c2\58\30\76\e1\a0\f8\ea\e9\c5\ae\cf\78\9e\a9\0c\ac\b3\44\42\e0\bc\5d\1b\9c\49\58\4a\1c\19\49\c1\3a\ea\f5\eb\3b\81\a9\4b\70\0c\cc\9e\1a\d3\2f\b7\52\2f\20\3b\eb\64\51\1d\a0\2d\b2\3e\be\13\85\48\92\32\2e\db\5c\a1\e7\8c\45\91\35\01\0a\93\c2\eb\09\ce\f3\d2\22\24\d0\8c\cc\1d\9d\38\c8\4d\e3\82\cc\64\15\06\2d\e7\01\2f\ab\bb\b5\04\4c\92\1c\7a\d6\3f\e8\5f\31\15\0c\dc\e4\31\b4\c4\25\3e\2a\aa\00\9e\c8\e5\21\7a\7f\29\f1\c0\af\1d\5e\e8\63\39\ad\f8\7e\6c\c8\c5\7f\c2\a8\97\27\0a\d9\f4\21\6a\ea\03\09\fb\f7\96\3b\83\79\5f\7c\4b\30\9f\56\35\de\b4\73\d4\95\f0\14\c3\74\2f\0d\a3\1d\4e\8d\31\24\b3\1a\84\85\62\5a\7b\3c\14\39\17\e6\6d\eb\37\c2\00\58\5b\0b\e3\3c\8a\62\e1\f8\35\4b\56\e2\87\60\8b\be\a7\38\91\77\54\a9\5a\24\25\90\9f\a5\42\77\f3\5c\39\df\ff\74\07\76\a1\cd\1f\62\0b\81\81\68\af\05\c1\c0\7f\26\ee\c0\91\a3\6a\7d\29\61\45\27\e5\57\88\dc\0d\97\04\1a\33\a9\44\8a\da\02\10\45\3f\8e\55\a6\76\8c\4d\e3\f1\89\83\c8\d0\f8\9b\50\77\9f\47\df\4c\9c\66\0d\aa\18\b8\5f\4f\c4\01\ce\dc\84\ac\46\9e\69\e1\76\45\6b\61\89\e4\5d\94\bb\11\83\9f\78\d8\0a\d2\f5\7e\5d\43\ea\bc\10\f1\3a\c9\e2\64\fb\53\65\d0\c7\b4\a7\fb\d4\05\53\25\d0\cd\29\88\00\56\25\24\7d\5d\b4\f3\41\9f\e9\b5\f7\ae\64\2c\e3\c9\6d\d5\84\3a\72\12\b8\7a\d9\1b\09\e8\38\da\26\4f\04\ce\03\71\6e\8a\44\7b\5c\81\59\9c\d2\e4\c3\ba\59\a6\e5\28\a7\8f\9a\e4\d5\4e\b9\ca\7f\cb\75\b8\2b\43\3e\b3\15\46\b1\a5\bc\9d\9e\38\15\f1\bd\1b\21\aa\f1\82\00\95\fc\a7\77\47\39\a7\33\43\92\d7\52\40\4b\06\81\8a\a0\bd\f1\6b\99\84\42\5b\e2\3b\c5\5e\12\5c\28\4d\b6\0e\4e\c8\5c\e8\01\8a\c5\e7\e4\9d\42\ee\5d\9c\c4\eb\eb\68\09\27\92\95\9a\11\54\73\c4\12\80\fb\7d\fe\c5\08\60\7f\36\41\e0\10\ba\d6\2b\6c\f1\b4\17\fe\26\34\e3\4b\f8\a8\e3\91\be\4f\2a\fc\da\81\b8\e7\fe\d5\26\50\47\f3\1a\65\32\81\e0\05\b8\4f\32\31\26\00\4a\53\97\c2\c3\0e\2e\a1\26\54\ab\05\8e\56\2f\7d\af\22\84\68\a5\8b\97\f6\a4\fd\a8\cc\75\41\96\86\fd\27\3d\29\86\8d\7f\4c\d4\8e\73\41\f4\1e\e2\dd\58\27\97\ce\9c\94\cf\7a\04\2f\dc\ed" + )) + + (func (export "f64.kahan_sum") (param $p i32) (param $n i32) (result f64) + (local $sum f64) + (local $c f64) + (local $t f64) + (block $exit + (loop $top + (set_local $t + (f64.sub + (f64.sub + (tee_local $sum + (f64.add + (get_local $c) + (tee_local $t + (f64.sub (f64.load (get_local $p)) (get_local $t)) + ) + ) + ) + (get_local $c) + ) + (get_local $t) + ) + ) + (set_local $p (i32.add (get_local $p) (i32.const 8))) + (set_local $c (get_local $sum)) + (br_if $top (tee_local $n (i32.add (get_local $n) (i32.const -1)))) + ) + ) + (get_local $sum) + ) + + (func (export "f64.plain_sum") (param $p i32) (param $n i32) (result f64) + (local $sum f64) + (block $exit + (loop $top + (set_local $sum (f64.add (get_local $sum) (f64.load (get_local $p)))) + (set_local $p (i32.add (get_local $p) (i32.const 8))) + (set_local $n (i32.add (get_local $n) (i32.const -1))) + (br_if $top (get_local $n)) + ) + ) + (get_local $sum) + ) +) + +(assert_return (invoke "f64.kahan_sum" (i32.const 0) (i32.const 256)) (f64.const 0x1.dd7cb2a5ffc88p+998)) +(assert_return (invoke "f64.plain_sum" (i32.const 0) (i32.const 256)) (f64.const 0x1.dd7cb2a63fc87p+998)) + +;; Test that -(x - y) is not folded to y - x. + +(module + (func (export "f32.no_fold_neg_sub") (param $x f32) (param $y f32) (result f32) + (f32.neg (f32.sub (get_local $x) (get_local $y)))) + + (func (export "f64.no_fold_neg_sub") (param $x f64) (param $y f64) (result f64) + (f64.neg (f64.sub (get_local $x) (get_local $y)))) +) + +(assert_return (invoke "f32.no_fold_neg_sub" (f32.const -0.0) (f32.const -0.0)) (f32.const -0.0)) +(assert_return (invoke "f32.no_fold_neg_sub" (f32.const 0.0) (f32.const -0.0)) (f32.const -0.0)) +(assert_return (invoke "f32.no_fold_neg_sub" (f32.const -0.0) (f32.const 0.0)) (f32.const 0.0)) +(assert_return (invoke "f32.no_fold_neg_sub" (f32.const 0.0) (f32.const 0.0)) (f32.const -0.0)) + +(assert_return (invoke "f64.no_fold_neg_sub" (f64.const -0.0) (f64.const -0.0)) (f64.const -0.0)) +(assert_return (invoke "f64.no_fold_neg_sub" (f64.const 0.0) (f64.const -0.0)) (f64.const -0.0)) +(assert_return (invoke "f64.no_fold_neg_sub" (f64.const -0.0) (f64.const 0.0)) (f64.const 0.0)) +(assert_return (invoke "f64.no_fold_neg_sub" (f64.const 0.0) (f64.const 0.0)) (f64.const -0.0)) + +;; Test that -x + x is not folded to 0.0. + +(module + (func (export "f32.no_fold_add_neg") (param $x f32) (result f32) + (f32.add (f32.neg (get_local $x)) (get_local $x))) + + (func (export "f64.no_fold_add_neg") (param $x f64) (result f64) + (f64.add (f64.neg (get_local $x)) (get_local $x))) +) + +(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_nan (invoke "f32.no_fold_add_neg" (f32.const infinity))) +(assert_return_nan (invoke "f32.no_fold_add_neg" (f32.const -infinity))) + +(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_nan (invoke "f64.no_fold_add_neg" (f64.const infinity))) +(assert_return_nan (invoke "f64.no_fold_add_neg" (f64.const -infinity))) + +;; Test that x+x+x+x+x+x is not folded to x * 6. + +(module + (func (export "f32.no_fold_6x_via_add") (param $x f32) (result f32) + (f32.add (f32.add (f32.add (f32.add (f32.add + (get_local $x) + (get_local $x)) (get_local $x)) (get_local $x)) + (get_local $x)) (get_local $x))) + + (func (export "f64.no_fold_6x_via_add") (param $x f64) (result f64) + (f64.add (f64.add (f64.add (f64.add (f64.add + (get_local $x) + (get_local $x)) (get_local $x)) (get_local $x)) + (get_local $x)) (get_local $x))) +) + +(assert_return (invoke "f32.no_fold_6x_via_add" (f32.const -0x1.598a0cp+99)) (f32.const -0x1.03278ap+102)) +(assert_return (invoke "f32.no_fold_6x_via_add" (f32.const -0x1.d3e7acp-77)) (f32.const -0x1.5eedc2p-74)) +(assert_return (invoke "f32.no_fold_6x_via_add" (f32.const 0x1.00fa02p-77)) (f32.const 0x1.817702p-75)) +(assert_return (invoke "f32.no_fold_6x_via_add" (f32.const -0x1.51f434p-31)) (f32.const -0x1.faee4cp-29)) +(assert_return (invoke "f32.no_fold_6x_via_add" (f32.const -0x1.00328ap+80)) (f32.const -0x1.804bcep+82)) + +(assert_return (invoke "f64.no_fold_6x_via_add" (f64.const -0x1.310e15acaffe6p+68)) (f64.const -0x1.c995208307fdap+70)) +(assert_return (invoke "f64.no_fold_6x_via_add" (f64.const -0x1.aad62c78fa9b4p-535)) (f64.const -0x1.4020a15abbf46p-532)) +(assert_return (invoke "f64.no_fold_6x_via_add" (f64.const -0x1.f8fbfa94f6ab2p+271)) (f64.const -0x1.7abcfbefb9005p+274)) +(assert_return (invoke "f64.no_fold_6x_via_add" (f64.const 0x1.756ccc2830a8ep+751)) (f64.const 0x1.1811991e247ebp+754)) +(assert_return (invoke "f64.no_fold_6x_via_add" (f64.const -0x1.8fd1ab1d2402ap+234)) (f64.const -0x1.2bdd4055db01fp+237)) + +;; Test that (x/y)/z is not optimized to x/(y*z), +;; which is an "allowable alternative Form" in Fortran. + +(module + (func (export "f32.no_fold_div_div") (param $x f32) (param $y f32) (param $z f32) (result f32) + (f32.div (f32.div (get_local $x) (get_local $y)) (get_local $z))) + + (func (export "f64.no_fold_div_div") (param $x f64) (param $y f64) (param $z f64) (result f64) + (f64.div (f64.div (get_local $x) (get_local $y)) (get_local $z))) +) + +(assert_return (invoke "f32.no_fold_div_div" (f32.const -0x1.f70228p+78) (f32.const -0x1.fbc612p-16) (f32.const -0x1.8c379p+10)) (f32.const -0x1.47b43cp+83)) +(assert_return (invoke "f32.no_fold_div_div" (f32.const 0x1.d29d2ep-70) (f32.const 0x1.f3a17ep+110) (f32.const -0x1.64d41p-112)) (f32.const -0x0p+0)) +(assert_return (invoke "f32.no_fold_div_div" (f32.const 0x1.867f98p+43) (f32.const 0x1.30acfcp-105) (f32.const 0x1.e210d8p+105)) (f32.const infinity)) +(assert_return (invoke "f32.no_fold_div_div" (f32.const -0x1.c4001ap-14) (f32.const -0x1.9beb6cp+124) (f32.const -0x1.74f34cp-43)) (f32.const -0x1.819874p-96)) +(assert_return (invoke "f32.no_fold_div_div" (f32.const 0x1.db0e6ep+46) (f32.const 0x1.55eea2p+56) (f32.const -0x1.f3134p+124)) (f32.const -0x1.6cep-135)) + +(assert_return (invoke "f64.no_fold_div_div" (f64.const 0x1.b4dc8ec3c7777p+337) (f64.const 0x1.9f95ac2d1863p+584) (f64.const -0x1.d4318abba341ep-782)) (f64.const -0x1.2649159d87e02p+534)) +(assert_return (invoke "f64.no_fold_div_div" (f64.const -0x1.ac53af5eb445fp+791) (f64.const 0x1.8549c0a4ceb13p-29) (f64.const 0x1.64e384003c801p+316)) (f64.const -0x1.9417cdccbae91p+503)) +(assert_return (invoke "f64.no_fold_div_div" (f64.const -0x1.d2685afb27327p+2) (f64.const -0x1.abb1eeed3dbebp+880) (f64.const 0x1.a543e2e6968a3p+170)) (f64.const 0x0.0000002a69a5fp-1022)) +(assert_return (invoke "f64.no_fold_div_div" (f64.const -0x1.47ddede78ad1cp+825) (f64.const 0x1.6d932d070a367p-821) (f64.const 0x1.79cf18cc64fp+961)) (f64.const -infinity)) +(assert_return (invoke "f64.no_fold_div_div" (f64.const -0x1.f73d4979a9379p-888) (f64.const 0x1.4d83b53e97788p-596) (f64.const -0x1.f8f86c9603b5bp-139)) (f64.const 0x1.87a7bd89c586cp-154)) + +;; Test that (x/y)*(z/w) is not optimized to (x*z)/(y*w), example from +;; http://perso.ens-lyon.fr/jean-michel.muller/Handbook.html +;; section 7.4.1: FORTRAN Floating Point in a Nutshell: Philosophy + +(module + (func (export "f32.no_fold_mul_divs") (param $x f32) (param $y f32) (param $z f32) (param $w f32) (result f32) + (f32.mul (f32.div (get_local $x) (get_local $y)) (f32.div (get_local $z) (get_local $w)))) + + (func (export "f64.no_fold_mul_divs") (param $x f64) (param $y f64) (param $z f64) (param $w f64) (result f64) + (f64.mul (f64.div (get_local $x) (get_local $y)) (f64.div (get_local $z) (get_local $w)))) +) + +(assert_return (invoke "f32.no_fold_mul_divs" (f32.const -0x1.c483bep-109) (f32.const 0x1.ee1c3cp-92) (f32.const 0x1.800756p-88) (f32.const -0x1.95b972p+4)) (f32.const 0x1.bbd30cp-110)) +(assert_return (invoke "f32.no_fold_mul_divs" (f32.const -0x1.0f4262p+102) (f32.const 0x1.248498p+25) (f32.const 0x1.f66a7cp-17) (f32.const 0x1.897fc8p-3)) (f32.const -0x1.2f1aa4p+63)) +(assert_return (invoke "f32.no_fold_mul_divs" (f32.const -0x1.df5f22p+33) (f32.const -0x1.fcee3ep+39) (f32.const -0x1.9ea914p+29) (f32.const -0x1.2c4d3p+10)) (f32.const 0x1.4cf51cp+13)) +(assert_return (invoke "f32.no_fold_mul_divs" (f32.const -0x1.f568bcp+109) (f32.const 0x1.d9963p-34) (f32.const 0x1.37a87ap-16) (f32.const 0x1.a1524ap+78)) (f32.const -infinity)) +(assert_return (invoke "f32.no_fold_mul_divs" (f32.const 0x1.3dd592p-53) (f32.const -0x1.332c22p-64) (f32.const 0x1.b01064p-91) (f32.const 0x1.92bb3ap-36)) (f32.const -0x1.1c2dbp-44)) + +(assert_return (invoke "f64.no_fold_mul_divs" (f64.const -0x1.363d6764f7b12p-819) (f64.const -0x1.ed5471f660b5fp-464) (f64.const -0x1.671b0a7f3a42p+547) (f64.const 0x1.0633be34ba1f2p+186)) (f64.const -0x1.b8fa2b76baeebp+5)) +(assert_return (invoke "f64.no_fold_mul_divs" (f64.const -0x1.37880182e0fa8p+115) (f64.const 0x1.f842631576147p-920) (f64.const -0x1.999372231d156p+362) (f64.const -0x1.d5db481ab9554p+467)) (f64.const -infinity)) +(assert_return (invoke "f64.no_fold_mul_divs" (f64.const -0x1.9a747c8d4b541p+308) (f64.const -0x1.99092ad6bbdc8p+192) (f64.const -0x1.cb23755c20101p-140) (f64.const -0x1.de8716f6b0b6ap+732)) (f64.const 0x1.ecf584c8466a5p-757)) +(assert_return (invoke "f64.no_fold_mul_divs" (f64.const -0x1.c424b2ece903dp+129) (f64.const -0x1.568ce281db37fp-347) (f64.const 0x1.53900b99fd3dp-957) (f64.const 0x1.5c33952254dadp+223)) (f64.const 0x0p+0)) +(assert_return (invoke "f64.no_fold_mul_divs" (f64.const 0x1.a8ec2cecb32a9p-18) (f64.const 0x1.58acab0051851p-277) (f64.const 0x1.35e87c9077f7fp-620) (f64.const -0x1.925ee37ffb386p+352)) (f64.const -0x1.e6286970b31bfp-714)) + +;; Test that (x/z)+(y/z) is not optimized to (x+y)/z. + +(module + (func (export "f32.no_fold_add_divs") (param $x f32) (param $y f32) (param $z f32) (result f32) + (f32.add (f32.div (get_local $x) (get_local $z)) (f32.div (get_local $y) (get_local $z)))) + + (func (export "f64.no_fold_add_divs") (param $x f64) (param $y f64) (param $z f64) (result f64) + (f64.add (f64.div (get_local $x) (get_local $z)) (f64.div (get_local $y) (get_local $z)))) +) + +(assert_return (invoke "f32.no_fold_add_divs" (f32.const 0x1.795e7p+8) (f32.const -0x1.48a5eep-5) (f32.const -0x1.9a244cp+126)) (f32.const -0x1.d709b6p-119)) +(assert_return (invoke "f32.no_fold_add_divs" (f32.const -0x1.ae89e8p-63) (f32.const -0x1.e9903ep-49) (f32.const -0x1.370a8cp+47)) (f32.const 0x1.92f3f6p-96)) +(assert_return (invoke "f32.no_fold_add_divs" (f32.const -0x1.626408p-46) (f32.const 0x1.2ee5b2p-64) (f32.const -0x1.ecefaap+48)) (f32.const 0x1.701864p-95)) +(assert_return (invoke "f32.no_fold_add_divs" (f32.const -0x1.061d3p-101) (f32.const 0x1.383492p-98) (f32.const -0x1.1d92d2p+88)) (f32.const 0x0p+0)) +(assert_return (invoke "f32.no_fold_add_divs" (f32.const 0x1.1ea39ep-10) (f32.const 0x1.a7fffep-3) (f32.const 0x1.6fc574p-123)) (f32.const 0x1.28b2dep+120)) + +(assert_return (invoke "f64.no_fold_add_divs" (f64.const -0x1.c5fcc3273b136p+430) (f64.const 0x1.892a09eed8f6fp+434) (f64.const 0x1.8258b71e64397p+911)) (f64.const 0x1.e36eb9706ad82p-478)) +(assert_return (invoke "f64.no_fold_add_divs" (f64.const -0x1.2215d4061b5b3p+53) (f64.const 0x1.fb6184d97f27cp+5) (f64.const -0x1.f3bb59dacc0ebp-957)) (f64.const 0x1.2934eb0118be3p+1009)) +(assert_return (invoke "f64.no_fold_add_divs" (f64.const -0x1.e7a4533741d8ep-967) (f64.const 0x1.a519bb7feb802p-976) (f64.const 0x1.1f8a43454e51ap+504)) (f64.const 0x0p+0)) +(assert_return (invoke "f64.no_fold_add_divs" (f64.const 0x1.991c6cf93e2b4p+313) (f64.const -0x1.f2f7432698d11p+329) (f64.const 0x1.0d8c1b2453617p-126)) (f64.const -0x1.d9e1d84ddd1d4p+455)) +(assert_return (invoke "f64.no_fold_add_divs" (f64.const -0x1.d436849dc1271p-728) (f64.const 0x1.19d1c1450e52dp-755) (f64.const 0x1.fa1be69ea06fep-70)) (f64.const -0x1.d9a9b1c2f5623p-659)) + +;; Test that sqrt(x*x) is not optimized to abs(x). + +(module + (func (export "f32.no_fold_sqrt_square") (param $x f32) (result f32) + (f32.sqrt (f32.mul (get_local $x) (get_local $x)))) + + (func (export "f64.no_fold_sqrt_square") (param $x f64) (result f64) + (f64.sqrt (f64.mul (get_local $x) (get_local $x)))) +) + +(assert_return (invoke "f32.no_fold_sqrt_square" (f32.const -0x1.5cb316p-66)) (f32.const 0x1.5cb322p-66)) +(assert_return (invoke "f32.no_fold_sqrt_square" (f32.const -0x1.b0f9e4p-73)) (f32.const 0x1.b211b2p-73)) +(assert_return (invoke "f32.no_fold_sqrt_square" (f32.const -0x1.de417cp-71)) (f32.const 0x1.de65b8p-71)) +(assert_return (invoke "f32.no_fold_sqrt_square" (f32.const 0x1.64c872p-86)) (f32.const 0x0p+0)) +(assert_return (invoke "f32.no_fold_sqrt_square" (f32.const 0x1.e199e4p+108)) (f32.const infinity)) + +(assert_return (invoke "f64.no_fold_sqrt_square" (f64.const 0x1.1759d657203fdp-529)) (f64.const 0x1.1759dd57545f3p-529)) +(assert_return (invoke "f64.no_fold_sqrt_square" (f64.const -0x1.4c68de1c78d83p-514)) (f64.const 0x1.4c68de1c78d81p-514)) +(assert_return (invoke "f64.no_fold_sqrt_square" (f64.const -0x1.214736edb6e1ep-521)) (f64.const 0x1.214736ed9cf8dp-521)) +(assert_return (invoke "f64.no_fold_sqrt_square" (f64.const -0x1.0864b9f68457p-616)) (f64.const 0x0p+0)) +(assert_return (invoke "f64.no_fold_sqrt_square" (f64.const 0x1.b2a9855995abap+856)) (f64.const infinity)) + +;; Test that sqrt(x)*sqrt(y) is not optimized to sqrt(x*y). + +(module + (func (export "f32.no_fold_mul_sqrts") (param $x f32) (param $y f32) (result f32) + (f32.mul (f32.sqrt (get_local $x)) (f32.sqrt (get_local $y)))) + + (func (export "f64.no_fold_mul_sqrts") (param $x f64) (param $y f64) (result f64) + (f64.mul (f64.sqrt (get_local $x)) (f64.sqrt (get_local $y)))) +) + +(assert_return_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_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)) +(assert_return (invoke "f64.no_fold_mul_sqrts" (f64.const 0x1.8676eab7a4d0dp+24) (f64.const 0x1.75a58231ba7a5p+513)) (f64.const 0x1.0e16aebe203b3p+269)) + +;; Test that sqrt(x)/sqrt(y) is not optimized to sqrt(x/y). + +(module + (func (export "f32.no_fold_div_sqrts") (param $x f32) (param $y f32) (result f32) + (f32.div (f32.sqrt (get_local $x)) (f32.sqrt (get_local $y)))) + + (func (export "f64.no_fold_div_sqrts") (param $x f64) (param $y f64) (result f64) + (f64.div (f64.sqrt (get_local $x)) (f64.sqrt (get_local $y)))) +) + +(assert_return_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_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)) +(assert_return (invoke "f64.no_fold_div_sqrts" (f64.const 0x1.a957816ad9515p-789) (f64.const 0x1.8c18a3a222ab1p+945)) (f64.const 0x1.0948539781e92p-867)) + +;; Test that (x*sqrt(y))/y is not optimized to x/sqrt(y). + +(module + (func (export "f32.no_fold_mul_sqrt_div") (param $x f32) (param $y f32) (result f32) + (f32.div (f32.mul (get_local $x) (f32.sqrt (get_local $y))) (get_local $y))) + + (func (export "f64.no_fold_mul_sqrt_div") (param $x f64) (param $y f64) (result f64) + (f64.div (f64.mul (get_local $x) (f64.sqrt (get_local $y))) (get_local $y))) +) + +(assert_return (invoke "f32.no_fold_mul_sqrt_div" (f32.const -0x1.f4a7cap+81) (f32.const 0x1.c09adep+92)) (f32.const -infinity)) +(assert_return (invoke "f32.no_fold_mul_sqrt_div" (f32.const -0x1.90bf1cp-120) (f32.const 0x1.8dbe88p-97)) (f32.const -0x0p+0)) +(assert_return (invoke "f32.no_fold_mul_sqrt_div" (f32.const 0x1.8570e8p+29) (f32.const 0x1.217d3p-128)) (f32.const 0x1.6e391ap+93)) +(assert_return (invoke "f32.no_fold_mul_sqrt_div" (f32.const -0x1.5b4652p+43) (f32.const 0x1.a9d71cp+112)) (f32.const -0x1.0d423ap-13)) +(assert_return (invoke "f32.no_fold_mul_sqrt_div" (f32.const -0x1.910604p+8) (f32.const 0x1.0ca912p+7)) (f32.const -0x1.14cdecp+5)) + +(assert_return (invoke "f64.no_fold_mul_sqrt_div" (f64.const 0x1.1dcdeb857305fp+698) (f64.const 0x1.a066171c40eb9p+758)) (f64.const infinity)) +(assert_return (invoke "f64.no_fold_mul_sqrt_div" (f64.const -0x1.8b4f1c218e2abp-827) (f64.const 0x1.5e1ee65953b0bp-669)) (f64.const -0x0p+0)) +(assert_return (invoke "f64.no_fold_mul_sqrt_div" (f64.const 0x1.74ee531ddba38p-425) (f64.const 0x1.f370f758857f3p+560)) (f64.const 0x1.0aff34269583ep-705)) +(assert_return (invoke "f64.no_fold_mul_sqrt_div" (f64.const -0x1.27f216b0da6c5p+352) (f64.const 0x1.8e0b4e0b9fd7ep-483)) (f64.const -0x1.4fa558aad514ep+593)) +(assert_return (invoke "f64.no_fold_mul_sqrt_div" (f64.const 0x1.4c6955df9912bp+104) (f64.const 0x1.0cca42c9d371ep+842)) (f64.const 0x1.4468072f54294p-317)) + +;; Test that subnormals are not flushed even in an intermediate value in an +;; expression with a normal result. + +(module + (func (export "f32.no_flush_intermediate_subnormal") (param $x f32) (param $y f32) (param $z f32) (result f32) + (f32.mul (f32.mul (get_local $x) (get_local $y)) (get_local $z))) + + (func (export "f64.no_flush_intermediate_subnormal") (param $x f64) (param $y f64) (param $z f64) (result f64) + (f64.mul (f64.mul (get_local $x) (get_local $y)) (get_local $z))) +) + +(assert_return (invoke "f32.no_flush_intermediate_subnormal" (f32.const 0x1p-126) (f32.const 0x1p-23) (f32.const 0x1p23)) (f32.const 0x1p-126)) +(assert_return (invoke "f64.no_flush_intermediate_subnormal" (f64.const 0x1p-1022) (f64.const 0x1p-52) (f64.const 0x1p52)) (f64.const 0x1p-1022)) + +;; Test corner cases of John Hauser's microarchitectural recoding scheme. +;; https://github.com/riscv/riscv-tests/blob/695b86a6fcbe06ffbed8891af7e6fe7bf2062543/isa/rv64uf/recoding.S + +(module + (func (export "f32.recoding_eq") (param $x f32) (param $y f32) (result i32) + (f32.eq (f32.mul (get_local $x) (get_local $y)) (get_local $x))) + + (func (export "f32.recoding_le") (param $x f32) (param $y f32) (result i32) + (f32.le (f32.mul (get_local $x) (get_local $y)) (get_local $x))) + + (func (export "f32.recoding_lt") (param $x f32) (param $y f32) (result i32) + (f32.lt (f32.mul (get_local $x) (get_local $y)) (get_local $x))) + + (func (export "f64.recoding_eq") (param $x f64) (param $y f64) (result i32) + (f64.eq (f64.mul (get_local $x) (get_local $y)) (get_local $x))) + + (func (export "f64.recoding_le") (param $x f64) (param $y f64) (result i32) + (f64.le (f64.mul (get_local $x) (get_local $y)) (get_local $x))) + + (func (export "f64.recoding_lt") (param $x f64) (param $y f64) (result i32) + (f64.lt (f64.mul (get_local $x) (get_local $y)) (get_local $x))) + + (func (export "recoding_demote") (param $x f64) (param $y f32) (result f32) + (f32.mul (f32.demote/f64 (get_local $x)) (get_local $y))) +) + +(assert_return (invoke "f32.recoding_eq" (f32.const -infinity) (f32.const 3.0)) (i32.const 1)) +(assert_return (invoke "f32.recoding_le" (f32.const -infinity) (f32.const 3.0)) (i32.const 1)) +(assert_return (invoke "f32.recoding_lt" (f32.const -infinity) (f32.const 3.0)) (i32.const 0)) + +(assert_return (invoke "f32.recoding_eq" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "f32.recoding_le" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "f32.recoding_lt" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 0)) + +(assert_return (invoke "f64.recoding_eq" (f64.const -infinity) (f64.const 3.0)) (i32.const 1)) +(assert_return (invoke "f64.recoding_le" (f64.const -infinity) (f64.const 3.0)) (i32.const 1)) +(assert_return (invoke "f64.recoding_lt" (f64.const -infinity) (f64.const 3.0)) (i32.const 0)) + +(assert_return (invoke "f64.recoding_eq" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "f64.recoding_le" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 1)) +(assert_return (invoke "f64.recoding_lt" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 0)) + +(assert_return (invoke "recoding_demote" (f64.const 0x1.4c8f8p-132) (f32.const 1221)) (f32.const 0x1.8c8a1cp-122)) + +;; Test that division is not done as on an extended-base system. +;; http://www.ucbtest.org/goldberg/addendum.html + +(module + (func (export "f32.no_extended_precision_div") (param $x f32) (param $y f32) (param $z f32) (result i32) + (f32.eq (f32.div (get_local $x) (get_local $y)) (get_local $z))) + + (func (export "f64.no_extended_precision_div") (param $x f64) (param $y f64) (param $z f64) (result i32) + (f64.eq (f64.div (get_local $x) (get_local $y)) (get_local $z))) +) + +(assert_return (invoke "f32.no_extended_precision_div" (f32.const 3.0) (f32.const 7.0) (f32.const 0x1.b6db6ep-2)) (i32.const 1)) +(assert_return (invoke "f64.no_extended_precision_div" (f64.const 3.0) (f64.const 7.0) (f64.const 0x1.b6db6db6db6dbp-2)) (i32.const 1)) + +;; a*x + b*x == (a+b)*x for all x only if the operations a*x, b*x, and (a+b) +;; are all exact operations, which is true only if a and b are exact powers of +;; 2. Even then, if a==-b and x==-0, then a*x+b*x==0.0, (a+b)*x==-0.0. +;; https://dlang.org/d-floating-point.html + +(module + (func (export "f32.no_distribute_exact") (param $x f32) (result f32) + (f32.add (f32.mul (f32.const -8.0) (get_local $x)) (f32.mul (f32.const 8.0) (get_local $x)))) + + (func (export "f64.no_distribute_exact") (param $x f64) (result f64) + (f64.add (f64.mul (f64.const -8.0) (get_local $x)) (f64.mul (f64.const 8.0) (get_local $x)))) +) + +(assert_return (invoke "f32.no_distribute_exact" (f32.const -0.0)) (f32.const 0.0)) +(assert_return (invoke "f64.no_distribute_exact" (f64.const -0.0)) (f64.const 0.0)) + +;; Test that various approximations of sqrt(2), sqrt(3), and sqrt(5) compute the +;; expected approximation. +;; https://xkcd.com/1047/ +(module + (func (export "f32.sqrt") (param f32) (result f32) + (f32.sqrt (get_local 0))) + + (func (export "f32.xkcd_sqrt_2") (param f32) (param f32) (param f32) (param f32) (result f32) + (f32.add (f32.div (get_local 0) (get_local 1)) (f32.div (get_local 2) (f32.sub (get_local 3) (get_local 2))))) + + (func (export "f32.xkcd_sqrt_3") (param f32) (param f32) (param f32) (result f32) + (f32.div (f32.mul (get_local 0) (get_local 1)) (get_local 2))) + + (func (export "f32.xkcd_sqrt_5") (param f32) (param f32) (param f32) (result f32) + (f32.add (f32.div (get_local 0) (get_local 1)) (f32.div (get_local 2) (get_local 0)))) + + (func (export "f32.xkcd_better_sqrt_5") (param f32) (param f32) (param f32) (param f32) (result f32) + (f32.div (f32.add (get_local 0) (f32.mul (get_local 1) (get_local 2))) (f32.sub (get_local 3) (f32.mul (get_local 1) (get_local 2))))) + + (func (export "f64.sqrt") (param f64) (result f64) + (f64.sqrt (get_local 0))) + + (func (export "f64.xkcd_sqrt_2") (param f64) (param f64) (param f64) (param f64) (result f64) + (f64.add (f64.div (get_local 0) (get_local 1)) (f64.div (get_local 2) (f64.sub (get_local 3) (get_local 2))))) + + (func (export "f64.xkcd_sqrt_3") (param f64) (param f64) (param f64) (result f64) + (f64.div (f64.mul (get_local 0) (get_local 1)) (get_local 2))) + + (func (export "f64.xkcd_sqrt_5") (param f64) (param f64) (param f64) (result f64) + (f64.add (f64.div (get_local 0) (get_local 1)) (f64.div (get_local 2) (get_local 0)))) + + (func (export "f64.xkcd_better_sqrt_5") (param f64) (param f64) (param f64) (param f64) (result f64) + (f64.div (f64.add (get_local 0) (f64.mul (get_local 1) (get_local 2))) (f64.sub (get_local 3) (f64.mul (get_local 1) (get_local 2))))) +) + +(assert_return (invoke "f32.sqrt" (f32.const 2.0)) (f32.const 0x1.6a09e6p+0)) +(assert_return (invoke "f32.xkcd_sqrt_2" (f32.const 3.0) (f32.const 5.0) (f32.const 0x1.921fb6p+1) (f32.const 7.0)) (f32.const 0x1.6a0a54p+0)) +(assert_return (invoke "f32.sqrt" (f32.const 3.0)) (f32.const 0x1.bb67aep+0)) +(assert_return (invoke "f32.xkcd_sqrt_3" (f32.const 2.0) (f32.const 0x1.5bf0a8p+1) (f32.const 0x1.921fb6p+1)) (f32.const 0x1.bb02d4p+0)) +(assert_return (invoke "f32.sqrt" (f32.const 5.0)) (f32.const 0x1.1e377ap+1)) +(assert_return (invoke "f32.xkcd_sqrt_5" (f32.const 2.0) (f32.const 0x1.5bf0a8p+1) (f32.const 3.0)) (f32.const 0x1.1e2d58p+1)) +(assert_return (invoke "f32.xkcd_better_sqrt_5" (f32.const 13.0) (f32.const 4.0) (f32.const 0x1.921fb6p+1) (f32.const 24.0)) (f32.const 0x1.1e377ap+1)) + +(assert_return (invoke "f64.sqrt" (f64.const 2.0)) (f64.const 0x1.6a09e667f3bcdp+0)) +(assert_return (invoke "f64.xkcd_sqrt_2" (f64.const 3.0) (f64.const 5.0) (f64.const 0x1.921fb54442d18p+1) (f64.const 7.0)) (f64.const 0x1.6a0a5362b055fp+0)) +(assert_return (invoke "f64.sqrt" (f64.const 3.0)) (f64.const 0x1.bb67ae8584caap+0)) +(assert_return (invoke "f64.xkcd_sqrt_3" (f64.const 2.0) (f64.const 0x1.5bf0a8b145769p+1) (f64.const 0x1.921fb54442d18p+1)) (f64.const 0x1.bb02d4eca8f95p+0)) +(assert_return (invoke "f64.sqrt" (f64.const 5.0)) (f64.const 0x1.1e3779b97f4a8p+1)) +(assert_return (invoke "f64.xkcd_sqrt_5" (f64.const 2.0) (f64.const 0x1.5bf0a8b145769p+1) (f64.const 3.0)) (f64.const 0x1.1e2d58d8b3bcep+1)) +(assert_return (invoke "f64.xkcd_better_sqrt_5" (f64.const 13.0) (f64.const 4.0) (f64.const 0x1.921fb54442d18p+1) (f64.const 24.0)) (f64.const 0x1.1e3778509a5a3p+1)) + +;; Compute the floating-point radix. +;; M. A. Malcom. Algorithms to reveal properties of floating-point arithmetic. +;; Communications of the ACM, 15(11):949-951, November 1972. +(module + (func (export "f32.compute_radix") (param $0 f32) (param $1 f32) (result f32) + (loop $label$0 + (br_if $label$0 + (f32.eq + (f32.add + (f32.sub + (f32.add + (tee_local $0 (f32.add (get_local $0) (get_local $0))) + (f32.const 1) + ) + (get_local $0) + ) + (f32.const -1) + ) + (f32.const 0) + ) + ) + ) + (loop $label$2 + (br_if $label$2 + (f32.ne + (f32.sub + (f32.sub + (f32.add + (get_local $0) + (tee_local $1 (f32.add (get_local $1) (f32.const 1))) + ) + (get_local $0) + ) + (get_local $1) + ) + (f32.const 0) + ) + ) + ) + (get_local $1) + ) + + (func (export "f64.compute_radix") (param $0 f64) (param $1 f64) (result f64) + (loop $label$0 + (br_if $label$0 + (f64.eq + (f64.add + (f64.sub + (f64.add + (tee_local $0 (f64.add (get_local $0) (get_local $0))) + (f64.const 1) + ) + (get_local $0) + ) + (f64.const -1) + ) + (f64.const 0) + ) + ) + ) + (loop $label$2 + (br_if $label$2 + (f64.ne + (f64.sub + (f64.sub + (f64.add + (get_local $0) + (tee_local $1 (f64.add (get_local $1) (f64.const 1))) + ) + (get_local $0) + ) + (get_local $1) + ) + (f64.const 0) + ) + ) + ) + (get_local $1) + ) +) + +(assert_return (invoke "f32.compute_radix" (f32.const 1.0) (f32.const 1.0)) (f32.const 2.0)) +(assert_return (invoke "f64.compute_radix" (f64.const 1.0) (f64.const 1.0)) (f64.const 2.0)) + +;; Test that (x - 1) * y + y is not optimized to x * y. +;; http://blog.frama-c.com/index.php?post/2013/05/14/Contrarianism + +(module + (func (export "f32.no_fold_sub1_mul_add") (param $x f32) (param $y f32) (result f32) + (f32.add (f32.mul (f32.sub (get_local $x) (f32.const 1.0)) (get_local $y)) (get_local $y))) + + (func (export "f64.no_fold_sub1_mul_add") (param $x f64) (param $y f64) (result f64) + (f64.add (f64.mul (f64.sub (get_local $x) (f64.const 1.0)) (get_local $y)) (get_local $y))) +) + +(assert_return (invoke "f32.no_fold_sub1_mul_add" (f32.const 0x1p-32) (f32.const 1.0)) (f32.const 0x0p+0)) +(assert_return (invoke "f64.no_fold_sub1_mul_add" (f64.const 0x1p-64) (f64.const 1.0)) (f64.const 0x0p+0)) + +;; Test that x+z >= y+z is not optimized to x >= y (monotonicity). +;; http://cs.nyu.edu/courses/spring13/CSCI-UA.0201-003/lecture6.pdf + +(module + (func (export "f32.no_fold_add_le_monotonicity") (param $x f32) (param $y f32) (param $z f32) (result i32) + (f32.le (f32.add (get_local $x) (get_local $z)) (f32.add (get_local $y) (get_local $z)))) + + (func (export "f32.no_fold_add_ge_monotonicity") (param $x f32) (param $y f32) (param $z f32) (result i32) + (f32.ge (f32.add (get_local $x) (get_local $z)) (f32.add (get_local $y) (get_local $z)))) + + (func (export "f64.no_fold_add_le_monotonicity") (param $x f64) (param $y f64) (param $z f64) (result i32) + (f64.le (f64.add (get_local $x) (get_local $z)) (f64.add (get_local $y) (get_local $z)))) + + (func (export "f64.no_fold_add_ge_monotonicity") (param $x f64) (param $y f64) (param $z f64) (result i32) + (f64.ge (f64.add (get_local $x) (get_local $z)) (f64.add (get_local $y) (get_local $z)))) +) + +(assert_return (invoke "f32.no_fold_add_le_monotonicity" (f32.const 0.0) (f32.const 0.0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "f32.no_fold_add_le_monotonicity" (f32.const infinity) (f32.const -infinity) (f32.const infinity)) (i32.const 0)) +(assert_return (invoke "f64.no_fold_add_le_monotonicity" (f64.const 0.0) (f64.const 0.0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "f64.no_fold_add_le_monotonicity" (f64.const infinity) (f64.const -infinity) (f64.const infinity)) (i32.const 0)) + +;; Test that !(x < y) and friends are not optimized to x >= y and friends. + +(module + (func (export "f32.not_lt") (param $x f32) (param $y f32) (result i32) + (i32.eqz (f32.lt (get_local $x) (get_local $y)))) + + (func (export "f32.not_le") (param $x f32) (param $y f32) (result i32) + (i32.eqz (f32.le (get_local $x) (get_local $y)))) + + (func (export "f32.not_gt") (param $x f32) (param $y f32) (result i32) + (i32.eqz (f32.gt (get_local $x) (get_local $y)))) + + (func (export "f32.not_ge") (param $x f32) (param $y f32) (result i32) + (i32.eqz (f32.ge (get_local $x) (get_local $y)))) + + (func (export "f64.not_lt") (param $x f64) (param $y f64) (result i32) + (i32.eqz (f64.lt (get_local $x) (get_local $y)))) + + (func (export "f64.not_le") (param $x f64) (param $y f64) (result i32) + (i32.eqz (f64.le (get_local $x) (get_local $y)))) + + (func (export "f64.not_gt") (param $x f64) (param $y f64) (result i32) + (i32.eqz (f64.gt (get_local $x) (get_local $y)))) + + (func (export "f64.not_ge") (param $x f64) (param $y f64) (result i32) + (i32.eqz (f64.ge (get_local $x) (get_local $y)))) +) + +(assert_return (invoke "f32.not_lt" (f32.const nan) (f32.const 0.0)) (i32.const 1)) +(assert_return (invoke "f32.not_le" (f32.const nan) (f32.const 0.0)) (i32.const 1)) +(assert_return (invoke "f32.not_gt" (f32.const nan) (f32.const 0.0)) (i32.const 1)) +(assert_return (invoke "f32.not_ge" (f32.const nan) (f32.const 0.0)) (i32.const 1)) +(assert_return (invoke "f64.not_lt" (f64.const nan) (f64.const 0.0)) (i32.const 1)) +(assert_return (invoke "f64.not_le" (f64.const nan) (f64.const 0.0)) (i32.const 1)) +(assert_return (invoke "f64.not_gt" (f64.const nan) (f64.const 0.0)) (i32.const 1)) +(assert_return (invoke "f64.not_ge" (f64.const nan) (f64.const 0.0)) (i32.const 1)) + +;; Test that a method for approximating a "machine epsilon" produces the expected +;; approximation. +;; http://blogs.mathworks.com/cleve/2014/07/07/floating-point-numbers/#24cb4f4d-b8a9-4c19-b22b-9d2a9f7f3812 + +(module + (func (export "f32.epsilon") (result f32) + (f32.sub (f32.const 1.0) (f32.mul (f32.const 3.0) (f32.sub (f32.div (f32.const 4.0) (f32.const 3.0)) (f32.const 1.0))))) + + (func (export "f64.epsilon") (result f64) + (f64.sub (f64.const 1.0) (f64.mul (f64.const 3.0) (f64.sub (f64.div (f64.const 4.0) (f64.const 3.0)) (f64.const 1.0))))) +) + +(assert_return (invoke "f32.epsilon") (f32.const -0x1p-23)) +(assert_return (invoke "f64.epsilon") (f64.const 0x1p-52)) + +;; Test that floating-point numbers are not optimized as if they form a +;; trichotomy. + +(module + (func (export "f32.no_trichotomy_lt") (param $x f32) (param $y f32) (result i32) + (i32.or (f32.lt (get_local $x) (get_local $y)) (f32.ge (get_local $x) (get_local $y)))) + (func (export "f32.no_trichotomy_le") (param $x f32) (param $y f32) (result i32) + (i32.or (f32.le (get_local $x) (get_local $y)) (f32.gt (get_local $x) (get_local $y)))) + (func (export "f32.no_trichotomy_gt") (param $x f32) (param $y f32) (result i32) + (i32.or (f32.gt (get_local $x) (get_local $y)) (f32.le (get_local $x) (get_local $y)))) + (func (export "f32.no_trichotomy_ge") (param $x f32) (param $y f32) (result i32) + (i32.or (f32.ge (get_local $x) (get_local $y)) (f32.lt (get_local $x) (get_local $y)))) + + (func (export "f64.no_trichotomy_lt") (param $x f64) (param $y f64) (result i32) + (i32.or (f64.lt (get_local $x) (get_local $y)) (f64.ge (get_local $x) (get_local $y)))) + (func (export "f64.no_trichotomy_le") (param $x f64) (param $y f64) (result i32) + (i32.or (f64.le (get_local $x) (get_local $y)) (f64.gt (get_local $x) (get_local $y)))) + (func (export "f64.no_trichotomy_gt") (param $x f64) (param $y f64) (result i32) + (i32.or (f64.gt (get_local $x) (get_local $y)) (f64.le (get_local $x) (get_local $y)))) + (func (export "f64.no_trichotomy_ge") (param $x f64) (param $y f64) (result i32) + (i32.or (f64.ge (get_local $x) (get_local $y)) (f64.lt (get_local $x) (get_local $y)))) +) + +(assert_return (invoke "f32.no_trichotomy_lt" (f32.const 0.0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "f32.no_trichotomy_le" (f32.const 0.0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "f32.no_trichotomy_gt" (f32.const 0.0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "f32.no_trichotomy_ge" (f32.const 0.0) (f32.const nan)) (i32.const 0)) +(assert_return (invoke "f64.no_trichotomy_lt" (f64.const 0.0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "f64.no_trichotomy_le" (f64.const 0.0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "f64.no_trichotomy_gt" (f64.const 0.0) (f64.const nan)) (i32.const 0)) +(assert_return (invoke "f64.no_trichotomy_ge" (f64.const 0.0) (f64.const nan)) (i32.const 0)) diff --git a/js/src/jit-test/tests/wasm/spec/float_exprs.wast.js b/js/src/jit-test/tests/wasm/spec/float_exprs.wast.js new file mode 100644 index 000000000..23dd67ff9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/float_exprs.wast.js @@ -0,0 +1 @@ +var importedArgs = ['float_exprs.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/float_literals.wast b/js/src/jit-test/tests/wasm/spec/float_literals.wast new file mode 100644 index 000000000..c69d81fb7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/float_literals.wast @@ -0,0 +1,137 @@ +;; Test floating-point literal parsing. + +(module + ;; f32 special values + (func (export "f32.nan") (result i32) (i32.reinterpret/f32 (f32.const nan))) + (func (export "f32.positive_nan") (result i32) (i32.reinterpret/f32 (f32.const +nan))) + (func (export "f32.negative_nan") (result i32) (i32.reinterpret/f32 (f32.const -nan))) + (func (export "f32.plain_nan") (result i32) (i32.reinterpret/f32 (f32.const nan:0x400000))) + (func (export "f32.informally_known_as_plain_snan") (result i32) (i32.reinterpret/f32 (f32.const nan:0x200000))) + (func (export "f32.all_ones_nan") (result i32) (i32.reinterpret/f32 (f32.const -nan:0x7fffff))) + (func (export "f32.misc_nan") (result i32) (i32.reinterpret/f32 (f32.const nan:0x012345))) + (func (export "f32.misc_positive_nan") (result i32) (i32.reinterpret/f32 (f32.const +nan:0x304050))) + (func (export "f32.misc_negative_nan") (result i32) (i32.reinterpret/f32 (f32.const -nan:0x2abcde))) + (func (export "f32.infinity") (result i32) (i32.reinterpret/f32 (f32.const infinity))) + (func (export "f32.positive_infinity") (result i32) (i32.reinterpret/f32 (f32.const +infinity))) + (func (export "f32.negative_infinity") (result i32) (i32.reinterpret/f32 (f32.const -infinity))) + + ;; f32 numbers + (func (export "f32.zero") (result i32) (i32.reinterpret/f32 (f32.const 0x0.0p0))) + (func (export "f32.positive_zero") (result i32) (i32.reinterpret/f32 (f32.const +0x0.0p0))) + (func (export "f32.negative_zero") (result i32) (i32.reinterpret/f32 (f32.const -0x0.0p0))) + (func (export "f32.misc") (result i32) (i32.reinterpret/f32 (f32.const 0x1.921fb6p+2))) + (func (export "f32.min_positive") (result i32) (i32.reinterpret/f32 (f32.const 0x1p-149))) + (func (export "f32.min_normal") (result i32) (i32.reinterpret/f32 (f32.const 0x1p-126))) + (func (export "f32.max_finite") (result i32) (i32.reinterpret/f32 (f32.const 0x1.fffffep+127))) + (func (export "f32.max_subnormal") (result i32) (i32.reinterpret/f32 (f32.const 0x1.fffffcp-127))) + (func (export "f32.trailing_dot") (result i32) (i32.reinterpret/f32 (f32.const 0x1.p10))) + + ;; f32 in decimal format + (func (export "f32_dec.zero") (result i32) (i32.reinterpret/f32 (f32.const 0.0e0))) + (func (export "f32_dec.positive_zero") (result i32) (i32.reinterpret/f32 (f32.const +0.0e0))) + (func (export "f32_dec.negative_zero") (result i32) (i32.reinterpret/f32 (f32.const -0.0e0))) + (func (export "f32_dec.misc") (result i32) (i32.reinterpret/f32 (f32.const 6.28318548202514648))) + (func (export "f32_dec.min_positive") (result i32) (i32.reinterpret/f32 (f32.const 1.4013e-45))) + (func (export "f32_dec.min_normal") (result i32) (i32.reinterpret/f32 (f32.const 1.1754944e-38))) + (func (export "f32_dec.max_subnormal") (result i32) (i32.reinterpret/f32 (f32.const 1.1754942e-38))) + (func (export "f32_dec.max_finite") (result i32) (i32.reinterpret/f32 (f32.const 3.4028234e+38))) + (func (export "f32_dec.trailing_dot") (result i32) (i32.reinterpret/f32 (f32.const 1.e10))) + + ;; f64 special values + (func (export "f64.nan") (result i64) (i64.reinterpret/f64 (f64.const nan))) + (func (export "f64.positive_nan") (result i64) (i64.reinterpret/f64 (f64.const +nan))) + (func (export "f64.negative_nan") (result i64) (i64.reinterpret/f64 (f64.const -nan))) + (func (export "f64.plain_nan") (result i64) (i64.reinterpret/f64 (f64.const nan:0x8000000000000))) + (func (export "f64.informally_known_as_plain_snan") (result i64) (i64.reinterpret/f64 (f64.const nan:0x4000000000000))) + (func (export "f64.all_ones_nan") (result i64) (i64.reinterpret/f64 (f64.const -nan:0xfffffffffffff))) + (func (export "f64.misc_nan") (result i64) (i64.reinterpret/f64 (f64.const nan:0x0123456789abc))) + (func (export "f64.misc_positive_nan") (result i64) (i64.reinterpret/f64 (f64.const +nan:0x3040506070809))) + (func (export "f64.misc_negative_nan") (result i64) (i64.reinterpret/f64 (f64.const -nan:0x2abcdef012345))) + (func (export "f64.infinity") (result i64) (i64.reinterpret/f64 (f64.const infinity))) + (func (export "f64.positive_infinity") (result i64) (i64.reinterpret/f64 (f64.const +infinity))) + (func (export "f64.negative_infinity") (result i64) (i64.reinterpret/f64 (f64.const -infinity))) + + ;; f64 numbers + (func (export "f64.zero") (result i64) (i64.reinterpret/f64 (f64.const 0x0.0p0))) + (func (export "f64.positive_zero") (result i64) (i64.reinterpret/f64 (f64.const +0x0.0p0))) + (func (export "f64.negative_zero") (result i64) (i64.reinterpret/f64 (f64.const -0x0.0p0))) + (func (export "f64.misc") (result i64) (i64.reinterpret/f64 (f64.const 0x1.921fb54442d18p+2))) + (func (export "f64.min_positive") (result i64) (i64.reinterpret/f64 (f64.const 0x0.0000000000001p-1022))) + (func (export "f64.min_normal") (result i64) (i64.reinterpret/f64 (f64.const 0x1p-1022))) + (func (export "f64.max_subnormal") (result i64) (i64.reinterpret/f64 (f64.const 0x0.fffffffffffffp-1022))) + (func (export "f64.max_finite") (result i64) (i64.reinterpret/f64 (f64.const 0x1.fffffffffffffp+1023))) + (func (export "f64.trailing_dot") (result i64) (i64.reinterpret/f64 (f64.const 0x1.p100))) + + ;; f64 numbers in decimal format + (func (export "f64_dec.zero") (result i64) (i64.reinterpret/f64 (f64.const 0.0e0))) + (func (export "f64_dec.positive_zero") (result i64) (i64.reinterpret/f64 (f64.const +0.0e0))) + (func (export "f64_dec.negative_zero") (result i64) (i64.reinterpret/f64 (f64.const -0.0e0))) + (func (export "f64_dec.misc") (result i64) (i64.reinterpret/f64 (f64.const 6.28318530717958623))) + (func (export "f64_dec.min_positive") (result i64) (i64.reinterpret/f64 (f64.const 4.94066e-324))) + (func (export "f64_dec.min_normal") (result i64) (i64.reinterpret/f64 (f64.const 2.2250738585072012e-308))) + (func (export "f64_dec.max_subnormal") (result i64) (i64.reinterpret/f64 (f64.const 2.2250738585072011e-308))) + (func (export "f64_dec.max_finite") (result i64) (i64.reinterpret/f64 (f64.const 1.7976931348623157e+308))) + (func (export "f64_dec.trailing_dot") (result i64) (i64.reinterpret/f64 (f64.const 1.e100))) +) + +(assert_return (invoke "f32.nan") (i32.const 0x7fc00000)) +(assert_return (invoke "f32.positive_nan") (i32.const 0x7fc00000)) +(assert_return (invoke "f32.negative_nan") (i32.const 0xffc00000)) +(assert_return (invoke "f32.plain_nan") (i32.const 0x7fc00000)) +(assert_return (invoke "f32.informally_known_as_plain_snan") (i32.const 0x7fa00000)) +(assert_return (invoke "f32.all_ones_nan") (i32.const 0xffffffff)) +(assert_return (invoke "f32.misc_nan") (i32.const 0x7f812345)) +(assert_return (invoke "f32.misc_positive_nan") (i32.const 0x7fb04050)) +(assert_return (invoke "f32.misc_negative_nan") (i32.const 0xffaabcde)) +(assert_return (invoke "f32.infinity") (i32.const 0x7f800000)) +(assert_return (invoke "f32.positive_infinity") (i32.const 0x7f800000)) +(assert_return (invoke "f32.negative_infinity") (i32.const 0xff800000)) +(assert_return (invoke "f32.zero") (i32.const 0)) +(assert_return (invoke "f32.positive_zero") (i32.const 0)) +(assert_return (invoke "f32.negative_zero") (i32.const 0x80000000)) +(assert_return (invoke "f32.misc") (i32.const 0x40c90fdb)) +(assert_return (invoke "f32.min_positive") (i32.const 1)) +(assert_return (invoke "f32.min_normal") (i32.const 0x800000)) +(assert_return (invoke "f32.max_subnormal") (i32.const 0x7fffff)) +(assert_return (invoke "f32.max_finite") (i32.const 0x7f7fffff)) +(assert_return (invoke "f32.trailing_dot") (i32.const 0x44800000)) +(assert_return (invoke "f32_dec.zero") (i32.const 0)) +(assert_return (invoke "f32_dec.positive_zero") (i32.const 0)) +(assert_return (invoke "f32_dec.negative_zero") (i32.const 0x80000000)) +(assert_return (invoke "f32_dec.misc") (i32.const 0x40c90fdb)) +(assert_return (invoke "f32_dec.min_positive") (i32.const 1)) +(assert_return (invoke "f32_dec.min_normal") (i32.const 0x800000)) +(assert_return (invoke "f32_dec.max_subnormal") (i32.const 0x7fffff)) +(assert_return (invoke "f32_dec.max_finite") (i32.const 0x7f7fffff)) +(assert_return (invoke "f32_dec.trailing_dot") (i32.const 0x501502f9)) + +(assert_return (invoke "f64.nan") (i64.const 0x7ff8000000000000)) +(assert_return (invoke "f64.positive_nan") (i64.const 0x7ff8000000000000)) +(assert_return (invoke "f64.negative_nan") (i64.const 0xfff8000000000000)) +(assert_return (invoke "f64.plain_nan") (i64.const 0x7ff8000000000000)) +(assert_return (invoke "f64.informally_known_as_plain_snan") (i64.const 0x7ff4000000000000)) +(assert_return (invoke "f64.all_ones_nan") (i64.const 0xffffffffffffffff)) +(assert_return (invoke "f64.misc_nan") (i64.const 0x7ff0123456789abc)) +(assert_return (invoke "f64.misc_positive_nan") (i64.const 0x7ff3040506070809)) +(assert_return (invoke "f64.misc_negative_nan") (i64.const 0xfff2abcdef012345)) +(assert_return (invoke "f64.infinity") (i64.const 0x7ff0000000000000)) +(assert_return (invoke "f64.positive_infinity") (i64.const 0x7ff0000000000000)) +(assert_return (invoke "f64.negative_infinity") (i64.const 0xfff0000000000000)) +(assert_return (invoke "f64.zero") (i64.const 0)) +(assert_return (invoke "f64.positive_zero") (i64.const 0)) +(assert_return (invoke "f64.negative_zero") (i64.const 0x8000000000000000)) +(assert_return (invoke "f64.misc") (i64.const 0x401921fb54442d18)) +(assert_return (invoke "f64.min_positive") (i64.const 1)) +(assert_return (invoke "f64.min_normal") (i64.const 0x10000000000000)) +(assert_return (invoke "f64.max_subnormal") (i64.const 0xfffffffffffff)) +(assert_return (invoke "f64.max_finite") (i64.const 0x7fefffffffffffff)) +(assert_return (invoke "f64.trailing_dot") (i64.const 0x4630000000000000)) +(assert_return (invoke "f64_dec.zero") (i64.const 0)) +(assert_return (invoke "f64_dec.positive_zero") (i64.const 0)) +(assert_return (invoke "f64_dec.negative_zero") (i64.const 0x8000000000000000)) +(assert_return (invoke "f64_dec.misc") (i64.const 0x401921fb54442d18)) +(assert_return (invoke "f64_dec.min_positive") (i64.const 1)) +(assert_return (invoke "f64_dec.min_normal") (i64.const 0x10000000000000)) +(assert_return (invoke "f64_dec.max_subnormal") (i64.const 0xfffffffffffff)) +(assert_return (invoke "f64_dec.max_finite") (i64.const 0x7fefffffffffffff)) +(assert_return (invoke "f64_dec.trailing_dot") (i64.const 0x54b249ad2594c37d)) diff --git a/js/src/jit-test/tests/wasm/spec/float_literals.wast.js b/js/src/jit-test/tests/wasm/spec/float_literals.wast.js new file mode 100644 index 000000000..fd1452f2d --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/float_literals.wast.js @@ -0,0 +1 @@ +var importedArgs = ['float_literals.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/float_memory.wast b/js/src/jit-test/tests/wasm/spec/float_memory.wast new file mode 100644 index 000000000..3801158f9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/float_memory.wast @@ -0,0 +1,157 @@ +;; Test that floating-point load and store are bit-preserving. + +;; Test that load and store do not canonicalize NaNs as x87 does. + +(module + (memory (data "\00\00\a0\7f")) + + (func (export "f32.load") (result f32) (f32.load (i32.const 0))) + (func (export "i32.load") (result i32) (i32.load (i32.const 0))) + (func (export "f32.store") (f32.store (i32.const 0) (f32.const nan:0x200000))) + (func (export "i32.store") (i32.store (i32.const 0) (i32.const 0x7fa00000))) + (func (export "reset") (i32.store (i32.const 0) (i32.const 0))) +) + +(assert_return (invoke "i32.load") (i32.const 0x7fa00000)) +(assert_return (invoke "f32.load") (f32.const nan:0x200000)) +(invoke "reset") +(assert_return (invoke "i32.load") (i32.const 0x0)) +(assert_return (invoke "f32.load") (f32.const 0.0)) +(invoke "f32.store") +(assert_return (invoke "i32.load") (i32.const 0x7fa00000)) +(assert_return (invoke "f32.load") (f32.const nan:0x200000)) +(invoke "reset") +(assert_return (invoke "i32.load") (i32.const 0x0)) +(assert_return (invoke "f32.load") (f32.const 0.0)) +(invoke "i32.store") +(assert_return (invoke "i32.load") (i32.const 0x7fa00000)) +(assert_return (invoke "f32.load") (f32.const nan:0x200000)) + +(module + (memory (data "\00\00\00\00\00\00\f4\7f")) + + (func (export "f64.load") (result f64) (f64.load (i32.const 0))) + (func (export "i64.load") (result i64) (i64.load (i32.const 0))) + (func (export "f64.store") (f64.store (i32.const 0) (f64.const nan:0x4000000000000))) + (func (export "i64.store") (i64.store (i32.const 0) (i64.const 0x7ff4000000000000))) + (func (export "reset") (i64.store (i32.const 0) (i64.const 0))) +) + +(assert_return (invoke "i64.load") (i64.const 0x7ff4000000000000)) +(assert_return (invoke "f64.load") (f64.const nan:0x4000000000000)) +(invoke "reset") +(assert_return (invoke "i64.load") (i64.const 0x0)) +(assert_return (invoke "f64.load") (f64.const 0.0)) +(invoke "f64.store") +(assert_return (invoke "i64.load") (i64.const 0x7ff4000000000000)) +(assert_return (invoke "f64.load") (f64.const nan:0x4000000000000)) +(invoke "reset") +(assert_return (invoke "i64.load") (i64.const 0x0)) +(assert_return (invoke "f64.load") (f64.const 0.0)) +(invoke "i64.store") +(assert_return (invoke "i64.load") (i64.const 0x7ff4000000000000)) +(assert_return (invoke "f64.load") (f64.const nan:0x4000000000000)) + +;; Test that unaligned load and store do not canonicalize NaNs. + +(module + (memory (data "\00\00\00\a0\7f")) + + (func (export "f32.load") (result f32) (f32.load (i32.const 1))) + (func (export "i32.load") (result i32) (i32.load (i32.const 1))) + (func (export "f32.store") (f32.store (i32.const 1) (f32.const nan:0x200000))) + (func (export "i32.store") (i32.store (i32.const 1) (i32.const 0x7fa00000))) + (func (export "reset") (i32.store (i32.const 1) (i32.const 0))) +) + +(assert_return (invoke "i32.load") (i32.const 0x7fa00000)) +(assert_return (invoke "f32.load") (f32.const nan:0x200000)) +(invoke "reset") +(assert_return (invoke "i32.load") (i32.const 0x0)) +(assert_return (invoke "f32.load") (f32.const 0.0)) +(invoke "f32.store") +(assert_return (invoke "i32.load") (i32.const 0x7fa00000)) +(assert_return (invoke "f32.load") (f32.const nan:0x200000)) +(invoke "reset") +(assert_return (invoke "i32.load") (i32.const 0x0)) +(assert_return (invoke "f32.load") (f32.const 0.0)) +(invoke "i32.store") +(assert_return (invoke "i32.load") (i32.const 0x7fa00000)) +(assert_return (invoke "f32.load") (f32.const nan:0x200000)) + +(module + (memory (data "\00\00\00\00\00\00\00\f4\7f")) + + (func (export "f64.load") (result f64) (f64.load (i32.const 1))) + (func (export "i64.load") (result i64) (i64.load (i32.const 1))) + (func (export "f64.store") (f64.store (i32.const 1) (f64.const nan:0x4000000000000))) + (func (export "i64.store") (i64.store (i32.const 1) (i64.const 0x7ff4000000000000))) + (func (export "reset") (i64.store (i32.const 1) (i64.const 0))) +) + +(assert_return (invoke "i64.load") (i64.const 0x7ff4000000000000)) +(assert_return (invoke "f64.load") (f64.const nan:0x4000000000000)) +(invoke "reset") +(assert_return (invoke "i64.load") (i64.const 0x0)) +(assert_return (invoke "f64.load") (f64.const 0.0)) +(invoke "f64.store") +(assert_return (invoke "i64.load") (i64.const 0x7ff4000000000000)) +(assert_return (invoke "f64.load") (f64.const nan:0x4000000000000)) +(invoke "reset") +(assert_return (invoke "i64.load") (i64.const 0x0)) +(assert_return (invoke "f64.load") (f64.const 0.0)) +(invoke "i64.store") +(assert_return (invoke "i64.load") (i64.const 0x7ff4000000000000)) +(assert_return (invoke "f64.load") (f64.const nan:0x4000000000000)) + +;; Test that load and store do not canonicalize NaNs as some JS engines do. + +(module + (memory (data "\01\00\d0\7f")) + + (func (export "f32.load") (result f32) (f32.load (i32.const 0))) + (func (export "i32.load") (result i32) (i32.load (i32.const 0))) + (func (export "f32.store") (f32.store (i32.const 0) (f32.const nan:0x500001))) + (func (export "i32.store") (i32.store (i32.const 0) (i32.const 0x7fd00001))) + (func (export "reset") (i32.store (i32.const 0) (i32.const 0))) +) + +(assert_return (invoke "i32.load") (i32.const 0x7fd00001)) +(assert_return (invoke "f32.load") (f32.const nan:0x500001)) +(invoke "reset") +(assert_return (invoke "i32.load") (i32.const 0x0)) +(assert_return (invoke "f32.load") (f32.const 0.0)) +(invoke "f32.store") +(assert_return (invoke "i32.load") (i32.const 0x7fd00001)) +(assert_return (invoke "f32.load") (f32.const nan:0x500001)) +(invoke "reset") +(assert_return (invoke "i32.load") (i32.const 0x0)) +(assert_return (invoke "f32.load") (f32.const 0.0)) +(invoke "i32.store") +(assert_return (invoke "i32.load") (i32.const 0x7fd00001)) +(assert_return (invoke "f32.load") (f32.const nan:0x500001)) + +(module + (memory (data "\01\00\00\00\00\00\fc\7f")) + + (func (export "f64.load") (result f64) (f64.load (i32.const 0))) + (func (export "i64.load") (result i64) (i64.load (i32.const 0))) + (func (export "f64.store") (f64.store (i32.const 0) (f64.const nan:0xc000000000001))) + (func (export "i64.store") (i64.store (i32.const 0) (i64.const 0x7ffc000000000001))) + (func (export "reset") (i64.store (i32.const 0) (i64.const 0))) +) + +(assert_return (invoke "i64.load") (i64.const 0x7ffc000000000001)) +(assert_return (invoke "f64.load") (f64.const nan:0xc000000000001)) +(invoke "reset") +(assert_return (invoke "i64.load") (i64.const 0x0)) +(assert_return (invoke "f64.load") (f64.const 0.0)) +(invoke "f64.store") +(assert_return (invoke "i64.load") (i64.const 0x7ffc000000000001)) +(assert_return (invoke "f64.load") (f64.const nan:0xc000000000001)) +(invoke "reset") +(assert_return (invoke "i64.load") (i64.const 0x0)) +(assert_return (invoke "f64.load") (f64.const 0.0)) +(invoke "i64.store") +(assert_return (invoke "i64.load") (i64.const 0x7ffc000000000001)) +(assert_return (invoke "f64.load") (f64.const nan:0xc000000000001)) diff --git a/js/src/jit-test/tests/wasm/spec/float_memory.wast.js b/js/src/jit-test/tests/wasm/spec/float_memory.wast.js new file mode 100644 index 000000000..6741733ec --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/float_memory.wast.js @@ -0,0 +1 @@ +var importedArgs = ['float_memory.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/float_misc.wast b/js/src/jit-test/tests/wasm/spec/float_misc.wast new file mode 100644 index 000000000..41e29321d --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/float_misc.wast @@ -0,0 +1,643 @@ +;; Platforms intended to run WebAssembly must support IEEE 754 arithmetic. +;; This testsuite is not currently sufficient for full IEEE 754 conformance +;; testing; platforms are currently expected to meet these requirements in +;; their own way (widely-used hardware platforms already do this). +;; +;; What this testsuite does test is that (a) the platform is basically IEEE 754 +;; rather than something else entirely, (b) it's configured correctly for +;; WebAssembly (rounding direction, exception masks, precision level, subnormal +;; mode, etc.), (c) the WebAssembly implementation doesn't perform any common +;; value-changing optimizations, and (d) that the WebAssembly implementation +;; doesn't exhibit any known implementation bugs. +;; +;; This file supplements f32.wast, f64.wast, f32_cmp.wast, and f64_cmp.wast with +;; additional single-instruction tests covering additional miscellaneous +;; interesting cases. + +(module + (func (export "f32.add") (param $x f32) (param $y f32) (result f32) (f32.add (get_local $x) (get_local $y))) + (func (export "f32.sub") (param $x f32) (param $y f32) (result f32) (f32.sub (get_local $x) (get_local $y))) + (func (export "f32.mul") (param $x f32) (param $y f32) (result f32) (f32.mul (get_local $x) (get_local $y))) + (func (export "f32.div") (param $x f32) (param $y f32) (result f32) (f32.div (get_local $x) (get_local $y))) + (func (export "f32.sqrt") (param $x f32) (result f32) (f32.sqrt (get_local $x))) + (func (export "f32.abs") (param $x f32) (result f32) (f32.abs (get_local $x))) + (func (export "f32.neg") (param $x f32) (result f32) (f32.neg (get_local $x))) + (func (export "f32.copysign") (param $x f32) (param $y f32) (result f32) (f32.copysign (get_local $x) (get_local $y))) + (func (export "f32.ceil") (param $x f32) (result f32) (f32.ceil (get_local $x))) + (func (export "f32.floor") (param $x f32) (result f32) (f32.floor (get_local $x))) + (func (export "f32.trunc") (param $x f32) (result f32) (f32.trunc (get_local $x))) + (func (export "f32.nearest") (param $x f32) (result f32) (f32.nearest (get_local $x))) + (func (export "f32.min") (param $x f32) (param $y f32) (result f32) (f32.min (get_local $x) (get_local $y))) + (func (export "f32.max") (param $x f32) (param $y f32) (result f32) (f32.max (get_local $x) (get_local $y))) + + (func (export "f64.add") (param $x f64) (param $y f64) (result f64) (f64.add (get_local $x) (get_local $y))) + (func (export "f64.sub") (param $x f64) (param $y f64) (result f64) (f64.sub (get_local $x) (get_local $y))) + (func (export "f64.mul") (param $x f64) (param $y f64) (result f64) (f64.mul (get_local $x) (get_local $y))) + (func (export "f64.div") (param $x f64) (param $y f64) (result f64) (f64.div (get_local $x) (get_local $y))) + (func (export "f64.sqrt") (param $x f64) (result f64) (f64.sqrt (get_local $x))) + (func (export "f64.abs") (param $x f64) (result f64) (f64.abs (get_local $x))) + (func (export "f64.neg") (param $x f64) (result f64) (f64.neg (get_local $x))) + (func (export "f64.copysign") (param $x f64) (param $y f64) (result f64) (f64.copysign (get_local $x) (get_local $y))) + (func (export "f64.ceil") (param $x f64) (result f64) (f64.ceil (get_local $x))) + (func (export "f64.floor") (param $x f64) (result f64) (f64.floor (get_local $x))) + (func (export "f64.trunc") (param $x f64) (result f64) (f64.trunc (get_local $x))) + (func (export "f64.nearest") (param $x f64) (result f64) (f64.nearest (get_local $x))) + (func (export "f64.min") (param $x f64) (param $y f64) (result f64) (f64.min (get_local $x) (get_local $y))) + (func (export "f64.max") (param $x f64) (param $y f64) (result f64) (f64.max (get_local $x) (get_local $y))) +) + +;; Miscellaneous values. +(assert_return (invoke "f32.add" (f32.const 1.1234567890) (f32.const 1.2345e-10)) (f32.const 1.123456789)) +(assert_return (invoke "f64.add" (f64.const 1.1234567890) (f64.const 1.2345e-10)) (f64.const 0x1.1f9add37c11f7p+0)) + +;; Test adding the greatest value to 1.0 that rounds back to 1.0, and the +;; least that rounds to something greater. +(assert_return (invoke "f32.add" (f32.const 1.0) (f32.const 0x1p-24)) (f32.const 0x1.0p+0)) +(assert_return (invoke "f32.add" (f32.const 1.0) (f32.const 0x1.000002p-24)) (f32.const 0x1.000002p+0)) +(assert_return (invoke "f64.add" (f64.const 1.0) (f64.const 0x1p-53)) (f64.const 0x1.0p+0)) +(assert_return (invoke "f64.add" (f64.const 1.0) (f64.const 0x1.0000000000001p-53)) (f64.const 0x1.0000000000001p+0)) + +;; Test that what some systems call signaling NaN behaves as a quiet NaN. +(assert_return (invoke "f32.add" (f32.const nan:0x200000) (f32.const 1.0)) (f32.const nan:0x600000)) +(assert_return (invoke "f64.add" (f64.const nan:0x4000000000000) (f64.const 1.0)) (f64.const nan:0xc000000000000)) + +;; Max subnornmal + min subnormal = min normal. +(assert_return (invoke "f32.add" (f32.const 0x1p-149) (f32.const 0x1.fffffcp-127)) (f32.const 0x1p-126)) +(assert_return (invoke "f64.add" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.fffffffffffffp-1022)) (f64.const 0x1p-1022)) + +;; Test for a case of double rounding, example from: +;; http://perso.ens-lyon.fr/jean-michel.muller/Handbook.html +;; section 3.3.1: A typical problem: "double rounding" +(assert_return (invoke "f32.add" (f32.const 0x1p+31) (f32.const 1024.25)) (f32.const 0x1.000008p+31)) +(assert_return (invoke "f64.add" (f64.const 0x1p+63) (f64.const 1024.25)) (f64.const 0x1.0000000000001p+63)) + +;; Test a case that was "tricky" on MMIX. +;; http://mmix.cs.hm.edu/bugs/bug_rounding.html +(assert_return (invoke "f64.add" (f64.const -0x1p-1008) (f64.const 0x0.0000000001716p-1022)) (f64.const -0x1.fffffffffffffp-1009)) + +;; Computations that round differently in ties-to-odd mode. +(assert_return (invoke "f32.add" (f32.const 0x1p23) (f32.const 0x1p-1)) (f32.const 0x1p23)) +(assert_return (invoke "f32.add" (f32.const 0x1.000002p+23) (f32.const 0x1p-1)) (f32.const 0x1.000004p+23)) +(assert_return (invoke "f64.add" (f64.const 0x1p52) (f64.const 0x1p-1)) (f64.const 0x1p52)) +(assert_return (invoke "f64.add" (f64.const 0x1.0000000000001p+52) (f64.const 0x1p-1)) (f64.const 0x1.0000000000002p+52)) + +;; Computations that round differently in round-upward mode. +(assert_return (invoke "f32.add" (f32.const -0x1.39675ap+102) (f32.const 0x1.76c94cp-99)) (f32.const -0x1.39675ap+102)) +(assert_return (invoke "f32.add" (f32.const 0x1.6c0f24p+67) (f32.const -0x1.2b92dp+52)) (f32.const 0x1.6c0cccp+67)) +(assert_return (invoke "f32.add" (f32.const 0x1.e62318p-83) (f32.const 0x1.f74abep-125)) (f32.const 0x1.e62318p-83)) +(assert_return (invoke "f32.add" (f32.const 0x1.2a71d4p+39) (f32.const -0x1.c9f10cp+55)) (f32.const -0x1.c9efe2p+55)) +(assert_return (invoke "f32.add" (f32.const 0x1.f8f736p-15) (f32.const 0x1.7bd45ep+106)) (f32.const 0x1.7bd45ep+106)) +(assert_return (invoke "f64.add" (f64.const 0x1.f33e1fbca27aap-413) (f64.const -0x1.6b192891ed61p+249)) (f64.const -0x1.6b192891ed61p+249)) +(assert_return (invoke "f64.add" (f64.const -0x1.46f75d130eeb1p+76) (f64.const 0x1.25275d6f7a4acp-184)) (f64.const -0x1.46f75d130eeb1p+76)) +(assert_return (invoke "f64.add" (f64.const 0x1.04dec9265a731p-148) (f64.const -0x1.11eed4e8c127cp-12)) (f64.const -0x1.11eed4e8c127cp-12)) +(assert_return (invoke "f64.add" (f64.const 0x1.05773b7166b0ap+497) (f64.const 0x1.134022f2da37bp+66)) (f64.const 0x1.05773b7166b0ap+497)) +(assert_return (invoke "f64.add" (f64.const 0x1.ef4f794282a82p+321) (f64.const 0x1.14a82266badep+394)) (f64.const 0x1.14a82266badep+394)) + +;; Computations that round differently in round-downward mode. +(assert_return (invoke "f32.add" (f32.const 0x1.1bf976p+72) (f32.const -0x1.7f5868p+20)) (f32.const 0x1.1bf976p+72)) +(assert_return (invoke "f32.add" (f32.const 0x1.7f9c6cp-45) (f32.const -0x1.b9bb0ep-78)) (f32.const 0x1.7f9c6cp-45)) +(assert_return (invoke "f32.add" (f32.const -0x1.32d1bcp-42) (f32.const 0x1.f7d214p+125)) (f32.const 0x1.f7d214p+125)) +(assert_return (invoke "f32.add" (f32.const -0x1.8e5c0ep-44) (f32.const -0x1.3afa4cp-106)) (f32.const -0x1.8e5c0ep-44)) +(assert_return (invoke "f32.add" (f32.const 0x1.13cd78p-10) (f32.const -0x1.3af316p-107)) (f32.const 0x1.13cd78p-10)) +(assert_return (invoke "f64.add" (f64.const 0x1.f8dd15ca97d4ap+179) (f64.const -0x1.367317d1fe8bfp-527)) (f64.const 0x1.f8dd15ca97d4ap+179)) +(assert_return (invoke "f64.add" (f64.const 0x1.5db08d739228cp+155) (f64.const -0x1.fb316fa147dcbp-61)) (f64.const 0x1.5db08d739228cp+155)) +(assert_return (invoke "f64.add" (f64.const 0x1.bbb403cb85c07p-404) (f64.const -0x1.7e44046b8bbf3p-979)) (f64.const 0x1.bbb403cb85c07p-404)) +(assert_return (invoke "f64.add" (f64.const -0x1.34d38af291831p+147) (f64.const -0x1.9890b47439953p+139)) (f64.const -0x1.366c1ba705bcap+147)) +(assert_return (invoke "f64.add" (f64.const -0x1.b61dedf4e0306p+3) (f64.const 0x1.09e2f31773c4ap+290)) (f64.const 0x1.09e2f31773c4ap+290)) + +;; Computations that round differently in round-toward-zero mode. +(assert_return (invoke "f32.add" (f32.const -0x1.129bd8p-117) (f32.const 0x1.c75012p-43)) (f32.const 0x1.c75012p-43)) +(assert_return (invoke "f32.add" (f32.const -0x1.c204a2p-16) (f32.const 0x1.80b132p-27)) (f32.const -0x1.c1d48cp-16)) +(assert_return (invoke "f32.add" (f32.const -0x1.decc1cp+36) (f32.const 0x1.c688dap-109)) (f32.const -0x1.decc1cp+36)) +(assert_return (invoke "f32.add" (f32.const 0x1.61ce6ap-118) (f32.const -0x1.772892p+30)) (f32.const -0x1.772892p+30)) +(assert_return (invoke "f32.add" (f32.const -0x1.3dc826p-120) (f32.const 0x1.fc3f66p+95)) (f32.const 0x1.fc3f66p+95)) +(assert_return (invoke "f64.add" (f64.const 0x1.bf68acc263a0fp-777) (f64.const -0x1.5f9352965e5a6p+1004)) (f64.const -0x1.5f9352965e5a6p+1004)) +(assert_return (invoke "f64.add" (f64.const -0x1.76eaa70911f51p+516) (f64.const -0x1.2d746324ce47ap+493)) (f64.const -0x1.76eaa963fabb6p+516)) +(assert_return (invoke "f64.add" (f64.const -0x1.b637d82c15a7ap-967) (f64.const 0x1.cc654ccab4152p-283)) (f64.const 0x1.cc654ccab4152p-283)) +(assert_return (invoke "f64.add" (f64.const -0x1.a5b1fb66e846ep-509) (f64.const 0x1.4bdd36f0bb5ccp-860)) (f64.const -0x1.a5b1fb66e846ep-509)) +(assert_return (invoke "f64.add" (f64.const -0x1.14108da880f9ep+966) (f64.const 0x1.417f35701e89fp+800)) (f64.const -0x1.14108da880f9ep+966)) + +;; Computations that round differently on x87. +(assert_return (invoke "f64.add" (f64.const -0x1.fa0caf21ffebcp+804) (f64.const 0x1.4ca8fdcff89f9p+826)) (f64.const 0x1.4ca8f5e7c5e31p+826)) +(assert_return (invoke "f64.add" (f64.const 0x1.016f1fcbdfd38p+784) (f64.const 0x1.375dffcbc9a2cp+746)) (f64.const 0x1.016f1fcbe4b0fp+784)) +(assert_return (invoke "f64.add" (f64.const -0x1.dffda6d5bff3ap+624) (f64.const 0x1.f9e8cc2dff782p+674)) (f64.const 0x1.f9e8cc2dff77bp+674)) +(assert_return (invoke "f64.add" (f64.const 0x1.fff4b43687dfbp+463) (f64.const 0x1.0fd5617c4a809p+517)) (f64.const 0x1.0fd5617c4a809p+517)) +(assert_return (invoke "f64.add" (f64.const 0x1.535d380035da2p-995) (f64.const 0x1.cce37dddbb73bp-963)) (f64.const 0x1.cce37ddf0ed0fp-963)) + +;; Computations that round differently when computed via f32. +(assert_return (invoke "f64.add" (f64.const -0x1.d91cd3fc0c66fp+752) (f64.const -0x1.4e18c80229734p+952)) (f64.const -0x1.4e18c80229734p+952)) +(assert_return (invoke "f64.add" (f64.const 0x1.afc70fd36e372p+193) (f64.const -0x1.bd10a9b377b46p+273)) (f64.const -0x1.bd10a9b377b46p+273)) +(assert_return (invoke "f64.add" (f64.const -0x1.2abd570b078b2p+302) (f64.const 0x1.b3c1ad759cb5bp-423)) (f64.const -0x1.2abd570b078b2p+302)) +(assert_return (invoke "f64.add" (f64.const -0x1.5b2ae84c0686cp-317) (f64.const -0x1.dba7a1c022823p+466)) (f64.const -0x1.dba7a1c022823p+466)) +(assert_return (invoke "f64.add" (f64.const -0x1.ac627bd7cbf38p-198) (f64.const 0x1.2312e265b8d59p-990)) (f64.const -0x1.ac627bd7cbf38p-198)) + +;; Computations that utilize the maximum exponent value to avoid overflow. +(assert_return (invoke "f32.add" (f32.const 0x1.2b91ap+116) (f32.const 0x1.cbcd52p+127)) (f32.const 0x1.cbf2c4p+127)) +(assert_return (invoke "f32.add" (f32.const 0x1.96f392p+127) (f32.const -0x1.6b3fecp+107)) (f32.const 0x1.96f37cp+127)) +(assert_return (invoke "f32.add" (f32.const 0x1.132f1cp+118) (f32.const -0x1.63d632p+127)) (f32.const -0x1.634c9ap+127)) +(assert_return (invoke "f32.add" (f32.const -0x1.1dda64p+120) (f32.const -0x1.ef02ep+127)) (f32.const -0x1.f13e94p+127)) +(assert_return (invoke "f32.add" (f32.const -0x1.4ad8dap+127) (f32.const -0x1.eae082p+125)) (f32.const -0x1.c590fap+127)) +(assert_return (invoke "f64.add" (f64.const 0x1.017099f2a4b8bp+1023) (f64.const 0x1.1f63b28f05454p+981)) (f64.const 0x1.017099f2a5009p+1023)) +(assert_return (invoke "f64.add" (f64.const 0x1.d88b6c74984efp+1023) (f64.const 0x1.33b444775eabcp+990)) (f64.const 0x1.d88b6c7532291p+1023)) +(assert_return (invoke "f64.add" (f64.const -0x1.84576422fdf5p+1023) (f64.const 0x1.60ee6aa12fb9cp+1012)) (f64.const -0x1.842b4655a9cf1p+1023)) +(assert_return (invoke "f64.add" (f64.const -0x1.9aaace3e79f7dp+1001) (f64.const 0x1.e4068af295cb6p+1023)) (f64.const 0x1.e4068487ea926p+1023)) +(assert_return (invoke "f64.add" (f64.const 0x1.06cdae79f27b9p+1023) (f64.const -0x1.e05cb0c96f975p+991)) (f64.const 0x1.06cdae78121eep+1023)) + +;; Computations that utilize the minimum exponent value. +(assert_return (invoke "f32.add" (f32.const 0x1.6a1a2p-127) (f32.const 0x1.378p-140)) (f32.const 0x1.6a23dcp-127)) +(assert_return (invoke "f32.add" (f32.const 0x1.28p-144) (f32.const -0x1p-148)) (f32.const 0x1.18p-144)) +(assert_return (invoke "f32.add" (f32.const -0x1p-146) (f32.const 0x1.c3cap-128)) (f32.const 0x1.c3c9cp-128)) +(assert_return (invoke "f32.add" (f32.const -0x1.4p-145) (f32.const 0x1.424052p-122)) (f32.const 0x1.42405p-122)) +(assert_return (invoke "f32.add" (f32.const 0x1.c5p-141) (f32.const -0x1.72f8p-135)) (f32.const -0x1.6be4p-135)) +(assert_return (invoke "f64.add" (f64.const 0x1.4774c681d1e21p-1022) (f64.const -0x1.271e58e9f58cap-1021)) (f64.const -0x1.06c7eb5219373p-1022)) +(assert_return (invoke "f64.add" (f64.const 0x1.10b3a75e31916p-1021) (f64.const -0x1.ffb82b0e868a7p-1021)) (f64.const -0x1.de090760a9f22p-1022)) +(assert_return (invoke "f64.add" (f64.const -0x0.6b58448b8098ap-1022) (f64.const -0x1.579796ed04cbep-1022)) (f64.const -0x1.c2efdb7885648p-1022)) +(assert_return (invoke "f64.add" (f64.const 0x1.9eb9e7baae8d1p-1020) (f64.const -0x1.d58e136f8c6eep-1020)) (f64.const -0x0.db50aed377874p-1022)) +(assert_return (invoke "f64.add" (f64.const -0x1.f1115deeafa0bp-1022) (f64.const 0x1.221b1c87dca29p-1022)) (f64.const -0x0.cef64166d2fe2p-1022)) + +;; Test an add of the second-greatest finite value with the distance to greatest +;; finite value. +(assert_return (invoke "f32.add" (f32.const 0x1.fffffcp+127) (f32.const 0x1p+104)) (f32.const 0x1.fffffep+127)) +(assert_return (invoke "f64.add" (f64.const 0x1.ffffffffffffep+1023) (f64.const 0x1p+971)) (f64.const 0x1.fffffffffffffp+1023)) + +;; Test for a historic spreadsheet bug. +;; https://blogs.office.com/2007/09/25/calculation-issue-update/ +(assert_return (invoke "f32.sub" (f32.const 65536.0) (f32.const 0x1p-37)) (f32.const 65536.0)) +(assert_return (invoke "f64.sub" (f64.const 65536.0) (f64.const 0x1p-37)) (f64.const 0x1.fffffffffffffp+15)) + +;; Test subtracting the greatest value from 1.0 that rounds back to 1.0, and the +;; least that rounds to something less. +(assert_return (invoke "f32.sub" (f32.const 1.0) (f32.const 0x1p-25)) (f32.const 0x1.0p+0)) +(assert_return (invoke "f32.sub" (f32.const 1.0) (f32.const 0x1.000002p-25)) (f32.const 0x1.fffffep-1)) +(assert_return (invoke "f64.sub" (f64.const 1.0) (f64.const 0x1p-54)) (f64.const 0x1.0p+0)) +(assert_return (invoke "f64.sub" (f64.const 1.0) (f64.const 0x1.0000000000001p-54)) (f64.const 0x1.fffffffffffffp-1)) + +;; Computations that round differently in round-upward mode. +(assert_return (invoke "f32.sub" (f32.const 0x1.ee2466p-106) (f32.const -0x1.16277ep+119)) (f32.const 0x1.16277ep+119)) +(assert_return (invoke "f32.sub" (f32.const -0x1.446f9ep+119) (f32.const -0x1.4396a4p+43)) (f32.const -0x1.446f9ep+119)) +(assert_return (invoke "f32.sub" (f32.const 0x1.74773cp+0) (f32.const -0x1.a25512p-82)) (f32.const 0x1.74773cp+0)) +(assert_return (invoke "f32.sub" (f32.const 0x1.9345c4p-117) (f32.const 0x1.6792c2p-76)) (f32.const -0x1.6792c2p-76)) +(assert_return (invoke "f32.sub" (f32.const 0x1.9ecfa4p-18) (f32.const -0x1.864b44p-107)) (f32.const 0x1.9ecfa4p-18)) +(assert_return (invoke "f64.sub" (f64.const -0x1.5b798875e7845p-333) (f64.const -0x1.b5147117452fep-903)) (f64.const -0x1.5b798875e7845p-333)) +(assert_return (invoke "f64.sub" (f64.const -0x1.6c87baeb6d72dp+552) (f64.const -0x1.64fb35d4b5571p-158)) (f64.const -0x1.6c87baeb6d72dp+552)) +(assert_return (invoke "f64.sub" (f64.const 0x1.b3d369fcf74bp-461) (f64.const -0x1.ea1668c0dec93p-837)) (f64.const 0x1.b3d369fcf74bp-461)) +(assert_return (invoke "f64.sub" (f64.const 0x1.0abd449353eadp-1005) (f64.const -0x1.0422ea3e82ee9p+154)) (f64.const 0x1.0422ea3e82ee9p+154)) +(assert_return (invoke "f64.sub" (f64.const -0x1.aadbc6b43cc3dp-143) (f64.const -0x1.e7f922ef1ee58p-539)) (f64.const -0x1.aadbc6b43cc3dp-143)) + +;; Computations that round differently in round-downward mode. +(assert_return (invoke "f32.sub" (f32.const -0x1.61e262p+108) (f32.const -0x1.baf3e4p+112)) (f32.const 0x1.a4d5bep+112)) +(assert_return (invoke "f32.sub" (f32.const -0x1.62c2f6p+109) (f32.const 0x1.6e514ap+6)) (f32.const -0x1.62c2f6p+109)) +(assert_return (invoke "f32.sub" (f32.const -0x1.287c94p-83) (f32.const 0x1.0f2f9cp-24)) (f32.const -0x1.0f2f9cp-24)) +(assert_return (invoke "f32.sub" (f32.const -0x1.c8825cp-77) (f32.const -0x1.4aead6p-12)) (f32.const 0x1.4aead6p-12)) +(assert_return (invoke "f32.sub" (f32.const -0x1.2976a4p+99) (f32.const 0x1.c6e3b8p-59)) (f32.const -0x1.2976a4p+99)) +(assert_return (invoke "f64.sub" (f64.const -0x1.76cb28ae6c045p+202) (f64.const -0x1.0611f2af4e9b9p+901)) (f64.const 0x1.0611f2af4e9b9p+901)) +(assert_return (invoke "f64.sub" (f64.const 0x1.baf35eff22e9ep-368) (f64.const 0x1.5c3e08ecf73ecp-451)) (f64.const 0x1.baf35eff22e9ep-368)) +(assert_return (invoke "f64.sub" (f64.const -0x1.8fd354b376f1fp-200) (f64.const 0x1.513c860f386ffp-508)) (f64.const -0x1.8fd354b376f1fp-200)) +(assert_return (invoke "f64.sub" (f64.const -0x1.760d447230ae6p-992) (f64.const -0x1.16f788438ae3ep-328)) (f64.const 0x1.16f788438ae3ep-328)) +(assert_return (invoke "f64.sub" (f64.const -0x1.73aab4fcfc7ap+112) (f64.const 0x1.7c589f990b884p+171)) (f64.const -0x1.7c589f990b884p+171)) + +;; Computations that round differently in round-toward-zero mode. +(assert_return (invoke "f32.sub" (f32.const 0x1.ea264cp+95) (f32.const 0x1.852988p-15)) (f32.const 0x1.ea264cp+95)) +(assert_return (invoke "f32.sub" (f32.const -0x1.14ec7cp+19) (f32.const -0x1.0ad3fep-35)) (f32.const -0x1.14ec7cp+19)) +(assert_return (invoke "f32.sub" (f32.const -0x1.3251dap-36) (f32.const -0x1.49c97ep-56)) (f32.const -0x1.3251c6p-36)) +(assert_return (invoke "f32.sub" (f32.const -0x1.13565ep-14) (f32.const 0x1.2f89a8p-13)) (f32.const -0x1.b934d8p-13)) +(assert_return (invoke "f32.sub" (f32.const -0x1.6032b6p-33) (f32.const -0x1.bb5196p-104)) (f32.const -0x1.6032b6p-33)) +(assert_return (invoke "f64.sub" (f64.const -0x1.b5b0797af491p-157) (f64.const -0x1.694b8348189e8p+722)) (f64.const 0x1.694b8348189e8p+722)) +(assert_return (invoke "f64.sub" (f64.const -0x1.72b142826ed73p+759) (f64.const -0x1.010477bc9afbdp+903)) (f64.const 0x1.010477bc9afbdp+903)) +(assert_return (invoke "f64.sub" (f64.const 0x1.83273b6bb94cfp-796) (f64.const 0x1.1a93f948a2abbp+181)) (f64.const -0x1.1a93f948a2abbp+181)) +(assert_return (invoke "f64.sub" (f64.const -0x1.207e7156cbf2p-573) (f64.const 0x1.cf3f12fd3814dp-544)) (f64.const -0x1.cf3f13063c086p-544)) +(assert_return (invoke "f64.sub" (f64.const -0x1.837e6844f1718p-559) (f64.const -0x1.1c29b757f98abp-14)) (f64.const 0x1.1c29b757f98abp-14)) + +;; Computations that round differently on x87. +(assert_return (invoke "f64.sub" (f64.const 0x1.c21151a709b6cp-78) (f64.const 0x1.0a12fff8910f6p-115)) (f64.const 0x1.c21151a701663p-78)) +(assert_return (invoke "f64.sub" (f64.const 0x1.c57912aae2f64p-982) (f64.const 0x1.dbfbd4800b7cfp-1010)) (f64.const 0x1.c579128d2338fp-982)) +(assert_return (invoke "f64.sub" (f64.const 0x1.ffef4399af9c6p-254) (f64.const 0x1.edb96dfaea8b1p-200)) (f64.const -0x1.edb96dfaea8b1p-200)) +(assert_return (invoke "f64.sub" (f64.const -0x1.363eee391cde2p-39) (f64.const -0x1.a65462000265fp-69)) (f64.const -0x1.363eee32838c9p-39)) +(assert_return (invoke "f64.sub" (f64.const 0x1.59016dba002a1p-25) (f64.const 0x1.5d4374f124cccp-3)) (f64.const -0x1.5d436f8d1f15dp-3)) + +;; Computations that round differently when computed via f32. +(assert_return (invoke "f64.sub" (f64.const -0x1.18196bca005cfp-814) (f64.const -0x1.db7b01ce3f52fp-766)) (f64.const 0x1.db7b01ce3f51dp-766)) +(assert_return (invoke "f64.sub" (f64.const -0x1.d17b3528d219p+33) (f64.const 0x1.fd739d4ea220ap+367)) (f64.const -0x1.fd739d4ea220ap+367)) +(assert_return (invoke "f64.sub" (f64.const 0x1.dea46994de319p+114) (f64.const 0x1.b5b19cd55c7d3p-590)) (f64.const 0x1.dea46994de319p+114)) +(assert_return (invoke "f64.sub" (f64.const 0x1.b60f9b2fbd9ecp-489) (f64.const -0x1.6f81c59ec5b8ep-694)) (f64.const 0x1.b60f9b2fbd9ecp-489)) +(assert_return (invoke "f64.sub" (f64.const 0x1.5e423fe8571f4p-57) (f64.const 0x1.9624ed7c162dfp-618)) (f64.const 0x1.5e423fe8571f4p-57)) + +;; pow(e, π) - π +;; https://xkcd.com/217 +(assert_return (invoke "f32.sub" (f32.const 0x1.724046p+4) (f32.const 0x1.921fb6p+1)) (f32.const 0x1.3ffc5p+4)) +(assert_return (invoke "f64.sub" (f64.const 0x1.724046eb0933ap+4) (f64.const 0x1.921fb54442d18p+1)) (f64.const 0x1.3ffc504280d97p+4)) + +;; https://www.cnet.com/news/googles-calculator-muffs-some-math-problems/ +(assert_return (invoke "f32.sub" (f32.const 2999999) (f32.const 2999998)) (f32.const 1.0)) +(assert_return (invoke "f32.sub" (f32.const 1999999) (f32.const 1999995)) (f32.const 4.0)) +(assert_return (invoke "f32.sub" (f32.const 1999999) (f32.const 1999993)) (f32.const 6.0)) +(assert_return (invoke "f32.sub" (f32.const 400002) (f32.const 400001)) (f32.const 1.0)) +(assert_return (invoke "f32.sub" (f32.const 400002) (f32.const 400000)) (f32.const 2.0)) +(assert_return (invoke "f64.sub" (f64.const 2999999999999999) (f64.const 2999999999999998)) (f64.const 1.0)) +(assert_return (invoke "f64.sub" (f64.const 1999999999999999) (f64.const 1999999999999995)) (f64.const 4.0)) +(assert_return (invoke "f64.sub" (f64.const 1999999999999999) (f64.const 1999999999999993)) (f64.const 6.0)) +(assert_return (invoke "f64.sub" (f64.const 400000000000002) (f64.const 400000000000001)) (f64.const 1.0)) +(assert_return (invoke "f64.sub" (f64.const 400000000000002) (f64.const 400000000000000)) (f64.const 2.0)) + +;; Min normal - min subnormal = max subnornmal. +(assert_return (invoke "f32.sub" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1.fffffcp-127)) +(assert_return (invoke "f64.sub" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.fffffffffffffp-1022)) + +;; Min normal - max subnormal = min subnornmal. +(assert_return (invoke "f32.sub" (f32.const 0x1p-126) (f32.const 0x1.fffffcp-127)) (f32.const 0x1p-149)) +(assert_return (invoke "f64.sub" (f64.const 0x1p-1022) (f64.const 0x0.fffffffffffffp-1022)) (f64.const 0x0.0000000000001p-1022)) + +;; Miscellaneous values. +(assert_return (invoke "f32.mul" (f32.const 1e15) (f32.const 1e15)) (f32.const 0x1.93e592p+99)) +(assert_return (invoke "f32.mul" (f32.const 1e20) (f32.const 1e20)) (f32.const infinity)) +(assert_return (invoke "f32.mul" (f32.const 1e25) (f32.const 1e25)) (f32.const infinity)) +(assert_return (invoke "f64.mul" (f64.const 1e15) (f64.const 1e15)) (f64.const 0x1.93e5939a08ceap+99)) +(assert_return (invoke "f64.mul" (f64.const 1e20) (f64.const 1e20)) (f64.const 0x1.d6329f1c35ca5p+132)) +(assert_return (invoke "f64.mul" (f64.const 1e25) (f64.const 1e25)) (f64.const 0x1.11b0ec57e649bp+166)) + +;; Test for a case of double rounding, example from: +;; http://perso.ens-lyon.fr/jean-michel.muller/Handbook.html +;; section 3.3.1: A typical problem: "double rounding" +(assert_return (invoke "f32.mul" (f32.const 1848874880.0) (f32.const 19954563072.0)) (f32.const 0x1.000002p+65)) +(assert_return (invoke "f64.mul" (f64.const 1848874847.0) (f64.const 19954562207.0)) (f64.const 3.6893488147419111424e+19)) + +;; Test for a historic spreadsheet bug. +;; http://www.joelonsoftware.com/items/2007/09/26b.html +(assert_return (invoke "f32.mul" (f32.const 77.1) (f32.const 850)) (f32.const 65535)) +(assert_return (invoke "f64.mul" (f64.const 77.1) (f64.const 850)) (f64.const 65534.99999999999272404)) + +;; Computations that round differently in round-upward mode. +(assert_return (invoke "f32.mul" (f32.const -0x1.14df2ep+61) (f32.const 0x1.748878p-36)) (f32.const -0x1.92e7e8p+25)) +(assert_return (invoke "f32.mul" (f32.const -0x1.5629e2p+102) (f32.const -0x1.c33012p-102)) (f32.const 0x1.2d8604p+1)) +(assert_return (invoke "f32.mul" (f32.const -0x1.b17694p+92) (f32.const -0x1.e4b56ap-97)) (f32.const 0x1.9a5baep-4)) +(assert_return (invoke "f32.mul" (f32.const -0x1.1626a6p+79) (f32.const -0x1.c57d7p-75)) (f32.const 0x1.ecbaaep+4)) +(assert_return (invoke "f32.mul" (f32.const 0x1.7acf72p+53) (f32.const 0x1.6c89acp+5)) (f32.const 0x1.0db556p+59)) +(assert_return (invoke "f64.mul" (f64.const -0x1.25c293f6f37e4p+425) (f64.const 0x1.f5fd4fa41c6d8p+945)) (f64.const -infinity)) +(assert_return (invoke "f64.mul" (f64.const -0x1.cc1ae79fffc5bp-986) (f64.const -0x1.c36ccc2861ca6p-219)) (f64.const 0x0p+0)) +(assert_return (invoke "f64.mul" (f64.const 0x1.c0232b3e64b56p+606) (f64.const -0x1.f6939cf3affaap+106)) (f64.const -0x1.b7e3aedf190d3p+713)) +(assert_return (invoke "f64.mul" (f64.const -0x1.60f289966b271p-313) (f64.const 0x1.28a5497f0c259p+583)) (f64.const -0x1.98fc50bcec259p+270)) +(assert_return (invoke "f64.mul" (f64.const 0x1.37dab12d3afa2p+795) (f64.const 0x1.81e156bd393f1p-858)) (f64.const 0x1.d6126554b8298p-63)) + +;; Computations that round differently in round-downward mode. +(assert_return (invoke "f32.mul" (f32.const -0x1.3f57a2p-89) (f32.const -0x1.041d68p+92)) (f32.const 0x1.4479bp+3)) +(assert_return (invoke "f32.mul" (f32.const 0x1.4d0582p+73) (f32.const 0x1.6e043ap+19)) (f32.const 0x1.dc236p+92)) +(assert_return (invoke "f32.mul" (f32.const -0x1.2fdap-32) (f32.const -0x1.e1731cp+74)) (f32.const 0x1.1db89ep+43)) +(assert_return (invoke "f32.mul" (f32.const 0x1.7bc8fep+67) (f32.const -0x1.3ad592p+15)) (f32.const -0x1.d3115ep+82)) +(assert_return (invoke "f32.mul" (f32.const 0x1.936742p+30) (f32.const -0x1.a7a19p+66)) (f32.const -0x1.4dc71ap+97)) +(assert_return (invoke "f64.mul" (f64.const -0x1.ba737b4ca3b13p-639) (f64.const 0x1.8923309857438p-314)) (f64.const -0x1.53bc0d07baa37p-952)) +(assert_return (invoke "f64.mul" (f64.const 0x1.7c1932e610219p-276) (f64.const -0x1.2605db646489fp-635)) (f64.const -0x1.b48da2b0d2ae3p-911)) +(assert_return (invoke "f64.mul" (f64.const -0x1.e43cdf3b2108p+329) (f64.const -0x1.99d96abbd61d1p+835)) (f64.const infinity)) +(assert_return (invoke "f64.mul" (f64.const 0x1.4c19466551da3p+947) (f64.const 0x1.0bdcd6c7646e9p-439)) (f64.const 0x1.5b7cd8c3f638ap+508)) +(assert_return (invoke "f64.mul" (f64.const 0x1.ff1da1726e3dfp+339) (f64.const -0x1.043c44f52b158p+169)) (f64.const -0x1.03c9364bb585cp+509)) + +;; Computations that round differently in round-toward-zero mode. +(assert_return (invoke "f32.mul" (f32.const -0x1.907e8ap+46) (f32.const -0x1.5d3668p+95)) (f32.const infinity)) +(assert_return (invoke "f32.mul" (f32.const -0x1.8c9f74p-3) (f32.const 0x1.e2b452p-99)) (f32.const -0x1.75edccp-101)) +(assert_return (invoke "f32.mul" (f32.const -0x1.cc605ap-19) (f32.const 0x1.ec321ap+105)) (f32.const -0x1.ba91a4p+87)) +(assert_return (invoke "f32.mul" (f32.const -0x1.5fbb7ap+56) (f32.const 0x1.a8965ep-96)) (f32.const -0x1.23ae8ep-39)) +(assert_return (invoke "f32.mul" (f32.const -0x1.fb7f12p+16) (f32.const 0x1.3a701ap-119)) (f32.const -0x1.37ac0cp-102)) +(assert_return (invoke "f64.mul" (f64.const -0x1.5b0266454c26bp-496) (f64.const -0x1.af5787e3e0399p+433)) (f64.const 0x1.2457d81949e0bp-62)) +(assert_return (invoke "f64.mul" (f64.const 0x1.0d54a82393d45p+478) (f64.const -0x1.425760807ceaep-764)) (f64.const -0x1.532068c8d0d5dp-286)) +(assert_return (invoke "f64.mul" (f64.const -0x1.b532af981786p+172) (f64.const 0x1.ada95085ba36fp+359)) (f64.const -0x1.6ee38c1e01864p+532)) +(assert_return (invoke "f64.mul" (f64.const 0x1.e132f4d49d1cep+768) (f64.const -0x1.a75afe9a7d864p+374)) (f64.const -infinity)) +(assert_return (invoke "f64.mul" (f64.const 0x1.68bbf1cfff90ap+81) (f64.const 0x1.09cd17d652c5p+70)) (f64.const 0x1.768b8d67d794p+151)) + +;; Computations that round differently on x87. +(assert_return (invoke "f64.mul" (f64.const 0x1.f99fb602c89b7p-341) (f64.const 0x1.6caab46a31a2ep-575)) (f64.const 0x1.68201f986e9d7p-915)) +(assert_return (invoke "f64.mul" (f64.const -0x1.86999c5eee379p-9) (f64.const 0x1.6e3b9e0d53e0dp+723)) (f64.const -0x1.17654a0ef35f5p+715)) +(assert_return (invoke "f64.mul" (f64.const -0x1.069571b176f9p+367) (f64.const -0x1.e248b6ab0a0e3p-652)) (f64.const 0x1.eeaff575cae1dp-285)) +(assert_return (invoke "f64.mul" (f64.const 0x1.c217645777dd2p+775) (f64.const 0x1.d93f5715dd646p+60)) (f64.const 0x1.a0064aa1d920dp+836)) +(assert_return (invoke "f64.mul" (f64.const -0x1.848981b6e694ap-276) (f64.const 0x1.f5aacb64a0d19p+896)) (f64.const -0x1.7cb2296e6c2e5p+621)) + +;; Computations that round differently on x87 in double-precision mode. +(assert_return (invoke "f64.mul" (f64.const 0x1.db3bd2a286944p-599) (f64.const 0x1.ce910af1d55cap-425)) (f64.const 0x0.d6accdd538a39p-1022)) +(assert_return (invoke "f64.mul" (f64.const -0x1.aca223916012p-57) (f64.const -0x1.2b2b4958dd228p-966)) (f64.const 0x0.fa74eccae5615p-1022)) +(assert_return (invoke "f64.mul" (f64.const -0x1.bd062def16cffp-488) (f64.const -0x1.7ddd91a0c4c0ep-536)) (f64.const 0x0.a5f4d7769d90dp-1022)) +(assert_return (invoke "f64.mul" (f64.const -0x1.c6a56169e9cep-772) (f64.const 0x1.517d55a474122p-255)) (f64.const -0x0.12baf260afb77p-1022)) +(assert_return (invoke "f64.mul" (f64.const -0x1.08951b0b41705p-516) (f64.const -0x1.102dc27168d09p-507)) (f64.const 0x0.8ca6dbf3f592bp-1022)) + +;; Computations that round differently when computed via f32. +(assert_return (invoke "f64.mul" (f64.const 0x1.8d0dea50c8c9bp+852) (f64.const 0x1.21cac31d87a24p-881)) (f64.const 0x1.c177311f7cd73p-29)) +(assert_return (invoke "f64.mul" (f64.const 0x1.98049118e3063p-7) (f64.const 0x1.6362525151b58p-149)) (f64.const 0x1.1b358514103f9p-155)) +(assert_return (invoke "f64.mul" (f64.const -0x1.ea65cb0631323p+1) (f64.const 0x1.fce683201a19bp-41)) (f64.const -0x1.e76dc8c223667p-39)) +(assert_return (invoke "f64.mul" (f64.const 0x1.e4d235961d543p-373) (f64.const 0x1.bc56f20ef9a48p-205)) (f64.const 0x1.a4c09efcb71d6p-577)) +(assert_return (invoke "f64.mul" (f64.const -0x1.b9612e66faba8p+77) (f64.const 0x1.e2bc6aa782273p-348)) (f64.const -0x1.a026ea4f81db1p-270)) + +;; Test the least positive value with a positive square. +(assert_return (invoke "f32.mul" (f32.const 0x1p-75) (f32.const 0x1p-75)) (f32.const 0x0p+0)) +(assert_return (invoke "f32.mul" (f32.const 0x1.000002p-75) (f32.const 0x1.000002p-75)) (f32.const 0x1p-149)) +(assert_return (invoke "f64.mul" (f64.const 0x1.6a09e667f3bccp-538) (f64.const 0x1.6a09e667f3bccp-538)) (f64.const 0x0p+0)) +(assert_return (invoke "f64.mul" (f64.const 0x1.6a09e667f3bcdp-538) (f64.const 0x1.6a09e667f3bcdp-538)) (f64.const 0x0.0000000000001p-1022)) + +;; Test the greatest positive value with a finite square. +(assert_return (invoke "f32.mul" (f32.const 0x1.fffffep+63) (f32.const 0x1.fffffep+63)) (f32.const 0x1.fffffcp+127)) +(assert_return (invoke "f32.mul" (f32.const 0x1p+64) (f32.const 0x1p+64)) (f32.const infinity)) +(assert_return (invoke "f64.mul" (f64.const 0x1.fffffffffffffp+511) (f64.const 0x1.fffffffffffffp+511)) (f64.const 0x1.ffffffffffffep+1023)) +(assert_return (invoke "f64.mul" (f64.const 0x1p+512) (f64.const 0x1p+512)) (f64.const infinity)) + +;; Test MIN * EPSILON. +;; http://www.mpfr.org/mpfr-2.0.1/patch2 +(assert_return (invoke "f32.mul" (f32.const 0x1p-126) (f32.const 0x1p-23)) (f32.const 0x1p-149)) +(assert_return (invoke "f64.mul" (f64.const 0x1p-1022) (f64.const 0x1p-52)) (f64.const 0x0.0000000000001p-1022)) + +;; Miscellaneous values. +(assert_return (invoke "f32.div" (f32.const 1.123456789) (f32.const 100)) (f32.const 0x1.702264p-7)) +(assert_return (invoke "f32.div" (f32.const 8391667.0) (f32.const 12582905.0)) (f32.const 0x1.55754p-1)) +(assert_return (invoke "f32.div" (f32.const 65536.0) (f32.const 0x1p-37)) (f32.const 0x1p+53)) +(assert_return (invoke "f32.div" (f32.const 0x1.dcbf6ap+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.dcbf68p-128)) +(assert_return (invoke "f32.div" (f32.const 4) (f32.const 3)) (f32.const 0x1.555556p+0)) +(assert_return (invoke "f64.div" (f64.const 1.123456789) (f64.const 100)) (f64.const 0.01123456789)) +(assert_return (invoke "f64.div" (f64.const 8391667.0) (f64.const 12582905.0)) (f64.const 0x1.55753f1d9ba27p-1)) +(assert_return (invoke "f64.div" (f64.const 65536.0) (f64.const 0x1p-37)) (f64.const 0x1p+53)) +(assert_return (invoke "f64.div" (f64.const 0x1.dcbf6ap+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.772fda8p-1022)) +(assert_return (invoke "f64.div" (f64.const 4) (f64.const 3)) (f64.const 0x1.5555555555555p+0)) + +;; Test for a historic hardware bug. +;; https://en.wikipedia.org/wiki/Pentium_FDIV_bug +(assert_return (invoke "f32.div" (f32.const 4195835) (f32.const 3145727)) (f32.const 0x1.557542p+0)) +(assert_return (invoke "f64.div" (f64.const 4195835) (f64.const 3145727)) (f64.const 0x1.557541c7c6b43p+0)) + +;; Computations that round differently in round-upward mode. +(assert_return (invoke "f32.div" (f32.const 0x1.6a6c5ap-48) (f32.const 0x1.fa0b7p+127)) (f32.const 0x0p+0)) +(assert_return (invoke "f32.div" (f32.const 0x1.616fb2p-87) (f32.const 0x1.332172p+68)) (f32.const 0x0p+0)) +(assert_return (invoke "f32.div" (f32.const -0x1.96e778p+16) (f32.const 0x1.eb0c56p-80)) (f32.const -0x1.a8440ap+95)) +(assert_return (invoke "f32.div" (f32.const -0x1.e2624p-76) (f32.const -0x1.ed236ep-122)) (f32.const 0x1.f4d584p+45)) +(assert_return (invoke "f32.div" (f32.const -0x1.e2374ep+41) (f32.const 0x1.71fcdcp-80)) (f32.const -0x1.4da706p+121)) +(assert_return (invoke "f64.div" (f64.const 0x1.163c09d0c38c1p+147) (f64.const 0x1.e04cc737348e6p+223)) (f64.const 0x1.289921caeed23p-77)) +(assert_return (invoke "f64.div" (f64.const 0x1.d6867e741e0a9p-626) (f64.const 0x1.335eb19a9aae4p-972)) (f64.const 0x1.87e342d11f519p+346)) +(assert_return (invoke "f64.div" (f64.const -0x1.d5edf648aeb98p+298) (f64.const 0x1.0dda15b079355p+640)) (f64.const -0x1.bdceaf9734b5cp-342)) +(assert_return (invoke "f64.div" (f64.const -0x1.b683e3934aedap+691) (f64.const 0x1.c364e1df00dffp+246)) (f64.const -0x1.f16456e7afe3bp+444)) +(assert_return (invoke "f64.div" (f64.const -0x1.44ca7539cc851p+540) (f64.const 0x1.58501bccc58fep+453)) (f64.const -0x1.e2f8657e0924ep+86)) + +;; Computations that round differently in round-downward mode. +(assert_return (invoke "f32.div" (f32.const -0x1.c2c54ap+69) (f32.const -0x1.00d142p-86)) (f32.const infinity)) +(assert_return (invoke "f32.div" (f32.const 0x1.e35abep-46) (f32.const 0x1.c69dfp+44)) (f32.const 0x1.102eb4p-90)) +(assert_return (invoke "f32.div" (f32.const 0x1.45ff2ap+0) (f32.const -0x1.1e8754p+89)) (f32.const -0x1.23434ep-89)) +(assert_return (invoke "f32.div" (f32.const 0x1.8db18ap-51) (f32.const 0x1.47c678p-128)) (f32.const 0x1.369b96p+77)) +(assert_return (invoke "f32.div" (f32.const 0x1.78599p+90) (f32.const 0x1.534144p+87)) (f32.const 0x1.1bfddcp+3)) +(assert_return (invoke "f64.div" (f64.const 0x0.f331c4f47eb51p-1022) (f64.const -0x1.c7ff45bf6f03ap+362)) (f64.const -0x0p+0)) +(assert_return (invoke "f64.div" (f64.const -0x1.0fc8707b9d19cp-987) (f64.const 0x1.77524d5f4a563p-536)) (f64.const -0x1.72c1a937d231p-452)) +(assert_return (invoke "f64.div" (f64.const -0x1.edb3aa64bb338p-403) (f64.const -0x1.1c7c164320e4p+45)) (f64.const 0x1.bc44cc1c5ae63p-448)) +(assert_return (invoke "f64.div" (f64.const -0x1.6534b34e8686bp+80) (f64.const 0x1.c34a7fc59e3c3p-791)) (f64.const -0x1.95421bf291b66p+870)) +(assert_return (invoke "f64.div" (f64.const -0x1.91f58d7ed1237p+236) (f64.const -0x1.f190d808383c8p+55)) (f64.const 0x1.9d9eb0836f906p+180)) + +;; Computations that round differently in round-toward-zero mode. +(assert_return (invoke "f32.div" (f32.const 0x1.64b2a4p+26) (f32.const 0x1.e95752p-119)) (f32.const infinity)) +(assert_return (invoke "f32.div" (f32.const -0x1.53c9b6p+77) (f32.const 0x1.d689ap+27)) (f32.const -0x1.71baa4p+49)) +(assert_return (invoke "f32.div" (f32.const 0x1.664a8ap+38) (f32.const -0x1.59dba2p+96)) (f32.const -0x1.0933f4p-58)) +(assert_return (invoke "f32.div" (f32.const -0x1.99e0fap+111) (f32.const -0x1.c2b5a8p+9)) (f32.const 0x1.d19de6p+101)) +(assert_return (invoke "f32.div" (f32.const -0x1.5a815ap+92) (f32.const -0x1.b5820ap+13)) (f32.const 0x1.9580b8p+78)) +(assert_return (invoke "f64.div" (f64.const -0x1.81fd1e2af7bebp-655) (f64.const 0x1.edefc4eae536cp-691)) (f64.const -0x1.901abdd91b661p+35)) +(assert_return (invoke "f64.div" (f64.const -0x1.47cf932953c43p+782) (f64.const -0x1.bc40496b1f2a1p-553)) (f64.const infinity)) +(assert_return (invoke "f64.div" (f64.const -0x1.2bd2e8fbdcad7p-746) (f64.const 0x1.b115674cc476ep-65)) (f64.const -0x1.62752bf19fa81p-682)) +(assert_return (invoke "f64.div" (f64.const -0x1.f923e3fea9efep+317) (f64.const -0x1.8044c74d27a39p-588)) (f64.const 0x1.5086518cc7186p+905)) +(assert_return (invoke "f64.div" (f64.const 0x1.516ed2051d6bbp+181) (f64.const -0x1.c9f455eb9c2eep+214)) (f64.const -0x1.79414d67f2889p-34)) + +;; Computations that round differently on x87. +(assert_return (invoke "f64.div" (f64.const -0x1.9c52726aed366p+585) (f64.const -0x1.7d0568c75660fp+195)) (f64.const 0x1.1507ca2a65f23p+390)) +(assert_return (invoke "f64.div" (f64.const -0x1.522672f461667p+546) (f64.const -0x1.36d36572c9f71p+330)) (f64.const 0x1.1681369370619p+216)) +(assert_return (invoke "f64.div" (f64.const 0x1.01051b4e8cd61p+185) (f64.const -0x1.2cbb5ca3d33ebp+965)) (f64.const -0x1.b59471598a2f3p-781)) +(assert_return (invoke "f64.div" (f64.const 0x1.5f93bb80fc2cbp+217) (f64.const 0x1.7e051aae9f0edp+427)) (f64.const 0x1.d732fa926ba4fp-211)) +(assert_return (invoke "f64.div" (f64.const -0x1.e251d762163ccp+825) (f64.const 0x1.3ee63581e1796p+349)) (f64.const -0x1.8330077d90a07p+476)) + +;; Computations that round differently on x87 in double-precision mode. +(assert_return (invoke "f64.div" (f64.const 0x1.dcbf69f10006dp+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.772fda7c4001bp-1022)) +(assert_return (invoke "f64.div" (f64.const 0x1.e14169442fbcap-1011) (f64.const 0x1.505451d62ff7dp+12)) (f64.const 0x0.b727e85f38b39p-1022)) +(assert_return (invoke "f64.div" (f64.const -0x1.d3ebe726ec964p-144) (f64.const -0x1.4a7bfc0b83608p+880)) (f64.const 0x0.5a9d8c50cbf87p-1022)) +(assert_return (invoke "f64.div" (f64.const -0x1.6c3def770aee1p-393) (f64.const -0x1.8b84724347598p+631)) (f64.const 0x0.3af0707fcd0c7p-1022)) +(assert_return (invoke "f64.div" (f64.const 0x1.16abda1bb3cb3p-856) (f64.const 0x1.6c9c7198eb1e6p+166)) (f64.const 0x0.c3a8fd6741649p-1022)) +(assert_return (invoke "f64.div" (f64.const 0x1.7057d6ab553cap-1005) (f64.const -0x1.2abf1e98660ebp+23)) (f64.const -0x0.04ee8d8ec01cdp-1022)) + +;; Computations that round differently when div is mul by reciprocal. +(assert_return (invoke "f32.div" (f32.const 0x1.ada9aap+89) (f32.const 0x1.69884cp+42)) (f32.const 0x1.303e2ep+47)) +(assert_return (invoke "f32.div" (f32.const 0x1.8281c8p+90) (f32.const -0x1.62883cp+106)) (f32.const -0x1.17169cp-16)) +(assert_return (invoke "f32.div" (f32.const 0x1.5c6be2p+81) (f32.const 0x1.d01dfep-1)) (f32.const 0x1.805e32p+81)) +(assert_return (invoke "f32.div" (f32.const -0x1.bbd252p+19) (f32.const -0x1.fba95p+33)) (f32.const 0x1.bf9d56p-15)) +(assert_return (invoke "f32.div" (f32.const -0x1.0f41d6p-42) (f32.const -0x1.3f2dbep+56)) (f32.const 0x1.b320d8p-99)) +(assert_return (invoke "f64.div" (f64.const 0x1.b2348a1c81899p+61) (f64.const -0x1.4a58aad903dd3p-861)) (f64.const -0x1.507c1e2a41b35p+922)) +(assert_return (invoke "f64.div" (f64.const 0x1.23fa5137a918ap-130) (f64.const -0x1.7268db1951263p-521)) (f64.const -0x1.93965e0d896bep+390)) +(assert_return (invoke "f64.div" (f64.const 0x1.dcb3915d82deep+669) (f64.const 0x1.50caaa1dc6b19p+638)) (f64.const 0x1.6a58ec814b09dp+31)) +(assert_return (invoke "f64.div" (f64.const -0x1.046e378c0cc46p+182) (f64.const 0x1.ac925009a922bp+773)) (f64.const -0x1.3720aa94dab18p-592)) +(assert_return (invoke "f64.div" (f64.const -0x1.8945fd69d8e11p-871) (f64.const -0x1.0a37870af809ap-646)) (f64.const 0x1.7a2e286c62382p-225)) + +;; Computations that round differently when computed via f32. +(assert_return (invoke "f64.div" (f64.const 0x1.82002af0ea1f3p-57) (f64.const 0x1.d0a9b0c2fa339p+0)) (f64.const 0x1.a952fbd1fc17cp-58)) +(assert_return (invoke "f64.div" (f64.const 0x1.1e12b515db471p-102) (f64.const -0x1.41fc3c94fba5p-42)) (f64.const -0x1.c6e50cccb7cb6p-61)) +(assert_return (invoke "f64.div" (f64.const 0x1.aba5adcd6f583p-41) (f64.const 0x1.17dfac639ce0fp-112)) (f64.const 0x1.872b0a008c326p+71)) +(assert_return (invoke "f64.div" (f64.const 0x1.cf82510d0ae6bp+89) (f64.const 0x1.0207d86498053p+97)) (f64.const 0x1.cbdc804e2cf14p-8)) +(assert_return (invoke "f64.div" (f64.const 0x1.4c82cbb508e21p-11) (f64.const -0x1.6b57208c2d5d5p+52)) (f64.const -0x1.d48e8b369129ap-64)) + +;; Division involving the maximum subnormal value and the minimum normal value. +(assert_return (invoke "f32.div" (f32.const 0x1p-126) (f32.const 0x1.fffffcp-127)) (f32.const 0x1.000002p+0)) +(assert_return (invoke "f32.div" (f32.const 0x1.fffffcp-127) (f32.const 0x1p-126)) (f32.const 0x1.fffffcp-1)) +(assert_return (invoke "f64.div" (f64.const 0x1p-1022) (f64.const 0x0.fffffffffffffp-1022)) (f64.const 0x1.0000000000001p+0)) +(assert_return (invoke "f64.div" (f64.const 0x0.fffffffffffffp-1022) (f64.const 0x1p-1022)) (f64.const 0x1.ffffffffffffep-1)) + +;; Test the least positive value with a positive quotient with the maximum value. +(assert_return (invoke "f32.div" (f32.const 0x1.fffffep-23) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0)) +(assert_return (invoke "f32.div" (f32.const 0x1p-22) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-149)) +(assert_return (invoke "f64.div" (f64.const 0x1.fffffffffffffp-52) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0)) +(assert_return (invoke "f64.div" (f64.const 0x1p-51) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.0000000000001p-1022)) + +;; Test the least positive value with a finite reciprocal. +(assert_return (invoke "f32.div" (f32.const 1.0) (f32.const 0x1p-128)) (f32.const infinity)) +(assert_return (invoke "f32.div" (f32.const 1.0) (f32.const 0x1.000008p-128)) (f32.const 0x1.fffffp+127)) +(assert_return (invoke "f64.div" (f64.const 1.0) (f64.const 0x0.4p-1022)) (f64.const infinity)) +(assert_return (invoke "f64.div" (f64.const 1.0) (f64.const 0x0.4000000000001p-1022)) (f64.const 0x1.ffffffffffff8p+1023)) + +;; Test the least positive value that has a subnormal reciprocal. +(assert_return (invoke "f32.div" (f32.const 1.0) (f32.const 0x1.000002p+126)) (f32.const 0x1.fffffcp-127)) +(assert_return (invoke "f32.div" (f32.const 1.0) (f32.const 0x1p+126)) (f32.const 0x1p-126)) +(assert_return (invoke "f64.div" (f64.const 1.0) (f64.const 0x1.0000000000001p+1022)) (f64.const 0x0.fffffffffffffp-1022)) +(assert_return (invoke "f64.div" (f64.const 1.0) (f64.const 0x1p+1022)) (f64.const 0x1p-1022)) + +;; Test the minimum positive normal number divided by the minimum positive +;; subnormal number. +(assert_return (invoke "f32.div" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p+23)) +(assert_return (invoke "f64.div" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+52)) + +;; Test that the last binary digit of 1.0/3.0 is even in f32, +;; https://en.wikipedia.org/wiki/Single-precision_floating-point_format#Single-precision_examples +;; +;; and odd in f64, +;; https://en.wikipedia.org/wiki/Double-precision_floating-point_format#Double-precision_examples +;; +;; and that 1.0/3.0, 3.0/9.0, and 9.0/27.0 all agree. +;; http://www.netlib.org/paranoia +(assert_return (invoke "f32.div" (f32.const 0x1p+0) (f32.const 0x1.8p+1)) (f32.const 0x1.555556p-2)) +(assert_return (invoke "f32.div" (f32.const 0x3p+0) (f32.const 0x1.2p+3)) (f32.const 0x1.555556p-2)) +(assert_return (invoke "f32.div" (f32.const 0x1.2p+3) (f32.const 0x1.bp+4)) (f32.const 0x1.555556p-2)) +(assert_return (invoke "f64.div" (f64.const 0x1p+0) (f64.const 0x1.8p+1)) (f64.const 0x1.5555555555555p-2)) +(assert_return (invoke "f64.div" (f64.const 0x3p+0) (f64.const 0x1.2p+3)) (f64.const 0x1.5555555555555p-2)) +(assert_return (invoke "f64.div" (f64.const 0x1.2p+3) (f64.const 0x1.bp+4)) (f64.const 0x1.5555555555555p-2)) + +;; Test for bugs found in an early RISC-V implementation. +;; https://github.com/riscv/riscv-tests/pull/8 +(assert_return (invoke "f32.sqrt" (f32.const 0x1.56p+7)) (f32.const 0x1.a2744cp+3)) +(assert_return (invoke "f32.sqrt" (f32.const 0x1.594dfcp-23)) (f32.const 0x1.a4789cp-12)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.56p+7)) (f64.const 0x1.a2744ce9674f5p+3)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.594dfc70aa105p-23)) (f64.const 0x1.a4789c0e37f99p-12)) + +;; Computations that round differently on x87. +(assert_return (invoke "f64.sqrt" (f64.const 0x1.0263fcc94f259p-164)) (f64.const 0x1.0131485de579fp-82)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.352dfa278c43dp+338)) (f64.const 0x1.195607dac5417p+169)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.b15daa23924fap+402)) (f64.const 0x1.4d143db561493p+201)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.518c8e68cb753p-37)) (f64.const 0x1.9fb8ef1ad5bfdp-19)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.86d8b6518078ep-370)) (f64.const 0x1.3c5142a48fcadp-185)) + +;; Test another sqrt case on x87. +;; https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52593 +(assert_return (invoke "f64.sqrt" (f64.const 0x1.fffffffffffffp-1)) (f64.const 0x1.fffffffffffffp-1)) + +;; Computations that round differently in round-upward mode. +(assert_return (invoke "f32.sqrt" (f32.const 0x1.098064p-3)) (f32.const 0x1.70b23p-2)) +(assert_return (invoke "f32.sqrt" (f32.const 0x1.d9befp+100)) (f32.const 0x1.5c4052p+50)) +(assert_return (invoke "f32.sqrt" (f32.const 0x1.42b5b6p-4)) (f32.const 0x1.1f6d0ep-2)) +(assert_return (invoke "f32.sqrt" (f32.const 0x1.3684dp-71)) (f32.const 0x1.8ebae2p-36)) +(assert_return (invoke "f32.sqrt" (f32.const 0x1.d8bc4ep-11)) (f32.const 0x1.ebf9eap-6)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.5c39f220d5704p-924)) (f64.const 0x1.2a92bc24ceae9p-462)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.53521a635745cp+727)) (f64.const 0x1.a0cfdc4ef8ff1p+363)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.dfd5bbc9f4678p+385)) (f64.const 0x1.efa817117c94cp+192)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.33f9640811cd4p+105)) (f64.const 0x1.8d17c9243baa3p+52)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.6c0ef0267ff45p+999)) (f64.const 0x1.afbcfae3f2b4p+499)) + +;; Computations that round differently in round-downward mode. +(assert_return (invoke "f32.sqrt" (f32.const 0x1.26a62ep+27)) (f32.const 0x1.84685p+13)) +(assert_return (invoke "f32.sqrt" (f32.const 0x1.166002p-113)) (f32.const 0x1.798762p-57)) +(assert_return (invoke "f32.sqrt" (f32.const 0x1.3dfb5p-15)) (f32.const 0x1.937e38p-8)) +(assert_return (invoke "f32.sqrt" (f32.const 0x1.30eb2cp-120)) (f32.const 0x1.176406p-60)) +(assert_return (invoke "f32.sqrt" (f32.const 0x1.cb705cp-123)) (f32.const 0x1.e5020ap-62)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.edae8aea0543p+695)) (f64.const 0x1.f6c1ea4fc8dd2p+347)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.f7ee4bda5c9c3p-763)) (f64.const 0x1.fbf30bdaf11c5p-382)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.a48f348266ad1p-30)) (f64.const 0x1.481ee7540baf7p-15)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.feb5a1ce3ed9cp-242)) (f64.const 0x1.6995060c20d46p-121)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.957d9796e3834p+930)) (f64.const 0x1.42305213157bap+465)) + +;; Computations that round differently in round-toward-zero mode. +(assert_return (invoke "f32.sqrt" (f32.const 0x1.65787cp+118)) (f32.const 0x1.2e82a4p+59)) +(assert_return (invoke "f32.sqrt" (f32.const 0x1.736044p+15)) (f32.const 0x1.b40e4p+7)) +(assert_return (invoke "f32.sqrt" (f32.const 0x1.a00edp-1)) (f32.const 0x1.cd8aecp-1)) +(assert_return (invoke "f32.sqrt" (f32.const 0x1.7a4c8p-87)) (f32.const 0x1.b819e4p-44)) +(assert_return (invoke "f32.sqrt" (f32.const 0x1.5d24d4p-94)) (f32.const 0x1.2af75ep-47)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.a008948ead274p+738)) (f64.const 0x1.4659b37c39b19p+369)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.70f6199ed21f5p-381)) (f64.const 0x1.b2a2bddf3300dp-191)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.35c1d49f2a352p+965)) (f64.const 0x1.8e3d9f01a9716p+482)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.3fbdcfb2b2a15p-45)) (f64.const 0x1.949ba4feca42ap-23)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.c201b94757145p-492)) (f64.const 0x1.5369ee6bf2967p-246)) + +;; Computations that round differently when computed via f32. +(assert_return_nan (invoke "f64.sqrt" (f64.const -0x1.360e8d0032adp-963))) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.d9a6f5eef0503p+103)) (f64.const 0x1.ec73f56c166f6p+51)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.aa051a5c4ec27p-760)) (f64.const 0x1.4a3e771ff5149p-380)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.e5522a741babep-276)) (f64.const 0x1.607ae2b6feb7dp-138)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.4832badc0c061p+567)) (f64.const 0x1.99ec7934139b2p+283)) + +;; Test the least greatest value with a sqrt that rounds to one. +(assert_return (invoke "f32.sqrt" (f32.const 0x1.000002p+0)) (f32.const 0x1p+0)) +(assert_return (invoke "f32.sqrt" (f32.const 0x1.000004p+0)) (f32.const 0x1.000002p+0)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.0000000000001p+0)) (f64.const 0x1p+0)) +(assert_return (invoke "f64.sqrt" (f64.const 0x1.0000000000002p+0)) (f64.const 0x1.0000000000001p+0)) + +;; Test that the bitwise floating point operators are bitwise on NaN. + +(assert_return (invoke "f32.abs" (f32.const nan)) (f32.const nan)) +(assert_return (invoke "f32.abs" (f32.const -nan)) (f32.const nan)) +(assert_return (invoke "f32.abs" (f32.const nan:0x0f1e2)) (f32.const nan:0x0f1e2)) +(assert_return (invoke "f32.abs" (f32.const -nan:0x0f1e2)) (f32.const nan:0x0f1e2)) +(assert_return (invoke "f64.abs" (f64.const nan)) (f64.const nan)) +(assert_return (invoke "f64.abs" (f64.const -nan)) (f64.const nan)) +(assert_return (invoke "f64.abs" (f64.const nan:0x0f1e27a6b)) (f64.const nan:0x0f1e27a6b)) +(assert_return (invoke "f64.abs" (f64.const -nan:0x0f1e27a6b)) (f64.const nan:0x0f1e27a6b)) + +(assert_return (invoke "f32.neg" (f32.const nan)) (f32.const -nan)) +(assert_return (invoke "f32.neg" (f32.const -nan)) (f32.const nan)) +(assert_return (invoke "f32.neg" (f32.const nan:0x0f1e2)) (f32.const -nan:0x0f1e2)) +(assert_return (invoke "f32.neg" (f32.const -nan:0x0f1e2)) (f32.const nan:0x0f1e2)) +(assert_return (invoke "f64.neg" (f64.const nan)) (f64.const -nan)) +(assert_return (invoke "f64.neg" (f64.const -nan)) (f64.const nan)) +(assert_return (invoke "f64.neg" (f64.const nan:0x0f1e27a6b)) (f64.const -nan:0x0f1e27a6b)) +(assert_return (invoke "f64.neg" (f64.const -nan:0x0f1e27a6b)) (f64.const nan:0x0f1e27a6b)) + +(assert_return (invoke "f32.copysign" (f32.const nan) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "f32.copysign" (f32.const nan) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "f32.copysign" (f32.const -nan) (f32.const nan)) (f32.const nan)) +(assert_return (invoke "f32.copysign" (f32.const -nan) (f32.const -nan)) (f32.const -nan)) +(assert_return (invoke "f32.copysign" (f32.const nan:0x0f1e2) (f32.const nan)) (f32.const nan:0x0f1e2)) +(assert_return (invoke "f32.copysign" (f32.const nan:0x0f1e2) (f32.const -nan)) (f32.const -nan:0x0f1e2)) +(assert_return (invoke "f32.copysign" (f32.const -nan:0x0f1e2) (f32.const nan)) (f32.const nan:0x0f1e2)) +(assert_return (invoke "f32.copysign" (f32.const -nan:0x0f1e2) (f32.const -nan)) (f32.const -nan:0x0f1e2)) +(assert_return (invoke "f64.copysign" (f64.const nan) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "f64.copysign" (f64.const nan) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "f64.copysign" (f64.const -nan) (f64.const nan)) (f64.const nan)) +(assert_return (invoke "f64.copysign" (f64.const -nan) (f64.const -nan)) (f64.const -nan)) +(assert_return (invoke "f64.copysign" (f64.const nan:0x0f1e27a6b) (f64.const nan)) (f64.const nan:0x0f1e27a6b)) +(assert_return (invoke "f64.copysign" (f64.const nan:0x0f1e27a6b) (f64.const -nan)) (f64.const -nan:0x0f1e27a6b)) +(assert_return (invoke "f64.copysign" (f64.const -nan:0x0f1e27a6b) (f64.const nan)) (f64.const nan:0x0f1e27a6b)) +(assert_return (invoke "f64.copysign" (f64.const -nan:0x0f1e27a6b) (f64.const -nan)) (f64.const -nan:0x0f1e27a6b)) + +;; Test that ceil isn't implemented as adding 0.5 and rounding to nearest. +(assert_return (invoke "f32.ceil" (f32.const 0x1.fffffep-1)) (f32.const 1.0)) +(assert_return (invoke "f32.ceil" (f32.const 0x1p-126)) (f32.const 1.0)) +(assert_return (invoke "f64.ceil" (f64.const 0x1.fffffffffffffp-1)) (f64.const 1.0)) +(assert_return (invoke "f64.ceil" (f64.const 0x1p-1022)) (f64.const 1.0)) + +;; Test the maximum and minimum value for which ceil is not an identity operator. +(assert_return (invoke "f32.ceil" (f32.const 0x1.fffffep+22)) (f32.const 0x1p+23)) +(assert_return (invoke "f32.ceil" (f32.const -0x1.fffffep+22)) (f32.const -0x1.fffffcp+22)) +(assert_return (invoke "f64.ceil" (f64.const 0x1.fffffffffffffp+51)) (f64.const 0x1p+52)) +(assert_return (invoke "f64.ceil" (f64.const -0x1.fffffffffffffp+51)) (f64.const -0x1.ffffffffffffep+51)) + +;; Test that floor isn't implemented as subtracting 0.5 and rounding to nearest. +(assert_return (invoke "f32.floor" (f32.const -0x1.fffffep-1)) (f32.const -1.0)) +(assert_return (invoke "f32.floor" (f32.const -0x1p-126)) (f32.const -1.0)) +(assert_return (invoke "f64.floor" (f64.const -0x1.fffffffffffffp-1)) (f64.const -1.0)) +(assert_return (invoke "f64.floor" (f64.const -0x1p-1022)) (f64.const -1.0)) + +;; Test the maximum and minimum value for which floor is not an identity operator. +(assert_return (invoke "f32.floor" (f32.const -0x1.fffffep+22)) (f32.const -0x1p+23)) +(assert_return (invoke "f32.floor" (f32.const 0x1.fffffep+22)) (f32.const 0x1.fffffcp+22)) +(assert_return (invoke "f64.floor" (f64.const -0x1.fffffffffffffp+51)) (f64.const -0x1p+52)) +(assert_return (invoke "f64.floor" (f64.const 0x1.fffffffffffffp+51)) (f64.const 0x1.ffffffffffffep+51)) + +;; Test the maximum and minimum value for which trunc is not an identity operator. +(assert_return (invoke "f32.trunc" (f32.const -0x1.fffffep+22)) (f32.const -0x1.fffffcp+22)) +(assert_return (invoke "f32.trunc" (f32.const 0x1.fffffep+22)) (f32.const 0x1.fffffcp+22)) +(assert_return (invoke "f64.trunc" (f64.const -0x1.fffffffffffffp+51)) (f64.const -0x1.ffffffffffffep+51)) +(assert_return (invoke "f64.trunc" (f64.const 0x1.fffffffffffffp+51)) (f64.const 0x1.ffffffffffffep+51)) + +;; Test that nearest isn't implemented naively. +;; http://blog.frama-c.com/index.php?post/2013/05/02/nearbyintf1 +;; http://blog.frama-c.com/index.php?post/2013/05/04/nearbyintf3 +(assert_return (invoke "f32.nearest" (f32.const 0x1.000002p+23)) (f32.const 0x1.000002p+23)) +(assert_return (invoke "f32.nearest" (f32.const 0x1.000004p+23)) (f32.const 0x1.000004p+23)) +(assert_return (invoke "f32.nearest" (f32.const 0x1.fffffep-2)) (f32.const 0.0)) +(assert_return (invoke "f32.nearest" (f32.const 0x1.fffffep+47)) (f32.const 0x1.fffffep+47)) +(assert_return (invoke "f64.nearest" (f64.const 0x1.0000000000001p+52)) (f64.const 0x1.0000000000001p+52)) +(assert_return (invoke "f64.nearest" (f64.const 0x1.0000000000002p+52)) (f64.const 0x1.0000000000002p+52)) +(assert_return (invoke "f64.nearest" (f64.const 0x1.fffffffffffffp-2)) (f64.const 0.0)) +(assert_return (invoke "f64.nearest" (f64.const 0x1.fffffffffffffp+105)) (f64.const 0x1.fffffffffffffp+105)) + +;; Nearest should not round halfway cases away from zero (as C's round(3) does) +;; or up (as JS's Math.round does). +(assert_return (invoke "f32.nearest" (f32.const 4.5)) (f32.const 4.0)) +(assert_return (invoke "f32.nearest" (f32.const -4.5)) (f32.const -4.0)) +(assert_return (invoke "f32.nearest" (f32.const -3.5)) (f32.const -4.0)) +(assert_return (invoke "f64.nearest" (f64.const 4.5)) (f64.const 4.0)) +(assert_return (invoke "f64.nearest" (f64.const -4.5)) (f64.const -4.0)) +(assert_return (invoke "f64.nearest" (f64.const -3.5)) (f64.const -4.0)) + +;; Test the maximum and minimum value for which nearest is not an identity operator. +(assert_return (invoke "f32.nearest" (f32.const -0x1.fffffep+22)) (f32.const -0x1p+23)) +(assert_return (invoke "f32.nearest" (f32.const 0x1.fffffep+22)) (f32.const 0x1p+23)) +(assert_return (invoke "f64.nearest" (f64.const -0x1.fffffffffffffp+51)) (f64.const -0x1p+52)) +(assert_return (invoke "f64.nearest" (f64.const 0x1.fffffffffffffp+51)) (f64.const 0x1p+52)) + +;; Test that min and max behave properly with signaling NaNs. +(assert_return (invoke "f32.min" (f32.const 0.0) (f32.const nan:0x200000)) (f32.const nan:0x600000)) +(assert_return (invoke "f32.min" (f32.const nan:0x200000) (f32.const 0.0)) (f32.const nan:0x600000)) +(assert_return (invoke "f32.max" (f32.const 0.0) (f32.const nan:0x200000)) (f32.const nan:0x600000)) +(assert_return (invoke "f32.max" (f32.const nan:0x200000) (f32.const 0.0)) (f32.const nan:0x600000)) +(assert_return (invoke "f64.min" (f64.const 0.0) (f64.const nan:0x4000000000000)) (f64.const nan:0xc000000000000)) +(assert_return (invoke "f64.min" (f64.const nan:0x4000000000000) (f64.const 0.0)) (f64.const nan:0xc000000000000)) +(assert_return (invoke "f64.max" (f64.const 0.0) (f64.const nan:0x4000000000000)) (f64.const nan:0xc000000000000)) +(assert_return (invoke "f64.max" (f64.const nan:0x4000000000000) (f64.const 0.0)) (f64.const nan:0xc000000000000)) diff --git a/js/src/jit-test/tests/wasm/spec/float_misc.wast.js b/js/src/jit-test/tests/wasm/spec/float_misc.wast.js new file mode 100644 index 000000000..2ef3dee2c --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/float_misc.wast.js @@ -0,0 +1 @@ +var importedArgs = ['float_misc.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/forward.wast b/js/src/jit-test/tests/wasm/spec/forward.wast new file mode 100644 index 000000000..43ab49348 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/forward.wast @@ -0,0 +1,20 @@ +(module + (func $even (export "even") (param $n i32) (result i32) + (if i32 (i32.eq (get_local $n) (i32.const 0)) + (i32.const 1) + (call $odd (i32.sub (get_local $n) (i32.const 1))) + ) + ) + + (func $odd (export "odd") (param $n i32) (result i32) + (if i32 (i32.eq (get_local $n) (i32.const 0)) + (i32.const 0) + (call $even (i32.sub (get_local $n) (i32.const 1))) + ) + ) +) + +(assert_return (invoke "even" (i32.const 13)) (i32.const 0)) +(assert_return (invoke "even" (i32.const 20)) (i32.const 1)) +(assert_return (invoke "odd" (i32.const 13)) (i32.const 1)) +(assert_return (invoke "odd" (i32.const 20)) (i32.const 0)) diff --git a/js/src/jit-test/tests/wasm/spec/forward.wast.js b/js/src/jit-test/tests/wasm/spec/forward.wast.js new file mode 100644 index 000000000..ecb239427 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/forward.wast.js @@ -0,0 +1 @@ +var importedArgs = ['forward.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/func.wast b/js/src/jit-test/tests/wasm/spec/func.wast new file mode 100644 index 000000000..a9c71db48 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/func.wast @@ -0,0 +1,488 @@ +;; Test `func` declarations, i.e. functions + +(module + ;; Auxiliary definition + (type $sig (func)) + (func $dummy) + + ;; Syntax + + (func) + (func (export "f")) + (func $f) + (func $h (export "g")) + + (func (local)) + (func (local) (local)) + (func (local i32)) + (func (local $x i32)) + (func (local i32 f64 i64)) + (func (local i32) (local f64)) + (func (local i32 f32) (local $x i64) (local) (local i32 f64)) + + (func (param)) + (func (param) (param)) + (func (param i32)) + (func (param $x i32)) + (func (param i32 f64 i64)) + (func (param i32) (param f64)) + (func (param i32 f32) (param $x i64) (param) (param i32 f64)) + + (func (result i32) (unreachable)) + + (func (type $sig)) + + (func $complex + (param i32 f32) (param $x i64) (param) (param i32) + (result i32) + (local f32) (local $y i32) (local i64 i32) (local) (local f64 i32) + (unreachable) (unreachable) + ) + (func $complex-sig + (type $sig) + (local f32) (local $y i32) (local i64 i32) (local) (local f64 i32) + (unreachable) (unreachable) + ) + + + ;; Typing of locals + + (func (export "local-first-i32") (result i32) (local i32 i32) (get_local 0)) + (func (export "local-first-i64") (result i64) (local i64 i64) (get_local 0)) + (func (export "local-first-f32") (result f32) (local f32 f32) (get_local 0)) + (func (export "local-first-f64") (result f64) (local f64 f64) (get_local 0)) + (func (export "local-second-i32") (result i32) (local i32 i32) (get_local 1)) + (func (export "local-second-i64") (result i64) (local i64 i64) (get_local 1)) + (func (export "local-second-f32") (result f32) (local f32 f32) (get_local 1)) + (func (export "local-second-f64") (result f64) (local f64 f64) (get_local 1)) + (func (export "local-mixed") (result f64) + (local f32) (local $x i32) (local i64 i32) (local) (local f64 i32) + (drop (f32.neg (get_local 0))) + (drop (i32.eqz (get_local 1))) + (drop (i64.eqz (get_local 2))) + (drop (i32.eqz (get_local 3))) + (drop (f64.neg (get_local 4))) + (drop (i32.eqz (get_local 5))) + (get_local 4) + ) + + ;; Typing of parameters + + (func (export "param-first-i32") (param i32 i32) (result i32) (get_local 0)) + (func (export "param-first-i64") (param i64 i64) (result i64) (get_local 0)) + (func (export "param-first-f32") (param f32 f32) (result f32) (get_local 0)) + (func (export "param-first-f64") (param f64 f64) (result f64) (get_local 0)) + (func (export "param-second-i32") (param i32 i32) (result i32) (get_local 1)) + (func (export "param-second-i64") (param i64 i64) (result i64) (get_local 1)) + (func (export "param-second-f32") (param f32 f32) (result f32) (get_local 1)) + (func (export "param-second-f64") (param f64 f64) (result f64) (get_local 1)) + (func (export "param-mixed") (param f32 i32) (param) (param $x i64) (param i32 f64 i32) + (result f64) + (drop (f32.neg (get_local 0))) + (drop (i32.eqz (get_local 1))) + (drop (i64.eqz (get_local 2))) + (drop (i32.eqz (get_local 3))) + (drop (f64.neg (get_local 4))) + (drop (i32.eqz (get_local 5))) + (get_local 4) + ) + + ;; Typing of result + + (func (export "empty")) + (func (export "value-void") (call $dummy)) + (func (export "value-i32") (result i32) (i32.const 77)) + (func (export "value-i64") (result i64) (i64.const 7777)) + (func (export "value-f32") (result f32) (f32.const 77.7)) + (func (export "value-f64") (result f64) (f64.const 77.77)) + (func (export "value-block-void") (block (call $dummy) (call $dummy))) + (func (export "value-block-i32") (result i32) + (block i32 (call $dummy) (i32.const 77)) + ) + + (func (export "return-empty") (return)) + (func (export "return-i32") (result i32) (return (i32.const 78))) + (func (export "return-i64") (result i64) (return (i64.const 7878))) + (func (export "return-f32") (result f32) (return (f32.const 78.7))) + (func (export "return-f64") (result f64) (return (f64.const 78.78))) + (func (export "return-block-i32") (result i32) + (return (block i32 (call $dummy) (i32.const 77))) + ) + + (func (export "break-empty") (br 0)) + (func (export "break-i32") (result i32) (br 0 (i32.const 79))) + (func (export "break-i64") (result i64) (br 0 (i64.const 7979))) + (func (export "break-f32") (result f32) (br 0 (f32.const 79.9))) + (func (export "break-f64") (result f64) (br 0 (f64.const 79.79))) + (func (export "break-block-i32") (result i32) + (br 0 (block i32 (call $dummy) (i32.const 77))) + ) + + (func (export "break-br_if-empty") (param i32) + (br_if 0 (get_local 0)) + ) + (func (export "break-br_if-num") (param i32) (result i32) + (drop (br_if 0 (i32.const 50) (get_local 0))) (i32.const 51) + ) + + (func (export "break-br_table-empty") (param i32) + (br_table 0 0 0 (get_local 0)) + ) + (func (export "break-br_table-num") (param i32) (result i32) + (br_table 0 0 (i32.const 50) (get_local 0)) (i32.const 51) + ) + (func (export "break-br_table-nested-empty") (param i32) + (block (br_table 0 1 0 (get_local 0))) + ) + (func (export "break-br_table-nested-num") (param i32) (result i32) + (i32.add + (block i32 (br_table 0 1 0 (i32.const 50) (get_local 0)) (i32.const 51)) + (i32.const 2) + ) + ) + + ;; Default initialization of locals + + (func (export "init-local-i32") (result i32) (local i32) (get_local 0)) + (func (export "init-local-i64") (result i64) (local i64) (get_local 0)) + (func (export "init-local-f32") (result f32) (local f32) (get_local 0)) + (func (export "init-local-f64") (result f64) (local f64) (get_local 0)) + + + ;; Desugaring of implicit type signature + (func $empty-sig-1) ;; should be assigned type $sig + (func $complex-sig-1 (param f64 i64 f64 i64 f64 i64 f32 i32)) + (func $empty-sig-2) ;; should be assigned type $sig + (func $complex-sig-2 (param f64 i64 f64 i64 f64 i64 f32 i32)) + (func $complex-sig-3 (param f64 i64 f64 i64 f64 i64 f32 i32)) + + (type $empty-sig-duplicate (func)) + (type $complex-sig-duplicate (func (param f64 i64 f64 i64 f64 i64 f32 i32))) + (table anyfunc + (elem + $complex-sig-3 $empty-sig-2 $complex-sig-1 $complex-sig-3 $empty-sig-1 + ) + ) + + (func (export "signature-explicit-reused") + (call_indirect $sig (i32.const 1)) + (call_indirect $sig (i32.const 4)) + ) + + (func (export "signature-implicit-reused") + ;; The implicit index 16 in this test depends on the function and + ;; type definitions, and may need adapting if they change. + (call_indirect 16 + (f64.const 0) (i64.const 0) (f64.const 0) (i64.const 0) + (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0) + (i32.const 0) + ) + (call_indirect 16 + (f64.const 0) (i64.const 0) (f64.const 0) (i64.const 0) + (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0) + (i32.const 2) + ) + (call_indirect 16 + (f64.const 0) (i64.const 0) (f64.const 0) (i64.const 0) + (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0) + (i32.const 3) + ) + ) + + (func (export "signature-explicit-duplicate") + (call_indirect $empty-sig-duplicate (i32.const 1)) + ) + + (func (export "signature-implicit-duplicate") + (call_indirect $complex-sig-duplicate + (f64.const 0) (i64.const 0) (f64.const 0) (i64.const 0) + (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0) + (i32.const 0) + ) + ) +) + +(assert_return (invoke "local-first-i32") (i32.const 0)) +(assert_return (invoke "local-first-i64") (i64.const 0)) +(assert_return (invoke "local-first-f32") (f32.const 0)) +(assert_return (invoke "local-first-f64") (f64.const 0)) +(assert_return (invoke "local-second-i32") (i32.const 0)) +(assert_return (invoke "local-second-i64") (i64.const 0)) +(assert_return (invoke "local-second-f32") (f32.const 0)) +(assert_return (invoke "local-second-f64") (f64.const 0)) +(assert_return (invoke "local-mixed") (f64.const 0)) + +(assert_return + (invoke "param-first-i32" (i32.const 2) (i32.const 3)) (i32.const 2) +) +(assert_return + (invoke "param-first-i64" (i64.const 2) (i64.const 3)) (i64.const 2) +) +(assert_return + (invoke "param-first-f32" (f32.const 2) (f32.const 3)) (f32.const 2) +) +(assert_return + (invoke "param-first-f64" (f64.const 2) (f64.const 3)) (f64.const 2) +) +(assert_return + (invoke "param-second-i32" (i32.const 2) (i32.const 3)) (i32.const 3) +) +(assert_return + (invoke "param-second-i64" (i64.const 2) (i64.const 3)) (i64.const 3) +) +(assert_return + (invoke "param-second-f32" (f32.const 2) (f32.const 3)) (f32.const 3) +) +(assert_return + (invoke "param-second-f64" (f64.const 2) (f64.const 3)) (f64.const 3) +) + +(assert_return + (invoke "param-mixed" + (f32.const 1) (i32.const 2) (i64.const 3) + (i32.const 4) (f64.const 5.5) (i32.const 6) + ) + (f64.const 5.5) +) + +(assert_return (invoke "empty")) +(assert_return (invoke "value-void")) +(assert_return (invoke "value-i32") (i32.const 77)) +(assert_return (invoke "value-i64") (i64.const 7777)) +(assert_return (invoke "value-f32") (f32.const 77.7)) +(assert_return (invoke "value-f64") (f64.const 77.77)) +(assert_return (invoke "value-block-void")) +(assert_return (invoke "value-block-i32") (i32.const 77)) + +(assert_return (invoke "return-empty")) +(assert_return (invoke "return-i32") (i32.const 78)) +(assert_return (invoke "return-i64") (i64.const 7878)) +(assert_return (invoke "return-f32") (f32.const 78.7)) +(assert_return (invoke "return-f64") (f64.const 78.78)) +(assert_return (invoke "return-block-i32") (i32.const 77)) + +(assert_return (invoke "break-empty")) +(assert_return (invoke "break-i32") (i32.const 79)) +(assert_return (invoke "break-i64") (i64.const 7979)) +(assert_return (invoke "break-f32") (f32.const 79.9)) +(assert_return (invoke "break-f64") (f64.const 79.79)) +(assert_return (invoke "break-block-i32") (i32.const 77)) + +(assert_return (invoke "break-br_if-empty" (i32.const 0))) +(assert_return (invoke "break-br_if-empty" (i32.const 2))) +(assert_return (invoke "break-br_if-num" (i32.const 0)) (i32.const 51)) +(assert_return (invoke "break-br_if-num" (i32.const 1)) (i32.const 50)) + +(assert_return (invoke "break-br_table-empty" (i32.const 0))) +(assert_return (invoke "break-br_table-empty" (i32.const 1))) +(assert_return (invoke "break-br_table-empty" (i32.const 5))) +(assert_return (invoke "break-br_table-empty" (i32.const -1))) +(assert_return (invoke "break-br_table-num" (i32.const 0)) (i32.const 50)) +(assert_return (invoke "break-br_table-num" (i32.const 1)) (i32.const 50)) +(assert_return (invoke "break-br_table-num" (i32.const 10)) (i32.const 50)) +(assert_return (invoke "break-br_table-num" (i32.const -100)) (i32.const 50)) +(assert_return (invoke "break-br_table-nested-empty" (i32.const 0))) +(assert_return (invoke "break-br_table-nested-empty" (i32.const 1))) +(assert_return (invoke "break-br_table-nested-empty" (i32.const 3))) +(assert_return (invoke "break-br_table-nested-empty" (i32.const -2))) +(assert_return + (invoke "break-br_table-nested-num" (i32.const 0)) (i32.const 52) +) +(assert_return + (invoke "break-br_table-nested-num" (i32.const 1)) (i32.const 50) +) +(assert_return + (invoke "break-br_table-nested-num" (i32.const 2)) (i32.const 52) +) +(assert_return + (invoke "break-br_table-nested-num" (i32.const -3)) (i32.const 52) +) + +(assert_return (invoke "init-local-i32") (i32.const 0)) +(assert_return (invoke "init-local-i64") (i64.const 0)) +(assert_return (invoke "init-local-f32") (f32.const 0)) +(assert_return (invoke "init-local-f64") (f64.const 0)) + +(assert_return (invoke "signature-explicit-reused")) +(assert_return (invoke "signature-implicit-reused")) +(assert_return (invoke "signature-explicit-duplicate")) +(assert_return (invoke "signature-implicit-duplicate")) + + +;; Invalid typing of locals + +(assert_invalid + (module (func $type-local-num-vs-num (result i64) (local i32) (get_local 0))) + "type mismatch" +) +(assert_invalid + (module (func $type-local-num-vs-num (local f32) (i32.eqz (get_local 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-local-num-vs-num (local f64 i64) (f64.neg (get_local 1)))) + "type mismatch" +) + + +;; Invalid typing of parameters + +(assert_invalid + (module (func $type-param-num-vs-num (param i32) (result i64) (get_local 0))) + "type mismatch" +) +(assert_invalid + (module (func $type-param-num-vs-num (param f32) (i32.eqz (get_local 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-param-num-vs-num (param f64 i64) (f64.neg (get_local 1)))) + "type mismatch" +) + + +;; Invalid typing of result + +(assert_invalid + (module (func $type-multiple-result (result i32 i32) (unreachable))) + "invalid result arity" +) +(assert_invalid + (module + (type (func (result i32 i32))) + (func $type-multiple-result (type 0) (unreachable)) + ) + "invalid result arity" +) + + +(assert_invalid + (module (func $type-empty-i32 (result i32))) + "type mismatch" +) +(assert_invalid + (module (func $type-empty-i64 (result i64))) + "type mismatch" +) +(assert_invalid + (module (func $type-empty-f32 (result f32))) + "type mismatch" +) +(assert_invalid + (module (func $type-empty-f64 (result f64))) + "type mismatch" +) + +(assert_invalid + (module (func $type-value-void-vs-num (result i32) + (nop) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-value-num-vs-void + (i32.const 0) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-value-num-vs-num (result i32) + (f32.const 0) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-return-last-empty-vs-num (result i32) + (return) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-return-last-void-vs-num (result i32) + (return (nop)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-return-last-num-vs-num (result i32) + (return (i64.const 0)) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-return-empty-vs-num (result i32) + (return) (i32.const 1) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-return-void-vs-num (result i32) + (return (nop)) (i32.const 1) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-return-num-vs-num (result i32) + (return (i64.const 1)) (i32.const 1) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-return-first-num-vs-num (result i32) + (return (i64.const 1)) (return (i32.const 1)) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-break-last-void-vs-num (result i32) + (br 0) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-break-last-num-vs-num (result i32) + (br 0 (f32.const 0)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-break-void-vs-num (result i32) + (br 0) (i32.const 1) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-break-num-vs-num (result i32) + (br 0 (i64.const 1)) (i32.const 1) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-break-first-num-vs-num (result i32) + (br 0 (i64.const 1)) (br 0 (i32.const 1)) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-break-nested-empty-vs-num (result i32) + (block (br 1)) (br 0 (i32.const 1)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-break-nested-void-vs-num (result i32) + (block (br 1 (nop))) (br 0 (i32.const 1)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-break-nested-num-vs-num (result i32) + (block (br 1 (i64.const 1))) (br 0 (i32.const 1)) + )) + "type mismatch" +) + diff --git a/js/src/jit-test/tests/wasm/spec/func.wast.js b/js/src/jit-test/tests/wasm/spec/func.wast.js new file mode 100644 index 000000000..2f67984e5 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/func.wast.js @@ -0,0 +1 @@ +var importedArgs = ['func.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/func_ptrs.wast b/js/src/jit-test/tests/wasm/spec/func_ptrs.wast new file mode 100644 index 000000000..f7edd9f44 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/func_ptrs.wast @@ -0,0 +1,105 @@ +(module + (type (func)) ;; 0: void -> void + (type $S (func)) ;; 1: void -> void + (type (func (param))) ;; 2: void -> void + (type (func (result i32))) ;; 3: void -> i32 + (type (func (param) (result i32))) ;; 4: void -> i32 + (type $T (func (param i32) (result i32))) ;; 5: i32 -> i32 + (type $U (func (param i32))) ;; 6: i32 -> void + + (func $print (import "spectest" "print") (type 6)) + + (func (type 0)) + (func (type $S)) + + (func (export "one") (type 4) (i32.const 13)) + (func (export "two") (type $T) (i32.add (get_local 0) (i32.const 1))) + + ;; Both signature and parameters are allowed (and required to match) + ;; since this allows the naming of parameters. + (func (export "three") (type $T) (param $a i32) (result i32) + (i32.sub (get_local 0) (i32.const 2)) + ) + + (func (export "four") (type $U) (call $print (get_local 0))) +) +(assert_return (invoke "one") (i32.const 13)) +(assert_return (invoke "two" (i32.const 13)) (i32.const 14)) +(assert_return (invoke "three" (i32.const 13)) (i32.const 11)) +(invoke "four" (i32.const 83)) + +(assert_invalid (module (elem (i32.const 0))) "unknown table") +(assert_invalid (module (elem (i32.const 0) 0) (func)) "unknown table") + +(assert_invalid + (module (table 1 anyfunc) (elem (i64.const 0))) + "type mismatch" +) +(assert_invalid + (module (table 1 anyfunc) (elem (i32.ctz (i32.const 0)))) + "constant expression required" +) +(assert_invalid + (module (table 1 anyfunc) (elem (nop))) + "constant expression required" +) + +(assert_invalid (module (func (type 42))) "unknown type") +(assert_invalid (module (import "spectest" "print" (func (type 43)))) "unknown type") + +(module + (type $T (func (param) (result i32))) + (type $U (func (param) (result i32))) + (table anyfunc (elem $t1 $t2 $t3 $u1 $u2 $t1 $t3)) + + (func $t1 (type $T) (i32.const 1)) + (func $t2 (type $T) (i32.const 2)) + (func $t3 (type $T) (i32.const 3)) + (func $u1 (type $U) (i32.const 4)) + (func $u2 (type $U) (i32.const 5)) + + (func (export "callt") (param $i i32) (result i32) + (call_indirect $T (get_local $i)) + ) + + (func (export "callu") (param $i i32) (result i32) + (call_indirect $U (get_local $i)) + ) +) + +(assert_return (invoke "callt" (i32.const 0)) (i32.const 1)) +(assert_return (invoke "callt" (i32.const 1)) (i32.const 2)) +(assert_return (invoke "callt" (i32.const 2)) (i32.const 3)) +(assert_return (invoke "callt" (i32.const 3)) (i32.const 4)) +(assert_return (invoke "callt" (i32.const 4)) (i32.const 5)) +(assert_return (invoke "callt" (i32.const 5)) (i32.const 1)) +(assert_return (invoke "callt" (i32.const 6)) (i32.const 3)) +(assert_trap (invoke "callt" (i32.const 7)) "undefined element") +(assert_trap (invoke "callt" (i32.const 100)) "undefined element") +(assert_trap (invoke "callt" (i32.const -1)) "undefined element") + +(assert_return (invoke "callu" (i32.const 0)) (i32.const 1)) +(assert_return (invoke "callu" (i32.const 1)) (i32.const 2)) +(assert_return (invoke "callu" (i32.const 2)) (i32.const 3)) +(assert_return (invoke "callu" (i32.const 3)) (i32.const 4)) +(assert_return (invoke "callu" (i32.const 4)) (i32.const 5)) +(assert_return (invoke "callu" (i32.const 5)) (i32.const 1)) +(assert_return (invoke "callu" (i32.const 6)) (i32.const 3)) +(assert_trap (invoke "callu" (i32.const 7)) "undefined element") +(assert_trap (invoke "callu" (i32.const 100)) "undefined element") +(assert_trap (invoke "callu" (i32.const -1)) "undefined element") + +(module + (type $T (func (result i32))) + (table anyfunc (elem 0 1)) + + (func $t1 (type $T) (i32.const 1)) + (func $t2 (type $T) (i32.const 2)) + + (func (export "callt") (param $i i32) (result i32) + (call_indirect $T (get_local $i)) + ) +) + +(assert_return (invoke "callt" (i32.const 0)) (i32.const 1)) +(assert_return (invoke "callt" (i32.const 1)) (i32.const 2)) diff --git a/js/src/jit-test/tests/wasm/spec/func_ptrs.wast.js b/js/src/jit-test/tests/wasm/spec/func_ptrs.wast.js new file mode 100644 index 000000000..43f540b2a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/func_ptrs.wast.js @@ -0,0 +1 @@ +var importedArgs = ['func_ptrs.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/get_local.wast b/js/src/jit-test/tests/wasm/spec/get_local.wast new file mode 100644 index 000000000..e1f9625b9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/get_local.wast @@ -0,0 +1,148 @@ +;; Test `get_local` operator + +(module + ;; Typing + + (func (export "type-local-i32") (result i32) (local i32) (get_local 0)) + (func (export "type-local-i64") (result i64) (local i64) (get_local 0)) + (func (export "type-local-f32") (result f32) (local f32) (get_local 0)) + (func (export "type-local-f64") (result f64) (local f64) (get_local 0)) + + (func (export "type-param-i32") (param i32) (result i32) (get_local 0)) + (func (export "type-param-i64") (param i64) (result i64) (get_local 0)) + (func (export "type-param-f32") (param f32) (result f32) (get_local 0)) + (func (export "type-param-f64") (param f64) (result f64) (get_local 0)) + + (func (export "type-mixed") (param i64 f32 f64 i32 i32) + (local f32 i64 i64 f64) + (drop (i64.eqz (get_local 0))) + (drop (f32.neg (get_local 1))) + (drop (f64.neg (get_local 2))) + (drop (i32.eqz (get_local 3))) + (drop (i32.eqz (get_local 4))) + (drop (f32.neg (get_local 5))) + (drop (i64.eqz (get_local 6))) + (drop (i64.eqz (get_local 7))) + (drop (f64.neg (get_local 8))) + ) + + ;; Reading + + (func (export "read") (param i64 f32 f64 i32 i32) (result f64) + (local f32 i64 i64 f64) + (set_local 5 (f32.const 5.5)) + (set_local 6 (i64.const 6)) + (set_local 8 (f64.const 8)) + (f64.add + (f64.convert_u/i64 (get_local 0)) + (f64.add + (f64.promote/f32 (get_local 1)) + (f64.add + (get_local 2) + (f64.add + (f64.convert_u/i32 (get_local 3)) + (f64.add + (f64.convert_s/i32 (get_local 4)) + (f64.add + (f64.promote/f32 (get_local 5)) + (f64.add + (f64.convert_u/i64 (get_local 6)) + (f64.add + (f64.convert_u/i64 (get_local 7)) + (get_local 8) + ) + ) + ) + ) + ) + ) + ) + ) + ) +) + +(assert_return (invoke "type-local-i32") (i32.const 0)) +(assert_return (invoke "type-local-i64") (i64.const 0)) +(assert_return (invoke "type-local-f32") (f32.const 0)) +(assert_return (invoke "type-local-f64") (f64.const 0)) + +(assert_return (invoke "type-param-i32" (i32.const 2)) (i32.const 2)) +(assert_return (invoke "type-param-i64" (i64.const 3)) (i64.const 3)) +(assert_return (invoke "type-param-f32" (f32.const 4.4)) (f32.const 4.4)) +(assert_return (invoke "type-param-f64" (f64.const 5.5)) (f64.const 5.5)) + +(assert_return + (invoke "type-mixed" + (i64.const 1) (f32.const 2.2) (f64.const 3.3) (i32.const 4) (i32.const 5) + ) +) + +(assert_return + (invoke "read" + (i64.const 1) (f32.const 2) (f64.const 3.3) (i32.const 4) (i32.const 5) + ) + (f64.const 34.8) +) + + +;; Invalid typing of access to locals + +(assert_invalid + (module (func $type-local-num-vs-num (result i64) (local i32) (get_local 0))) + "type mismatch" +) +(assert_invalid + (module (func $type-local-num-vs-num (local f32) (i32.eqz (get_local 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-local-num-vs-num (local f64 i64) (f64.neg (get_local 1)))) + "type mismatch" +) + + +;; Invalid typing of access to parameters + +(assert_invalid + (module (func $type-param-num-vs-num (param i32) (result i64) (get_local 0))) + "type mismatch" +) +(assert_invalid + (module (func $type-param-num-vs-num (param f32) (i32.eqz (get_local 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-param-num-vs-num (param f64 i64) (f64.neg (get_local 1)))) + "type mismatch" +) + + +;; Invalid local index + +(assert_invalid + (module (func $unbound-local (local i32 i64) (get_local 3))) + "unknown local" +) +(assert_invalid + (module (func $large-local (local i32 i64) (get_local 14324343))) + "unknown local" +) + +(assert_invalid + (module (func $unbound-param (param i32 i64) (get_local 2))) + "unknown local" +) +(assert_invalid + (module (func $large-param (local i32 i64) (get_local 714324343))) + "unknown local" +) + +(assert_invalid + (module (func $unbound-mixed (param i32) (local i32 i64) (get_local 3))) + "unknown local" +) +(assert_invalid + (module (func $large-mixed (param i64) (local i32 i64) (get_local 214324343))) + "unknown local" +) + diff --git a/js/src/jit-test/tests/wasm/spec/get_local.wast.js b/js/src/jit-test/tests/wasm/spec/get_local.wast.js new file mode 100644 index 000000000..778e41487 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/get_local.wast.js @@ -0,0 +1 @@ +var importedArgs = ['get_local.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/globals.wast b/js/src/jit-test/tests/wasm/spec/globals.wast new file mode 100644 index 000000000..97d928f84 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/globals.wast @@ -0,0 +1,97 @@ +;; Test globals + +(module + (global $a i32 (i32.const -2)) + (global (;1;) f32 (f32.const -3)) + (global (;2;) f64 (f64.const -4)) + (global $b i64 (i64.const -5)) + + (global $x (mut i32) (i32.const -12)) + (global (;5;) (mut f32) (f32.const -13)) + (global (;6;) (mut f64) (f64.const -14)) + (global $y (mut i64) (i64.const -15)) + + (func (export "get-a") (result i32) (get_global $a)) + (func (export "get-b") (result i64) (get_global $b)) + (func (export "get-x") (result i32) (get_global $x)) + (func (export "get-y") (result i64) (get_global $y)) + (func (export "set-x") (param i32) (set_global $x (get_local 0))) + (func (export "set-y") (param i64) (set_global $y (get_local 0))) + + (func (export "get-1") (result f32) (get_global 1)) + (func (export "get-2") (result f64) (get_global 2)) + (func (export "get-5") (result f32) (get_global 5)) + (func (export "get-6") (result f64) (get_global 6)) + (func (export "set-5") (param f32) (set_global 5 (get_local 0))) + (func (export "set-6") (param f64) (set_global 6 (get_local 0))) +) + +(assert_return (invoke "get-a") (i32.const -2)) +(assert_return (invoke "get-b") (i64.const -5)) +(assert_return (invoke "get-x") (i32.const -12)) +(assert_return (invoke "get-y") (i64.const -15)) + +(assert_return (invoke "get-1") (f32.const -3)) +(assert_return (invoke "get-2") (f64.const -4)) +(assert_return (invoke "get-5") (f32.const -13)) +(assert_return (invoke "get-6") (f64.const -14)) + +(assert_return (invoke "set-x" (i32.const 6))) +(assert_return (invoke "set-y" (i64.const 7))) +(assert_return (invoke "set-5" (f32.const 8))) +(assert_return (invoke "set-6" (f64.const 9))) + +(assert_return (invoke "get-x") (i32.const 6)) +(assert_return (invoke "get-y") (i64.const 7)) +(assert_return (invoke "get-5") (f32.const 8)) +(assert_return (invoke "get-6") (f64.const 9)) + +(assert_invalid + (module (global f32 (f32.const 0)) (func (set_global 0 (i32.const 1)))) + "global is immutable" +) + +(assert_invalid + (module (import "m" "a" (global (mut i32)))) + "mutable globals cannot be imported" +) + +(assert_invalid + (module (global (import "m" "a") (mut i32))) + "mutable globals cannot be imported" +) + +(assert_invalid + (module (global (mut f32) (f32.const 0)) (export "a" (global 0))) + "mutable globals cannot be exported" +) + +(assert_invalid + (module (global (export "a") (mut f32) (f32.const 0))) + "mutable globals cannot be exported" +) + +(assert_invalid + (module (global f32 (f32.neg (f32.const 0)))) + "constant expression required" +) + +(assert_invalid + (module (global f32 (get_local 0))) + "constant expression required" +) + +(assert_invalid + (module (global i32 (f32.const 0))) + "type mismatch" +) + +(assert_invalid + (module (global i32 (get_global 0))) + "unknown global" +) + +(assert_invalid + (module (global i32 (get_global 1)) (global i32 (i32.const 0))) + "unknown global" +) diff --git a/js/src/jit-test/tests/wasm/spec/globals.wast.js b/js/src/jit-test/tests/wasm/spec/globals.wast.js new file mode 100644 index 000000000..9fdcb079d --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/globals.wast.js @@ -0,0 +1 @@ +var importedArgs = ['globals.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/i32.wast b/js/src/jit-test/tests/wasm/spec/i32.wast new file mode 100644 index 000000000..ba28d7c09 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/i32.wast @@ -0,0 +1,404 @@ +;; i32 operations + +(module + (func (export "add") (param $x i32) (param $y i32) (result i32) (i32.add (get_local $x) (get_local $y))) + (func (export "sub") (param $x i32) (param $y i32) (result i32) (i32.sub (get_local $x) (get_local $y))) + (func (export "mul") (param $x i32) (param $y i32) (result i32) (i32.mul (get_local $x) (get_local $y))) + (func (export "div_s") (param $x i32) (param $y i32) (result i32) (i32.div_s (get_local $x) (get_local $y))) + (func (export "div_u") (param $x i32) (param $y i32) (result i32) (i32.div_u (get_local $x) (get_local $y))) + (func (export "rem_s") (param $x i32) (param $y i32) (result i32) (i32.rem_s (get_local $x) (get_local $y))) + (func (export "rem_u") (param $x i32) (param $y i32) (result i32) (i32.rem_u (get_local $x) (get_local $y))) + (func (export "and") (param $x i32) (param $y i32) (result i32) (i32.and (get_local $x) (get_local $y))) + (func (export "or") (param $x i32) (param $y i32) (result i32) (i32.or (get_local $x) (get_local $y))) + (func (export "xor") (param $x i32) (param $y i32) (result i32) (i32.xor (get_local $x) (get_local $y))) + (func (export "shl") (param $x i32) (param $y i32) (result i32) (i32.shl (get_local $x) (get_local $y))) + (func (export "shr_s") (param $x i32) (param $y i32) (result i32) (i32.shr_s (get_local $x) (get_local $y))) + (func (export "shr_u") (param $x i32) (param $y i32) (result i32) (i32.shr_u (get_local $x) (get_local $y))) + (func (export "rotl") (param $x i32) (param $y i32) (result i32) (i32.rotl (get_local $x) (get_local $y))) + (func (export "rotr") (param $x i32) (param $y i32) (result i32) (i32.rotr (get_local $x) (get_local $y))) + (func (export "clz") (param $x i32) (result i32) (i32.clz (get_local $x))) + (func (export "ctz") (param $x i32) (result i32) (i32.ctz (get_local $x))) + (func (export "popcnt") (param $x i32) (result i32) (i32.popcnt (get_local $x))) + (func (export "eqz") (param $x i32) (result i32) (i32.eqz (get_local $x))) + (func (export "eq") (param $x i32) (param $y i32) (result i32) (i32.eq (get_local $x) (get_local $y))) + (func (export "ne") (param $x i32) (param $y i32) (result i32) (i32.ne (get_local $x) (get_local $y))) + (func (export "lt_s") (param $x i32) (param $y i32) (result i32) (i32.lt_s (get_local $x) (get_local $y))) + (func (export "lt_u") (param $x i32) (param $y i32) (result i32) (i32.lt_u (get_local $x) (get_local $y))) + (func (export "le_s") (param $x i32) (param $y i32) (result i32) (i32.le_s (get_local $x) (get_local $y))) + (func (export "le_u") (param $x i32) (param $y i32) (result i32) (i32.le_u (get_local $x) (get_local $y))) + (func (export "gt_s") (param $x i32) (param $y i32) (result i32) (i32.gt_s (get_local $x) (get_local $y))) + (func (export "gt_u") (param $x i32) (param $y i32) (result i32) (i32.gt_u (get_local $x) (get_local $y))) + (func (export "ge_s") (param $x i32) (param $y i32) (result i32) (i32.ge_s (get_local $x) (get_local $y))) + (func (export "ge_u") (param $x i32) (param $y i32) (result i32) (i32.ge_u (get_local $x) (get_local $y))) +) + +(assert_return (invoke "add" (i32.const 1) (i32.const 1)) (i32.const 2)) +(assert_return (invoke "add" (i32.const 1) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "add" (i32.const -1) (i32.const -1)) (i32.const -2)) +(assert_return (invoke "add" (i32.const -1) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "add" (i32.const 0x7fffffff) (i32.const 1)) (i32.const 0x80000000)) +(assert_return (invoke "add" (i32.const 0x80000000) (i32.const -1)) (i32.const 0x7fffffff)) +(assert_return (invoke "add" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "add" (i32.const 0x3fffffff) (i32.const 1)) (i32.const 0x40000000)) + +(assert_return (invoke "sub" (i32.const 1) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "sub" (i32.const 1) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "sub" (i32.const -1) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "sub" (i32.const 0x7fffffff) (i32.const -1)) (i32.const 0x80000000)) +(assert_return (invoke "sub" (i32.const 0x80000000) (i32.const 1)) (i32.const 0x7fffffff)) +(assert_return (invoke "sub" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "sub" (i32.const 0x3fffffff) (i32.const -1)) (i32.const 0x40000000)) + +(assert_return (invoke "mul" (i32.const 1) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "mul" (i32.const 1) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "mul" (i32.const -1) (i32.const -1)) (i32.const 1)) +(assert_return (invoke "mul" (i32.const 0x10000000) (i32.const 4096)) (i32.const 0)) +(assert_return (invoke "mul" (i32.const 0x80000000) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "mul" (i32.const 0x80000000) (i32.const -1)) (i32.const 0x80000000)) +(assert_return (invoke "mul" (i32.const 0x7fffffff) (i32.const -1)) (i32.const 0x80000001)) +(assert_return (invoke "mul" (i32.const 0x01234567) (i32.const 0x76543210)) (i32.const 0x358e7470)) + +(assert_trap (invoke "div_s" (i32.const 1) (i32.const 0)) "integer divide by zero") +(assert_trap (invoke "div_s" (i32.const 0) (i32.const 0)) "integer divide by zero") +(assert_trap (invoke "div_s" (i32.const 0x80000000) (i32.const -1)) "integer overflow") +(assert_return (invoke "div_s" (i32.const 1) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "div_s" (i32.const 0) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "div_s" (i32.const -1) (i32.const -1)) (i32.const 1)) +(assert_return (invoke "div_s" (i32.const 0x80000000) (i32.const 2)) (i32.const 0xc0000000)) +(assert_return (invoke "div_s" (i32.const 0x80000001) (i32.const 1000)) (i32.const 0xffdf3b65)) +(assert_return (invoke "div_s" (i32.const 5) (i32.const 2)) (i32.const 2)) +(assert_return (invoke "div_s" (i32.const -5) (i32.const 2)) (i32.const -2)) +(assert_return (invoke "div_s" (i32.const 5) (i32.const -2)) (i32.const -2)) +(assert_return (invoke "div_s" (i32.const -5) (i32.const -2)) (i32.const 2)) +(assert_return (invoke "div_s" (i32.const 7) (i32.const 3)) (i32.const 2)) +(assert_return (invoke "div_s" (i32.const -7) (i32.const 3)) (i32.const -2)) +(assert_return (invoke "div_s" (i32.const 7) (i32.const -3)) (i32.const -2)) +(assert_return (invoke "div_s" (i32.const -7) (i32.const -3)) (i32.const 2)) +(assert_return (invoke "div_s" (i32.const 11) (i32.const 5)) (i32.const 2)) +(assert_return (invoke "div_s" (i32.const 17) (i32.const 7)) (i32.const 2)) + +(assert_trap (invoke "div_u" (i32.const 1) (i32.const 0)) "integer divide by zero") +(assert_trap (invoke "div_u" (i32.const 0) (i32.const 0)) "integer divide by zero") +(assert_return (invoke "div_u" (i32.const 1) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "div_u" (i32.const 0) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "div_u" (i32.const -1) (i32.const -1)) (i32.const 1)) +(assert_return (invoke "div_u" (i32.const 0x80000000) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "div_u" (i32.const 0x80000000) (i32.const 2)) (i32.const 0x40000000)) +(assert_return (invoke "div_u" (i32.const 0x8ff00ff0) (i32.const 0x10001)) (i32.const 0x8fef)) +(assert_return (invoke "div_u" (i32.const 0x80000001) (i32.const 1000)) (i32.const 0x20c49b)) +(assert_return (invoke "div_u" (i32.const 5) (i32.const 2)) (i32.const 2)) +(assert_return (invoke "div_u" (i32.const -5) (i32.const 2)) (i32.const 0x7ffffffd)) +(assert_return (invoke "div_u" (i32.const 5) (i32.const -2)) (i32.const 0)) +(assert_return (invoke "div_u" (i32.const -5) (i32.const -2)) (i32.const 0)) +(assert_return (invoke "div_u" (i32.const 7) (i32.const 3)) (i32.const 2)) +(assert_return (invoke "div_u" (i32.const 11) (i32.const 5)) (i32.const 2)) +(assert_return (invoke "div_u" (i32.const 17) (i32.const 7)) (i32.const 2)) + +(assert_trap (invoke "rem_s" (i32.const 1) (i32.const 0)) "integer divide by zero") +(assert_trap (invoke "rem_s" (i32.const 0) (i32.const 0)) "integer divide by zero") +(assert_return (invoke "rem_s" (i32.const 0x7fffffff) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "rem_s" (i32.const 1) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "rem_s" (i32.const 0) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "rem_s" (i32.const -1) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "rem_s" (i32.const 0x80000000) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "rem_s" (i32.const 0x80000000) (i32.const 2)) (i32.const 0)) +(assert_return (invoke "rem_s" (i32.const 0x80000001) (i32.const 1000)) (i32.const -647)) +(assert_return (invoke "rem_s" (i32.const 5) (i32.const 2)) (i32.const 1)) +(assert_return (invoke "rem_s" (i32.const -5) (i32.const 2)) (i32.const -1)) +(assert_return (invoke "rem_s" (i32.const 5) (i32.const -2)) (i32.const 1)) +(assert_return (invoke "rem_s" (i32.const -5) (i32.const -2)) (i32.const -1)) +(assert_return (invoke "rem_s" (i32.const 7) (i32.const 3)) (i32.const 1)) +(assert_return (invoke "rem_s" (i32.const -7) (i32.const 3)) (i32.const -1)) +(assert_return (invoke "rem_s" (i32.const 7) (i32.const -3)) (i32.const 1)) +(assert_return (invoke "rem_s" (i32.const -7) (i32.const -3)) (i32.const -1)) +(assert_return (invoke "rem_s" (i32.const 11) (i32.const 5)) (i32.const 1)) +(assert_return (invoke "rem_s" (i32.const 17) (i32.const 7)) (i32.const 3)) + +(assert_trap (invoke "rem_u" (i32.const 1) (i32.const 0)) "integer divide by zero") +(assert_trap (invoke "rem_u" (i32.const 0) (i32.const 0)) "integer divide by zero") +(assert_return (invoke "rem_u" (i32.const 1) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "rem_u" (i32.const 0) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "rem_u" (i32.const -1) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "rem_u" (i32.const 0x80000000) (i32.const -1)) (i32.const 0x80000000)) +(assert_return (invoke "rem_u" (i32.const 0x80000000) (i32.const 2)) (i32.const 0)) +(assert_return (invoke "rem_u" (i32.const 0x8ff00ff0) (i32.const 0x10001)) (i32.const 0x8001)) +(assert_return (invoke "rem_u" (i32.const 0x80000001) (i32.const 1000)) (i32.const 649)) +(assert_return (invoke "rem_u" (i32.const 5) (i32.const 2)) (i32.const 1)) +(assert_return (invoke "rem_u" (i32.const -5) (i32.const 2)) (i32.const 1)) +(assert_return (invoke "rem_u" (i32.const 5) (i32.const -2)) (i32.const 5)) +(assert_return (invoke "rem_u" (i32.const -5) (i32.const -2)) (i32.const -5)) +(assert_return (invoke "rem_u" (i32.const 7) (i32.const 3)) (i32.const 1)) +(assert_return (invoke "rem_u" (i32.const 11) (i32.const 5)) (i32.const 1)) +(assert_return (invoke "rem_u" (i32.const 17) (i32.const 7)) (i32.const 3)) + +(assert_return (invoke "and" (i32.const 1) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "and" (i32.const 0) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "and" (i32.const 1) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "and" (i32.const 0) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "and" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "and" (i32.const 0x7fffffff) (i32.const -1)) (i32.const 0x7fffffff)) +(assert_return (invoke "and" (i32.const 0xf0f0ffff) (i32.const 0xfffff0f0)) (i32.const 0xf0f0f0f0)) +(assert_return (invoke "and" (i32.const 0xffffffff) (i32.const 0xffffffff)) (i32.const 0xffffffff)) + +(assert_return (invoke "or" (i32.const 1) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "or" (i32.const 0) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "or" (i32.const 1) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "or" (i32.const 0) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "or" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const -1)) +(assert_return (invoke "or" (i32.const 0x80000000) (i32.const 0)) (i32.const 0x80000000)) +(assert_return (invoke "or" (i32.const 0xf0f0ffff) (i32.const 0xfffff0f0)) (i32.const 0xffffffff)) +(assert_return (invoke "or" (i32.const 0xffffffff) (i32.const 0xffffffff)) (i32.const 0xffffffff)) + +(assert_return (invoke "xor" (i32.const 1) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "xor" (i32.const 0) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "xor" (i32.const 1) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "xor" (i32.const 0) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "xor" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const -1)) +(assert_return (invoke "xor" (i32.const 0x80000000) (i32.const 0)) (i32.const 0x80000000)) +(assert_return (invoke "xor" (i32.const -1) (i32.const 0x80000000)) (i32.const 0x7fffffff)) +(assert_return (invoke "xor" (i32.const -1) (i32.const 0x7fffffff)) (i32.const 0x80000000)) +(assert_return (invoke "xor" (i32.const 0xf0f0ffff) (i32.const 0xfffff0f0)) (i32.const 0x0f0f0f0f)) +(assert_return (invoke "xor" (i32.const 0xffffffff) (i32.const 0xffffffff)) (i32.const 0)) + +(assert_return (invoke "shl" (i32.const 1) (i32.const 1)) (i32.const 2)) +(assert_return (invoke "shl" (i32.const 1) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "shl" (i32.const 0x7fffffff) (i32.const 1)) (i32.const 0xfffffffe)) +(assert_return (invoke "shl" (i32.const 0xffffffff) (i32.const 1)) (i32.const 0xfffffffe)) +(assert_return (invoke "shl" (i32.const 0x80000000) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "shl" (i32.const 0x40000000) (i32.const 1)) (i32.const 0x80000000)) +(assert_return (invoke "shl" (i32.const 1) (i32.const 31)) (i32.const 0x80000000)) +(assert_return (invoke "shl" (i32.const 1) (i32.const 32)) (i32.const 1)) +(assert_return (invoke "shl" (i32.const 1) (i32.const 33)) (i32.const 2)) +(assert_return (invoke "shl" (i32.const 1) (i32.const -1)) (i32.const 0x80000000)) +(assert_return (invoke "shl" (i32.const 1) (i32.const 0x7fffffff)) (i32.const 0x80000000)) + +(assert_return (invoke "shr_s" (i32.const 1) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "shr_s" (i32.const 1) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "shr_s" (i32.const -1) (i32.const 1)) (i32.const -1)) +(assert_return (invoke "shr_s" (i32.const 0x7fffffff) (i32.const 1)) (i32.const 0x3fffffff)) +(assert_return (invoke "shr_s" (i32.const 0x80000000) (i32.const 1)) (i32.const 0xc0000000)) +(assert_return (invoke "shr_s" (i32.const 0x40000000) (i32.const 1)) (i32.const 0x20000000)) +(assert_return (invoke "shr_s" (i32.const 1) (i32.const 32)) (i32.const 1)) +(assert_return (invoke "shr_s" (i32.const 1) (i32.const 33)) (i32.const 0)) +(assert_return (invoke "shr_s" (i32.const 1) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "shr_s" (i32.const 1) (i32.const 0x7fffffff)) (i32.const 0)) +(assert_return (invoke "shr_s" (i32.const 1) (i32.const 0x80000000)) (i32.const 1)) +(assert_return (invoke "shr_s" (i32.const 0x80000000) (i32.const 31)) (i32.const -1)) +(assert_return (invoke "shr_s" (i32.const -1) (i32.const 32)) (i32.const -1)) +(assert_return (invoke "shr_s" (i32.const -1) (i32.const 33)) (i32.const -1)) +(assert_return (invoke "shr_s" (i32.const -1) (i32.const -1)) (i32.const -1)) +(assert_return (invoke "shr_s" (i32.const -1) (i32.const 0x7fffffff)) (i32.const -1)) +(assert_return (invoke "shr_s" (i32.const -1) (i32.const 0x80000000)) (i32.const -1)) + +(assert_return (invoke "shr_u" (i32.const 1) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "shr_u" (i32.const 1) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "shr_u" (i32.const -1) (i32.const 1)) (i32.const 0x7fffffff)) +(assert_return (invoke "shr_u" (i32.const 0x7fffffff) (i32.const 1)) (i32.const 0x3fffffff)) +(assert_return (invoke "shr_u" (i32.const 0x80000000) (i32.const 1)) (i32.const 0x40000000)) +(assert_return (invoke "shr_u" (i32.const 0x40000000) (i32.const 1)) (i32.const 0x20000000)) +(assert_return (invoke "shr_u" (i32.const 1) (i32.const 32)) (i32.const 1)) +(assert_return (invoke "shr_u" (i32.const 1) (i32.const 33)) (i32.const 0)) +(assert_return (invoke "shr_u" (i32.const 1) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "shr_u" (i32.const 1) (i32.const 0x7fffffff)) (i32.const 0)) +(assert_return (invoke "shr_u" (i32.const 1) (i32.const 0x80000000)) (i32.const 1)) +(assert_return (invoke "shr_u" (i32.const 0x80000000) (i32.const 31)) (i32.const 1)) +(assert_return (invoke "shr_u" (i32.const -1) (i32.const 32)) (i32.const -1)) +(assert_return (invoke "shr_u" (i32.const -1) (i32.const 33)) (i32.const 0x7fffffff)) +(assert_return (invoke "shr_u" (i32.const -1) (i32.const -1)) (i32.const 1)) +(assert_return (invoke "shr_u" (i32.const -1) (i32.const 0x7fffffff)) (i32.const 1)) +(assert_return (invoke "shr_u" (i32.const -1) (i32.const 0x80000000)) (i32.const -1)) + +(assert_return (invoke "rotl" (i32.const 0xfe00dc00) (i32.const 4)) (i32.const 0xe00dc00f)) +(assert_return (invoke "rotl" (i32.const 0xabcd9876) (i32.const 1)) (i32.const 0x579b30ed)) +(assert_return (invoke "rotl" (i32.const 0x00008000) (i32.const 37)) (i32.const 0x00100000)) +(assert_return (invoke "rotl" (i32.const 0x769abcdf) (i32.const 0x8000000d)) (i32.const 0x579beed3)) +(assert_return (invoke "rotl" (i32.const 1) (i32.const 31)) (i32.const 0x80000000)) +(assert_return (invoke "rotl" (i32.const 0x80000000) (i32.const 1)) (i32.const 1)) + +(assert_return (invoke "rotr" (i32.const 0xb0c1d2e3) (i32.const 0x0005)) (i32.const 0x1d860e97)) +(assert_return (invoke "rotr" (i32.const 0xb0c1d2e3) (i32.const 0xff05)) (i32.const 0x1d860e97)) +(assert_return (invoke "rotr" (i32.const 0xff00cc00) (i32.const 1)) (i32.const 0x7f806600)) +(assert_return (invoke "rotr" (i32.const 0x00080000) (i32.const 4)) (i32.const 0x00008000)) +(assert_return (invoke "rotr" (i32.const 0x769abcdf) (i32.const 0xffffffed)) (i32.const 0xe6fbb4d5)) +(assert_return (invoke "rotr" (i32.const 1) (i32.const 1)) (i32.const 0x80000000)) +(assert_return (invoke "rotr" (i32.const 0x80000000) (i32.const 31)) (i32.const 1)) + +(assert_return (invoke "clz" (i32.const 0xffffffff)) (i32.const 0)) +(assert_return (invoke "clz" (i32.const 0)) (i32.const 32)) +(assert_return (invoke "clz" (i32.const 0x00008000)) (i32.const 16)) +(assert_return (invoke "clz" (i32.const 0xff)) (i32.const 24)) +(assert_return (invoke "clz" (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "clz" (i32.const 1)) (i32.const 31)) +(assert_return (invoke "clz" (i32.const 2)) (i32.const 30)) +(assert_return (invoke "clz" (i32.const 0x7fffffff)) (i32.const 1)) + +(assert_return (invoke "ctz" (i32.const -1)) (i32.const 0)) +(assert_return (invoke "ctz" (i32.const 0)) (i32.const 32)) +(assert_return (invoke "ctz" (i32.const 0x00008000)) (i32.const 15)) +(assert_return (invoke "ctz" (i32.const 0x00010000)) (i32.const 16)) +(assert_return (invoke "ctz" (i32.const 0x80000000)) (i32.const 31)) +(assert_return (invoke "ctz" (i32.const 0x7fffffff)) (i32.const 0)) + +(assert_return (invoke "popcnt" (i32.const -1)) (i32.const 32)) +(assert_return (invoke "popcnt" (i32.const 0)) (i32.const 0)) +(assert_return (invoke "popcnt" (i32.const 0x00008000)) (i32.const 1)) +(assert_return (invoke "popcnt" (i32.const 0x80008000)) (i32.const 2)) +(assert_return (invoke "popcnt" (i32.const 0x7fffffff)) (i32.const 31)) +(assert_return (invoke "popcnt" (i32.const 0xAAAAAAAA)) (i32.const 16)) +(assert_return (invoke "popcnt" (i32.const 0x55555555)) (i32.const 16)) +(assert_return (invoke "popcnt" (i32.const 0xDEADBEEF)) (i32.const 24)) + +(assert_return (invoke "eqz" (i32.const 0)) (i32.const 1)) +(assert_return (invoke "eqz" (i32.const 1)) (i32.const 0)) +(assert_return (invoke "eqz" (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "eqz" (i32.const 0x7fffffff)) (i32.const 0)) + +(assert_return (invoke "eq" (i32.const 0) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "eq" (i32.const 1) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "eq" (i32.const -1) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "eq" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 1)) +(assert_return (invoke "eq" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 1)) +(assert_return (invoke "eq" (i32.const -1) (i32.const -1)) (i32.const 1)) +(assert_return (invoke "eq" (i32.const 1) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "eq" (i32.const 0) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "eq" (i32.const 0x80000000) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "eq" (i32.const 0) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "eq" (i32.const 0x80000000) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "eq" (i32.const -1) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "eq" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 0)) +(assert_return (invoke "eq" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 0)) + +(assert_return (invoke "ne" (i32.const 0) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "ne" (i32.const 1) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "ne" (i32.const -1) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "ne" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "ne" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 0)) +(assert_return (invoke "ne" (i32.const -1) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "ne" (i32.const 1) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "ne" (i32.const 0) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "ne" (i32.const 0x80000000) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "ne" (i32.const 0) (i32.const 0x80000000)) (i32.const 1)) +(assert_return (invoke "ne" (i32.const 0x80000000) (i32.const -1)) (i32.const 1)) +(assert_return (invoke "ne" (i32.const -1) (i32.const 0x80000000)) (i32.const 1)) +(assert_return (invoke "ne" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 1)) +(assert_return (invoke "ne" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 1)) + +(assert_return (invoke "lt_s" (i32.const 0) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "lt_s" (i32.const 1) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "lt_s" (i32.const -1) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "lt_s" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "lt_s" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 0)) +(assert_return (invoke "lt_s" (i32.const -1) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "lt_s" (i32.const 1) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "lt_s" (i32.const 0) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "lt_s" (i32.const 0x80000000) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "lt_s" (i32.const 0) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "lt_s" (i32.const 0x80000000) (i32.const -1)) (i32.const 1)) +(assert_return (invoke "lt_s" (i32.const -1) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "lt_s" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 1)) +(assert_return (invoke "lt_s" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 0)) + +(assert_return (invoke "lt_u" (i32.const 0) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "lt_u" (i32.const 1) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "lt_u" (i32.const -1) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "lt_u" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "lt_u" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 0)) +(assert_return (invoke "lt_u" (i32.const -1) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "lt_u" (i32.const 1) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "lt_u" (i32.const 0) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "lt_u" (i32.const 0x80000000) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "lt_u" (i32.const 0) (i32.const 0x80000000)) (i32.const 1)) +(assert_return (invoke "lt_u" (i32.const 0x80000000) (i32.const -1)) (i32.const 1)) +(assert_return (invoke "lt_u" (i32.const -1) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "lt_u" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 0)) +(assert_return (invoke "lt_u" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 1)) + +(assert_return (invoke "le_s" (i32.const 0) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "le_s" (i32.const 1) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "le_s" (i32.const -1) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "le_s" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 1)) +(assert_return (invoke "le_s" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 1)) +(assert_return (invoke "le_s" (i32.const -1) (i32.const -1)) (i32.const 1)) +(assert_return (invoke "le_s" (i32.const 1) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "le_s" (i32.const 0) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "le_s" (i32.const 0x80000000) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "le_s" (i32.const 0) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "le_s" (i32.const 0x80000000) (i32.const -1)) (i32.const 1)) +(assert_return (invoke "le_s" (i32.const -1) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "le_s" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 1)) +(assert_return (invoke "le_s" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 0)) + +(assert_return (invoke "le_u" (i32.const 0) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "le_u" (i32.const 1) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "le_u" (i32.const -1) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "le_u" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 1)) +(assert_return (invoke "le_u" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 1)) +(assert_return (invoke "le_u" (i32.const -1) (i32.const -1)) (i32.const 1)) +(assert_return (invoke "le_u" (i32.const 1) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "le_u" (i32.const 0) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "le_u" (i32.const 0x80000000) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "le_u" (i32.const 0) (i32.const 0x80000000)) (i32.const 1)) +(assert_return (invoke "le_u" (i32.const 0x80000000) (i32.const -1)) (i32.const 1)) +(assert_return (invoke "le_u" (i32.const -1) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "le_u" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 0)) +(assert_return (invoke "le_u" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 1)) + +(assert_return (invoke "gt_s" (i32.const 0) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "gt_s" (i32.const 1) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "gt_s" (i32.const -1) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "gt_s" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "gt_s" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 0)) +(assert_return (invoke "gt_s" (i32.const -1) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "gt_s" (i32.const 1) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "gt_s" (i32.const 0) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "gt_s" (i32.const 0x80000000) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "gt_s" (i32.const 0) (i32.const 0x80000000)) (i32.const 1)) +(assert_return (invoke "gt_s" (i32.const 0x80000000) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "gt_s" (i32.const -1) (i32.const 0x80000000)) (i32.const 1)) +(assert_return (invoke "gt_s" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 0)) +(assert_return (invoke "gt_s" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 1)) + +(assert_return (invoke "gt_u" (i32.const 0) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "gt_u" (i32.const 1) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "gt_u" (i32.const -1) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "gt_u" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "gt_u" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 0)) +(assert_return (invoke "gt_u" (i32.const -1) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "gt_u" (i32.const 1) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "gt_u" (i32.const 0) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "gt_u" (i32.const 0x80000000) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "gt_u" (i32.const 0) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "gt_u" (i32.const 0x80000000) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "gt_u" (i32.const -1) (i32.const 0x80000000)) (i32.const 1)) +(assert_return (invoke "gt_u" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 1)) +(assert_return (invoke "gt_u" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 0)) + +(assert_return (invoke "ge_s" (i32.const 0) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "ge_s" (i32.const 1) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "ge_s" (i32.const -1) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "ge_s" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 1)) +(assert_return (invoke "ge_s" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 1)) +(assert_return (invoke "ge_s" (i32.const -1) (i32.const -1)) (i32.const 1)) +(assert_return (invoke "ge_s" (i32.const 1) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "ge_s" (i32.const 0) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "ge_s" (i32.const 0x80000000) (i32.const 0)) (i32.const 0)) +(assert_return (invoke "ge_s" (i32.const 0) (i32.const 0x80000000)) (i32.const 1)) +(assert_return (invoke "ge_s" (i32.const 0x80000000) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "ge_s" (i32.const -1) (i32.const 0x80000000)) (i32.const 1)) +(assert_return (invoke "ge_s" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 0)) +(assert_return (invoke "ge_s" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 1)) + +(assert_return (invoke "ge_u" (i32.const 0) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "ge_u" (i32.const 1) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "ge_u" (i32.const -1) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "ge_u" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 1)) +(assert_return (invoke "ge_u" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 1)) +(assert_return (invoke "ge_u" (i32.const -1) (i32.const -1)) (i32.const 1)) +(assert_return (invoke "ge_u" (i32.const 1) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "ge_u" (i32.const 0) (i32.const 1)) (i32.const 0)) +(assert_return (invoke "ge_u" (i32.const 0x80000000) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "ge_u" (i32.const 0) (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "ge_u" (i32.const 0x80000000) (i32.const -1)) (i32.const 0)) +(assert_return (invoke "ge_u" (i32.const -1) (i32.const 0x80000000)) (i32.const 1)) +(assert_return (invoke "ge_u" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 1)) +(assert_return (invoke "ge_u" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 0)) diff --git a/js/src/jit-test/tests/wasm/spec/i32.wast.js b/js/src/jit-test/tests/wasm/spec/i32.wast.js new file mode 100644 index 000000000..af28f2c99 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/i32.wast.js @@ -0,0 +1 @@ +var importedArgs = ['i32.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/i64.wast b/js/src/jit-test/tests/wasm/spec/i64.wast new file mode 100644 index 000000000..54b28c460 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/i64.wast @@ -0,0 +1,406 @@ +;; i64 operations + +(module + (func (export "add") (param $x i64) (param $y i64) (result i64) (i64.add (get_local $x) (get_local $y))) + (func (export "sub") (param $x i64) (param $y i64) (result i64) (i64.sub (get_local $x) (get_local $y))) + (func (export "mul") (param $x i64) (param $y i64) (result i64) (i64.mul (get_local $x) (get_local $y))) + (func (export "div_s") (param $x i64) (param $y i64) (result i64) (i64.div_s (get_local $x) (get_local $y))) + (func (export "div_u") (param $x i64) (param $y i64) (result i64) (i64.div_u (get_local $x) (get_local $y))) + (func (export "rem_s") (param $x i64) (param $y i64) (result i64) (i64.rem_s (get_local $x) (get_local $y))) + (func (export "rem_u") (param $x i64) (param $y i64) (result i64) (i64.rem_u (get_local $x) (get_local $y))) + (func (export "and") (param $x i64) (param $y i64) (result i64) (i64.and (get_local $x) (get_local $y))) + (func (export "or") (param $x i64) (param $y i64) (result i64) (i64.or (get_local $x) (get_local $y))) + (func (export "xor") (param $x i64) (param $y i64) (result i64) (i64.xor (get_local $x) (get_local $y))) + (func (export "shl") (param $x i64) (param $y i64) (result i64) (i64.shl (get_local $x) (get_local $y))) + (func (export "shr_s") (param $x i64) (param $y i64) (result i64) (i64.shr_s (get_local $x) (get_local $y))) + (func (export "shr_u") (param $x i64) (param $y i64) (result i64) (i64.shr_u (get_local $x) (get_local $y))) + (func (export "rotl") (param $x i64) (param $y i64) (result i64) (i64.rotl (get_local $x) (get_local $y))) + (func (export "rotr") (param $x i64) (param $y i64) (result i64) (i64.rotr (get_local $x) (get_local $y))) + (func (export "clz") (param $x i64) (result i64) (i64.clz (get_local $x))) + (func (export "ctz") (param $x i64) (result i64) (i64.ctz (get_local $x))) + (func (export "popcnt") (param $x i64) (result i64) (i64.popcnt (get_local $x))) + (func (export "eqz") (param $x i64) (result i32) (i64.eqz (get_local $x))) + (func (export "eq") (param $x i64) (param $y i64) (result i32) (i64.eq (get_local $x) (get_local $y))) + (func (export "ne") (param $x i64) (param $y i64) (result i32) (i64.ne (get_local $x) (get_local $y))) + (func (export "lt_s") (param $x i64) (param $y i64) (result i32) (i64.lt_s (get_local $x) (get_local $y))) + (func (export "lt_u") (param $x i64) (param $y i64) (result i32) (i64.lt_u (get_local $x) (get_local $y))) + (func (export "le_s") (param $x i64) (param $y i64) (result i32) (i64.le_s (get_local $x) (get_local $y))) + (func (export "le_u") (param $x i64) (param $y i64) (result i32) (i64.le_u (get_local $x) (get_local $y))) + (func (export "gt_s") (param $x i64) (param $y i64) (result i32) (i64.gt_s (get_local $x) (get_local $y))) + (func (export "gt_u") (param $x i64) (param $y i64) (result i32) (i64.gt_u (get_local $x) (get_local $y))) + (func (export "ge_s") (param $x i64) (param $y i64) (result i32) (i64.ge_s (get_local $x) (get_local $y))) + (func (export "ge_u") (param $x i64) (param $y i64) (result i32) (i64.ge_u (get_local $x) (get_local $y))) +) + +(assert_return (invoke "add" (i64.const 1) (i64.const 1)) (i64.const 2)) +(assert_return (invoke "add" (i64.const 1) (i64.const 0)) (i64.const 1)) +(assert_return (invoke "add" (i64.const -1) (i64.const -1)) (i64.const -2)) +(assert_return (invoke "add" (i64.const -1) (i64.const 1)) (i64.const 0)) +(assert_return (invoke "add" (i64.const 0x7fffffffffffffff) (i64.const 1)) (i64.const 0x8000000000000000)) +(assert_return (invoke "add" (i64.const 0x8000000000000000) (i64.const -1)) (i64.const 0x7fffffffffffffff)) +(assert_return (invoke "add" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i64.const 0)) +(assert_return (invoke "add" (i64.const 0x3fffffff) (i64.const 1)) (i64.const 0x40000000)) + +(assert_return (invoke "sub" (i64.const 1) (i64.const 1)) (i64.const 0)) +(assert_return (invoke "sub" (i64.const 1) (i64.const 0)) (i64.const 1)) +(assert_return (invoke "sub" (i64.const -1) (i64.const -1)) (i64.const 0)) +(assert_return (invoke "sub" (i64.const 0x7fffffffffffffff) (i64.const -1)) (i64.const 0x8000000000000000)) +(assert_return (invoke "sub" (i64.const 0x8000000000000000) (i64.const 1)) (i64.const 0x7fffffffffffffff)) +(assert_return (invoke "sub" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i64.const 0)) +(assert_return (invoke "sub" (i64.const 0x3fffffff) (i64.const -1)) (i64.const 0x40000000)) + +(assert_return (invoke "mul" (i64.const 1) (i64.const 1)) (i64.const 1)) +(assert_return (invoke "mul" (i64.const 1) (i64.const 0)) (i64.const 0)) +(assert_return (invoke "mul" (i64.const -1) (i64.const -1)) (i64.const 1)) +(assert_return (invoke "mul" (i64.const 0x1000000000000000) (i64.const 4096)) (i64.const 0)) +(assert_return (invoke "mul" (i64.const 0x8000000000000000) (i64.const 0)) (i64.const 0)) +(assert_return (invoke "mul" (i64.const 0x8000000000000000) (i64.const -1)) (i64.const 0x8000000000000000)) +(assert_return (invoke "mul" (i64.const 0x7fffffffffffffff) (i64.const -1)) (i64.const 0x8000000000000001)) +(assert_return (invoke "mul" (i64.const 0x0123456789abcdef) (i64.const 0xfedcba9876543210)) (i64.const 0x2236d88fe5618cf0)) + +(assert_trap (invoke "div_s" (i64.const 1) (i64.const 0)) "integer divide by zero") +(assert_trap (invoke "div_s" (i64.const 0) (i64.const 0)) "integer divide by zero") +(assert_trap (invoke "div_s" (i64.const 0x8000000000000000) (i64.const -1)) "integer overflow") +(assert_return (invoke "div_s" (i64.const 1) (i64.const 1)) (i64.const 1)) +(assert_return (invoke "div_s" (i64.const 0) (i64.const 1)) (i64.const 0)) +(assert_return (invoke "div_s" (i64.const -1) (i64.const -1)) (i64.const 1)) +(assert_return (invoke "div_s" (i64.const 0x8000000000000000) (i64.const 2)) (i64.const 0xc000000000000000)) +(assert_return (invoke "div_s" (i64.const 0x8000000000000001) (i64.const 1000)) (i64.const 0xffdf3b645a1cac09)) +(assert_return (invoke "div_s" (i64.const 5) (i64.const 2)) (i64.const 2)) +(assert_return (invoke "div_s" (i64.const -5) (i64.const 2)) (i64.const -2)) +(assert_return (invoke "div_s" (i64.const 5) (i64.const -2)) (i64.const -2)) +(assert_return (invoke "div_s" (i64.const -5) (i64.const -2)) (i64.const 2)) +(assert_return (invoke "div_s" (i64.const 7) (i64.const 3)) (i64.const 2)) +(assert_return (invoke "div_s" (i64.const -7) (i64.const 3)) (i64.const -2)) +(assert_return (invoke "div_s" (i64.const 7) (i64.const -3)) (i64.const -2)) +(assert_return (invoke "div_s" (i64.const -7) (i64.const -3)) (i64.const 2)) +(assert_return (invoke "div_s" (i64.const 11) (i64.const 5)) (i64.const 2)) +(assert_return (invoke "div_s" (i64.const 17) (i64.const 7)) (i64.const 2)) + +(assert_trap (invoke "div_u" (i64.const 1) (i64.const 0)) "integer divide by zero") +(assert_trap (invoke "div_u" (i64.const 0) (i64.const 0)) "integer divide by zero") +(assert_return (invoke "div_u" (i64.const 1) (i64.const 1)) (i64.const 1)) +(assert_return (invoke "div_u" (i64.const 0) (i64.const 1)) (i64.const 0)) +(assert_return (invoke "div_u" (i64.const -1) (i64.const -1)) (i64.const 1)) +(assert_return (invoke "div_u" (i64.const 0x8000000000000000) (i64.const -1)) (i64.const 0)) +(assert_return (invoke "div_u" (i64.const 0x8000000000000000) (i64.const 2)) (i64.const 0x4000000000000000)) +(assert_return (invoke "div_u" (i64.const 0x8ff00ff00ff00ff0) (i64.const 0x100000001)) (i64.const 0x8ff00fef)) +(assert_return (invoke "div_u" (i64.const 0x8000000000000001) (i64.const 1000)) (i64.const 0x20c49ba5e353f7)) +(assert_return (invoke "div_u" (i64.const 5) (i64.const 2)) (i64.const 2)) +(assert_return (invoke "div_u" (i64.const -5) (i64.const 2)) (i64.const 0x7ffffffffffffffd)) +(assert_return (invoke "div_u" (i64.const 5) (i64.const -2)) (i64.const 0)) +(assert_return (invoke "div_u" (i64.const -5) (i64.const -2)) (i64.const 0)) +(assert_return (invoke "div_u" (i64.const 7) (i64.const 3)) (i64.const 2)) +(assert_return (invoke "div_u" (i64.const 11) (i64.const 5)) (i64.const 2)) +(assert_return (invoke "div_u" (i64.const 17) (i64.const 7)) (i64.const 2)) + +(assert_trap (invoke "rem_s" (i64.const 1) (i64.const 0)) "integer divide by zero") +(assert_trap (invoke "rem_s" (i64.const 0) (i64.const 0)) "integer divide by zero") +(assert_return (invoke "rem_s" (i64.const 0x7fffffffffffffff) (i64.const -1)) (i64.const 0)) +(assert_return (invoke "rem_s" (i64.const 1) (i64.const 1)) (i64.const 0)) +(assert_return (invoke "rem_s" (i64.const 0) (i64.const 1)) (i64.const 0)) +(assert_return (invoke "rem_s" (i64.const -1) (i64.const -1)) (i64.const 0)) +(assert_return (invoke "rem_s" (i64.const 0x8000000000000000) (i64.const -1)) (i64.const 0)) +(assert_return (invoke "rem_s" (i64.const 0x8000000000000000) (i64.const 2)) (i64.const 0)) +(assert_return (invoke "rem_s" (i64.const 0x8000000000000001) (i64.const 1000)) (i64.const -807)) +(assert_return (invoke "rem_s" (i64.const 5) (i64.const 2)) (i64.const 1)) +(assert_return (invoke "rem_s" (i64.const -5) (i64.const 2)) (i64.const -1)) +(assert_return (invoke "rem_s" (i64.const 5) (i64.const -2)) (i64.const 1)) +(assert_return (invoke "rem_s" (i64.const -5) (i64.const -2)) (i64.const -1)) +(assert_return (invoke "rem_s" (i64.const 7) (i64.const 3)) (i64.const 1)) +(assert_return (invoke "rem_s" (i64.const -7) (i64.const 3)) (i64.const -1)) +(assert_return (invoke "rem_s" (i64.const 7) (i64.const -3)) (i64.const 1)) +(assert_return (invoke "rem_s" (i64.const -7) (i64.const -3)) (i64.const -1)) +(assert_return (invoke "rem_s" (i64.const 11) (i64.const 5)) (i64.const 1)) +(assert_return (invoke "rem_s" (i64.const 17) (i64.const 7)) (i64.const 3)) + +(assert_trap (invoke "rem_u" (i64.const 1) (i64.const 0)) "integer divide by zero") +(assert_trap (invoke "rem_u" (i64.const 0) (i64.const 0)) "integer divide by zero") +(assert_return (invoke "rem_u" (i64.const 1) (i64.const 1)) (i64.const 0)) +(assert_return (invoke "rem_u" (i64.const 0) (i64.const 1)) (i64.const 0)) +(assert_return (invoke "rem_u" (i64.const -1) (i64.const -1)) (i64.const 0)) +(assert_return (invoke "rem_u" (i64.const 0x8000000000000000) (i64.const -1)) (i64.const 0x8000000000000000)) +(assert_return (invoke "rem_u" (i64.const 0x8000000000000000) (i64.const 2)) (i64.const 0)) +(assert_return (invoke "rem_u" (i64.const 0x8ff00ff00ff00ff0) (i64.const 0x100000001)) (i64.const 0x80000001)) +(assert_return (invoke "rem_u" (i64.const 0x8000000000000001) (i64.const 1000)) (i64.const 809)) +(assert_return (invoke "rem_u" (i64.const 5) (i64.const 2)) (i64.const 1)) +(assert_return (invoke "rem_u" (i64.const -5) (i64.const 2)) (i64.const 1)) +(assert_return (invoke "rem_u" (i64.const 5) (i64.const -2)) (i64.const 5)) +(assert_return (invoke "rem_u" (i64.const -5) (i64.const -2)) (i64.const -5)) +(assert_return (invoke "rem_u" (i64.const 7) (i64.const 3)) (i64.const 1)) +(assert_return (invoke "rem_u" (i64.const 11) (i64.const 5)) (i64.const 1)) +(assert_return (invoke "rem_u" (i64.const 17) (i64.const 7)) (i64.const 3)) + +(assert_return (invoke "and" (i64.const 1) (i64.const 0)) (i64.const 0)) +(assert_return (invoke "and" (i64.const 0) (i64.const 1)) (i64.const 0)) +(assert_return (invoke "and" (i64.const 1) (i64.const 1)) (i64.const 1)) +(assert_return (invoke "and" (i64.const 0) (i64.const 0)) (i64.const 0)) +(assert_return (invoke "and" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i64.const 0)) +(assert_return (invoke "and" (i64.const 0x7fffffffffffffff) (i64.const -1)) (i64.const 0x7fffffffffffffff)) +(assert_return (invoke "and" (i64.const 0xf0f0ffff) (i64.const 0xfffff0f0)) (i64.const 0xf0f0f0f0)) +(assert_return (invoke "and" (i64.const 0xffffffffffffffff) (i64.const 0xffffffffffffffff)) (i64.const 0xffffffffffffffff)) + +(assert_return (invoke "or" (i64.const 1) (i64.const 0)) (i64.const 1)) +(assert_return (invoke "or" (i64.const 0) (i64.const 1)) (i64.const 1)) +(assert_return (invoke "or" (i64.const 1) (i64.const 1)) (i64.const 1)) +(assert_return (invoke "or" (i64.const 0) (i64.const 0)) (i64.const 0)) +(assert_return (invoke "or" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i64.const -1)) +(assert_return (invoke "or" (i64.const 0x8000000000000000) (i64.const 0)) (i64.const 0x8000000000000000)) +(assert_return (invoke "or" (i64.const 0xf0f0ffff) (i64.const 0xfffff0f0)) (i64.const 0xffffffff)) +(assert_return (invoke "or" (i64.const 0xffffffffffffffff) (i64.const 0xffffffffffffffff)) (i64.const 0xffffffffffffffff)) + +(assert_return (invoke "xor" (i64.const 1) (i64.const 0)) (i64.const 1)) +(assert_return (invoke "xor" (i64.const 0) (i64.const 1)) (i64.const 1)) +(assert_return (invoke "xor" (i64.const 1) (i64.const 1)) (i64.const 0)) +(assert_return (invoke "xor" (i64.const 0) (i64.const 0)) (i64.const 0)) +(assert_return (invoke "xor" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i64.const -1)) +(assert_return (invoke "xor" (i64.const 0x8000000000000000) (i64.const 0)) (i64.const 0x8000000000000000)) +(assert_return (invoke "xor" (i64.const -1) (i64.const 0x8000000000000000)) (i64.const 0x7fffffffffffffff)) +(assert_return (invoke "xor" (i64.const -1) (i64.const 0x7fffffffffffffff)) (i64.const 0x8000000000000000)) +(assert_return (invoke "xor" (i64.const 0xf0f0ffff) (i64.const 0xfffff0f0)) (i64.const 0x0f0f0f0f)) +(assert_return (invoke "xor" (i64.const 0xffffffffffffffff) (i64.const 0xffffffffffffffff)) (i64.const 0)) + +(assert_return (invoke "shl" (i64.const 1) (i64.const 1)) (i64.const 2)) +(assert_return (invoke "shl" (i64.const 1) (i64.const 0)) (i64.const 1)) +(assert_return (invoke "shl" (i64.const 0x7fffffffffffffff) (i64.const 1)) (i64.const 0xfffffffffffffffe)) +(assert_return (invoke "shl" (i64.const 0xffffffffffffffff) (i64.const 1)) (i64.const 0xfffffffffffffffe)) +(assert_return (invoke "shl" (i64.const 0x8000000000000000) (i64.const 1)) (i64.const 0)) +(assert_return (invoke "shl" (i64.const 0x4000000000000000) (i64.const 1)) (i64.const 0x8000000000000000)) +(assert_return (invoke "shl" (i64.const 1) (i64.const 63)) (i64.const 0x8000000000000000)) +(assert_return (invoke "shl" (i64.const 1) (i64.const 64)) (i64.const 1)) +(assert_return (invoke "shl" (i64.const 1) (i64.const 65)) (i64.const 2)) +(assert_return (invoke "shl" (i64.const 1) (i64.const -1)) (i64.const 0x8000000000000000)) +(assert_return (invoke "shl" (i64.const 1) (i64.const 0x7fffffffffffffff)) (i64.const 0x8000000000000000)) + +(assert_return (invoke "shr_s" (i64.const 1) (i64.const 1)) (i64.const 0)) +(assert_return (invoke "shr_s" (i64.const 1) (i64.const 0)) (i64.const 1)) +(assert_return (invoke "shr_s" (i64.const -1) (i64.const 1)) (i64.const -1)) +(assert_return (invoke "shr_s" (i64.const 0x7fffffffffffffff) (i64.const 1)) (i64.const 0x3fffffffffffffff)) +(assert_return (invoke "shr_s" (i64.const 0x8000000000000000) (i64.const 1)) (i64.const 0xc000000000000000)) +(assert_return (invoke "shr_s" (i64.const 0x4000000000000000) (i64.const 1)) (i64.const 0x2000000000000000)) +(assert_return (invoke "shr_s" (i64.const 1) (i64.const 64)) (i64.const 1)) +(assert_return (invoke "shr_s" (i64.const 1) (i64.const 65)) (i64.const 0)) +(assert_return (invoke "shr_s" (i64.const 1) (i64.const -1)) (i64.const 0)) +(assert_return (invoke "shr_s" (i64.const 1) (i64.const 0x7fffffffffffffff)) (i64.const 0)) +(assert_return (invoke "shr_s" (i64.const 1) (i64.const 0x8000000000000000)) (i64.const 1)) +(assert_return (invoke "shr_s" (i64.const 0x8000000000000000) (i64.const 63)) (i64.const -1)) +(assert_return (invoke "shr_s" (i64.const -1) (i64.const 64)) (i64.const -1)) +(assert_return (invoke "shr_s" (i64.const -1) (i64.const 65)) (i64.const -1)) +(assert_return (invoke "shr_s" (i64.const -1) (i64.const -1)) (i64.const -1)) +(assert_return (invoke "shr_s" (i64.const -1) (i64.const 0x7fffffffffffffff)) (i64.const -1)) +(assert_return (invoke "shr_s" (i64.const -1) (i64.const 0x8000000000000000)) (i64.const -1)) + +(assert_return (invoke "shr_u" (i64.const 1) (i64.const 1)) (i64.const 0)) +(assert_return (invoke "shr_u" (i64.const 1) (i64.const 0)) (i64.const 1)) +(assert_return (invoke "shr_u" (i64.const -1) (i64.const 1)) (i64.const 0x7fffffffffffffff)) +(assert_return (invoke "shr_u" (i64.const 0x7fffffffffffffff) (i64.const 1)) (i64.const 0x3fffffffffffffff)) +(assert_return (invoke "shr_u" (i64.const 0x8000000000000000) (i64.const 1)) (i64.const 0x4000000000000000)) +(assert_return (invoke "shr_u" (i64.const 0x4000000000000000) (i64.const 1)) (i64.const 0x2000000000000000)) +(assert_return (invoke "shr_u" (i64.const 1) (i64.const 64)) (i64.const 1)) +(assert_return (invoke "shr_u" (i64.const 1) (i64.const 65)) (i64.const 0)) +(assert_return (invoke "shr_u" (i64.const 1) (i64.const -1)) (i64.const 0)) +(assert_return (invoke "shr_u" (i64.const 1) (i64.const 0x7fffffffffffffff)) (i64.const 0)) +(assert_return (invoke "shr_u" (i64.const 1) (i64.const 0x8000000000000000)) (i64.const 1)) +(assert_return (invoke "shr_u" (i64.const 0x8000000000000000) (i64.const 63)) (i64.const 1)) +(assert_return (invoke "shr_u" (i64.const -1) (i64.const 64)) (i64.const -1)) +(assert_return (invoke "shr_u" (i64.const -1) (i64.const 65)) (i64.const 0x7fffffffffffffff)) +(assert_return (invoke "shr_u" (i64.const -1) (i64.const -1)) (i64.const 1)) +(assert_return (invoke "shr_u" (i64.const -1) (i64.const 0x7fffffffffffffff)) (i64.const 1)) +(assert_return (invoke "shr_u" (i64.const -1) (i64.const 0x8000000000000000)) (i64.const -1)) + +(assert_return (invoke "rotl" (i64.const 1) (i64.const 1)) (i64.const 2)) +(assert_return (invoke "rotl" (i64.const 1) (i64.const 0)) (i64.const 1)) +(assert_return (invoke "rotl" (i64.const -1) (i64.const 1)) (i64.const -1)) +(assert_return (invoke "rotl" (i64.const 0xabd1234ef567809c) (i64.const 63)) (i64.const 0x55e891a77ab3c04e)) +(assert_return (invoke "rotl" (i64.const 0xabd1234ef567809c) (i64.const 0x800000000000003f)) (i64.const 0x55e891a77ab3c04e)) +(assert_return (invoke "rotl" (i64.const 1) (i64.const 63)) (i64.const 0x8000000000000000)) +(assert_return (invoke "rotl" (i64.const 0x8000000000000000) (i64.const 1)) (i64.const 1)) + +(assert_return (invoke "rotr" (i64.const 1) (i64.const 1)) (i64.const 0x8000000000000000)) +(assert_return (invoke "rotr" (i64.const 1) (i64.const 0)) (i64.const 1)) +(assert_return (invoke "rotr" (i64.const -1) (i64.const 1)) (i64.const -1)) +(assert_return (invoke "rotr" (i64.const 0xabcd1234ef567809) (i64.const 53)) (i64.const 0x6891a77ab3c04d5e)) +(assert_return (invoke "rotr" (i64.const 0xabcd1234ef567809) (i64.const 0x35)) (i64.const 0x6891a77ab3c04d5e)) +(assert_return (invoke "rotr" (i64.const 0xabcd1234ef567809) (i64.const 0xf5)) (i64.const 0x6891a77ab3c04d5e)) +(assert_return (invoke "rotr" (i64.const 1) (i64.const 1)) (i64.const 0x8000000000000000)) +(assert_return (invoke "rotr" (i64.const 0x8000000000000000) (i64.const 63)) (i64.const 1)) + +(assert_return (invoke "clz" (i64.const 0xffffffffffffffff)) (i64.const 0)) +(assert_return (invoke "clz" (i64.const 0)) (i64.const 64)) +(assert_return (invoke "clz" (i64.const 0x00008000)) (i64.const 48)) +(assert_return (invoke "clz" (i64.const 0xff)) (i64.const 56)) +(assert_return (invoke "clz" (i64.const 0x8000000000000000)) (i64.const 0)) +(assert_return (invoke "clz" (i64.const 1)) (i64.const 63)) +(assert_return (invoke "clz" (i64.const 2)) (i64.const 62)) +(assert_return (invoke "clz" (i64.const 0x7fffffffffffffff)) (i64.const 1)) + +(assert_return (invoke "ctz" (i64.const -1)) (i64.const 0)) +(assert_return (invoke "ctz" (i64.const 0)) (i64.const 64)) +(assert_return (invoke "ctz" (i64.const 0x00008000)) (i64.const 15)) +(assert_return (invoke "ctz" (i64.const 0x00010000)) (i64.const 16)) +(assert_return (invoke "ctz" (i64.const 0x8000000000000000)) (i64.const 63)) +(assert_return (invoke "ctz" (i64.const 0x7fffffffffffffff)) (i64.const 0)) + +(assert_return (invoke "popcnt" (i64.const -1)) (i64.const 64)) +(assert_return (invoke "popcnt" (i64.const 0)) (i64.const 0)) +(assert_return (invoke "popcnt" (i64.const 0x00008000)) (i64.const 1)) +(assert_return (invoke "popcnt" (i64.const 0x8000800080008000)) (i64.const 4)) +(assert_return (invoke "popcnt" (i64.const 0x7fffffffffffffff)) (i64.const 63)) +(assert_return (invoke "popcnt" (i64.const 0xAAAAAAAA55555555)) (i64.const 32)) +(assert_return (invoke "popcnt" (i64.const 0x99999999AAAAAAAA)) (i64.const 32)) +(assert_return (invoke "popcnt" (i64.const 0xDEADBEEFDEADBEEF)) (i64.const 48)) + +(assert_return (invoke "eqz" (i64.const 0)) (i32.const 1)) +(assert_return (invoke "eqz" (i64.const 1)) (i32.const 0)) +(assert_return (invoke "eqz" (i64.const 0x8000000000000000)) (i32.const 0)) +(assert_return (invoke "eqz" (i64.const 0x7fffffffffffffff)) (i32.const 0)) + +(assert_return (invoke "eq" (i64.const 0) (i64.const 0)) (i32.const 1)) +(assert_return (invoke "eq" (i64.const 1) (i64.const 1)) (i32.const 1)) +(assert_return (invoke "eq" (i64.const -1) (i64.const 1)) (i32.const 0)) +(assert_return (invoke "eq" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 1)) +(assert_return (invoke "eq" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 1)) +(assert_return (invoke "eq" (i64.const -1) (i64.const -1)) (i32.const 1)) +(assert_return (invoke "eq" (i64.const 1) (i64.const 0)) (i32.const 0)) +(assert_return (invoke "eq" (i64.const 0) (i64.const 1)) (i32.const 0)) +(assert_return (invoke "eq" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 0)) +(assert_return (invoke "eq" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 0)) +(assert_return (invoke "eq" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 0)) +(assert_return (invoke "eq" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 0)) +(assert_return (invoke "eq" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 0)) +(assert_return (invoke "eq" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 0)) + +(assert_return (invoke "ne" (i64.const 0) (i64.const 0)) (i32.const 0)) +(assert_return (invoke "ne" (i64.const 1) (i64.const 1)) (i32.const 0)) +(assert_return (invoke "ne" (i64.const -1) (i64.const 1)) (i32.const 1)) +(assert_return (invoke "ne" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 0)) +(assert_return (invoke "ne" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 0)) +(assert_return (invoke "ne" (i64.const -1) (i64.const -1)) (i32.const 0)) +(assert_return (invoke "ne" (i64.const 1) (i64.const 0)) (i32.const 1)) +(assert_return (invoke "ne" (i64.const 0) (i64.const 1)) (i32.const 1)) +(assert_return (invoke "ne" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 1)) +(assert_return (invoke "ne" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 1)) +(assert_return (invoke "ne" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 1)) +(assert_return (invoke "ne" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 1)) +(assert_return (invoke "ne" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 1)) +(assert_return (invoke "ne" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 1)) + +(assert_return (invoke "lt_s" (i64.const 0) (i64.const 0)) (i32.const 0)) +(assert_return (invoke "lt_s" (i64.const 1) (i64.const 1)) (i32.const 0)) +(assert_return (invoke "lt_s" (i64.const -1) (i64.const 1)) (i32.const 1)) +(assert_return (invoke "lt_s" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 0)) +(assert_return (invoke "lt_s" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 0)) +(assert_return (invoke "lt_s" (i64.const -1) (i64.const -1)) (i32.const 0)) +(assert_return (invoke "lt_s" (i64.const 1) (i64.const 0)) (i32.const 0)) +(assert_return (invoke "lt_s" (i64.const 0) (i64.const 1)) (i32.const 1)) +(assert_return (invoke "lt_s" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 1)) +(assert_return (invoke "lt_s" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 0)) +(assert_return (invoke "lt_s" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 1)) +(assert_return (invoke "lt_s" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 0)) +(assert_return (invoke "lt_s" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 1)) +(assert_return (invoke "lt_s" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 0)) + +(assert_return (invoke "lt_u" (i64.const 0) (i64.const 0)) (i32.const 0)) +(assert_return (invoke "lt_u" (i64.const 1) (i64.const 1)) (i32.const 0)) +(assert_return (invoke "lt_u" (i64.const -1) (i64.const 1)) (i32.const 0)) +(assert_return (invoke "lt_u" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 0)) +(assert_return (invoke "lt_u" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 0)) +(assert_return (invoke "lt_u" (i64.const -1) (i64.const -1)) (i32.const 0)) +(assert_return (invoke "lt_u" (i64.const 1) (i64.const 0)) (i32.const 0)) +(assert_return (invoke "lt_u" (i64.const 0) (i64.const 1)) (i32.const 1)) +(assert_return (invoke "lt_u" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 0)) +(assert_return (invoke "lt_u" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 1)) +(assert_return (invoke "lt_u" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 1)) +(assert_return (invoke "lt_u" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 0)) +(assert_return (invoke "lt_u" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 0)) +(assert_return (invoke "lt_u" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 1)) + +(assert_return (invoke "le_s" (i64.const 0) (i64.const 0)) (i32.const 1)) +(assert_return (invoke "le_s" (i64.const 1) (i64.const 1)) (i32.const 1)) +(assert_return (invoke "le_s" (i64.const -1) (i64.const 1)) (i32.const 1)) +(assert_return (invoke "le_s" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 1)) +(assert_return (invoke "le_s" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 1)) +(assert_return (invoke "le_s" (i64.const -1) (i64.const -1)) (i32.const 1)) +(assert_return (invoke "le_s" (i64.const 1) (i64.const 0)) (i32.const 0)) +(assert_return (invoke "le_s" (i64.const 0) (i64.const 1)) (i32.const 1)) +(assert_return (invoke "le_s" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 1)) +(assert_return (invoke "le_s" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 0)) +(assert_return (invoke "le_s" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 1)) +(assert_return (invoke "le_s" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 0)) +(assert_return (invoke "le_s" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 1)) +(assert_return (invoke "le_s" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 0)) + +(assert_return (invoke "le_u" (i64.const 0) (i64.const 0)) (i32.const 1)) +(assert_return (invoke "le_u" (i64.const 1) (i64.const 1)) (i32.const 1)) +(assert_return (invoke "le_u" (i64.const -1) (i64.const 1)) (i32.const 0)) +(assert_return (invoke "le_u" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 1)) +(assert_return (invoke "le_u" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 1)) +(assert_return (invoke "le_u" (i64.const -1) (i64.const -1)) (i32.const 1)) +(assert_return (invoke "le_u" (i64.const 1) (i64.const 0)) (i32.const 0)) +(assert_return (invoke "le_u" (i64.const 0) (i64.const 1)) (i32.const 1)) +(assert_return (invoke "le_u" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 0)) +(assert_return (invoke "le_u" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 1)) +(assert_return (invoke "le_u" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 1)) +(assert_return (invoke "le_u" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 0)) +(assert_return (invoke "le_u" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 0)) +(assert_return (invoke "le_u" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 1)) + +(assert_return (invoke "gt_s" (i64.const 0) (i64.const 0)) (i32.const 0)) +(assert_return (invoke "gt_s" (i64.const 1) (i64.const 1)) (i32.const 0)) +(assert_return (invoke "gt_s" (i64.const -1) (i64.const 1)) (i32.const 0)) +(assert_return (invoke "gt_s" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 0)) +(assert_return (invoke "gt_s" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 0)) +(assert_return (invoke "gt_s" (i64.const -1) (i64.const -1)) (i32.const 0)) +(assert_return (invoke "gt_s" (i64.const 1) (i64.const 0)) (i32.const 1)) +(assert_return (invoke "gt_s" (i64.const 0) (i64.const 1)) (i32.const 0)) +(assert_return (invoke "gt_s" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 0)) +(assert_return (invoke "gt_s" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 1)) +(assert_return (invoke "gt_s" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 0)) +(assert_return (invoke "gt_s" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 1)) +(assert_return (invoke "gt_s" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 0)) +(assert_return (invoke "gt_s" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 1)) + +(assert_return (invoke "gt_u" (i64.const 0) (i64.const 0)) (i32.const 0)) +(assert_return (invoke "gt_u" (i64.const 1) (i64.const 1)) (i32.const 0)) +(assert_return (invoke "gt_u" (i64.const -1) (i64.const 1)) (i32.const 1)) +(assert_return (invoke "gt_u" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 0)) +(assert_return (invoke "gt_u" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 0)) +(assert_return (invoke "gt_u" (i64.const -1) (i64.const -1)) (i32.const 0)) +(assert_return (invoke "gt_u" (i64.const 1) (i64.const 0)) (i32.const 1)) +(assert_return (invoke "gt_u" (i64.const 0) (i64.const 1)) (i32.const 0)) +(assert_return (invoke "gt_u" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 1)) +(assert_return (invoke "gt_u" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 0)) +(assert_return (invoke "gt_u" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 0)) +(assert_return (invoke "gt_u" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 1)) +(assert_return (invoke "gt_u" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 1)) +(assert_return (invoke "gt_u" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 0)) + +(assert_return (invoke "ge_s" (i64.const 0) (i64.const 0)) (i32.const 1)) +(assert_return (invoke "ge_s" (i64.const 1) (i64.const 1)) (i32.const 1)) +(assert_return (invoke "ge_s" (i64.const -1) (i64.const 1)) (i32.const 0)) +(assert_return (invoke "ge_s" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 1)) +(assert_return (invoke "ge_s" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 1)) +(assert_return (invoke "ge_s" (i64.const -1) (i64.const -1)) (i32.const 1)) +(assert_return (invoke "ge_s" (i64.const 1) (i64.const 0)) (i32.const 1)) +(assert_return (invoke "ge_s" (i64.const 0) (i64.const 1)) (i32.const 0)) +(assert_return (invoke "ge_s" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 0)) +(assert_return (invoke "ge_s" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 1)) +(assert_return (invoke "ge_s" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 0)) +(assert_return (invoke "ge_s" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 1)) +(assert_return (invoke "ge_s" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 0)) +(assert_return (invoke "ge_s" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 1)) + +(assert_return (invoke "ge_u" (i64.const 0) (i64.const 0)) (i32.const 1)) +(assert_return (invoke "ge_u" (i64.const 1) (i64.const 1)) (i32.const 1)) +(assert_return (invoke "ge_u" (i64.const -1) (i64.const 1)) (i32.const 1)) +(assert_return (invoke "ge_u" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 1)) +(assert_return (invoke "ge_u" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 1)) +(assert_return (invoke "ge_u" (i64.const -1) (i64.const -1)) (i32.const 1)) +(assert_return (invoke "ge_u" (i64.const 1) (i64.const 0)) (i32.const 1)) +(assert_return (invoke "ge_u" (i64.const 0) (i64.const 1)) (i32.const 0)) +(assert_return (invoke "ge_u" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 1)) +(assert_return (invoke "ge_u" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 0)) +(assert_return (invoke "ge_u" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 0)) +(assert_return (invoke "ge_u" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 1)) +(assert_return (invoke "ge_u" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 1)) +(assert_return (invoke "ge_u" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 0)) diff --git a/js/src/jit-test/tests/wasm/spec/i64.wast.js b/js/src/jit-test/tests/wasm/spec/i64.wast.js new file mode 100644 index 000000000..3a4079ebd --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/i64.wast.js @@ -0,0 +1 @@ +var importedArgs = ['i64.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/import_tests.sh b/js/src/jit-test/tests/wasm/spec/import_tests.sh new file mode 100755 index 000000000..78203ec19 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/import_tests.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +rm -rf ./*.wast ./*.wast.js + +git clone https://github.com/WebAssembly/spec spec +mv spec/interpreter/test/*.wast ./ +rm -rf spec/ + +# TODO not handled yet +rm -f *.fail.wast + +for i in $(ls *.wast); +do + echo "var importedArgs = ['$i']; load(scriptdir + '../spec.js');" > $i.js +done; diff --git a/js/src/jit-test/tests/wasm/spec/imports.wast b/js/src/jit-test/tests/wasm/spec/imports.wast new file mode 100644 index 000000000..51b5066bd --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/imports.wast @@ -0,0 +1,456 @@ +;; Auxiliary module to import from + +(module + (func (export "func")) + (func (export "func-i32") (param i32)) + (func (export "func-f32") (param f32)) + (func (export "func->i32") (result i32) (i32.const 22)) + (func (export "func->f32") (result f32) (f32.const 11)) + (func (export "func-i32->i32") (param i32) (result i32) (get_local 0)) + (global (export "global-i32") i32 (i32.const 55)) + (global (export "global-f32") f32 (f32.const 44)) + (table (export "table-10-inf") 10 anyfunc) + ;; (table (export "table-10-20") 10 20 anyfunc) + (memory (export "memory-2-inf") 2) + ;; (memory (export "memory-2-4") 2 4) +) + +(register "test") + + +;; Functions + +(module + (type $func_i32 (func (param i32))) + (type $func_i64 (func (param i64))) + + (import "spectest" "print" (func (param i32))) + (func (import "spectest" "print") (param i64)) + (import "spectest" "print" (func $print_i32 (param i32))) + (import "spectest" "print" (func $print_i64 (param i64))) + (import "spectest" "print" (func $print_i32_f32 (param i32 f32))) + (import "spectest" "print" (func $print_i64_f64 (param i64 f64))) + (func $print_i32-2 (import "spectest" "print") (param i32)) + (func $print_i64-2 (import "spectest" "print") (param i64)) + + (table anyfunc (elem $print_i32 $print_i64)) + + (func (export "print32") (param $i i32) + (call 0 (get_local $i)) + (call $print_i32_f32 + (i32.add (get_local $i) (i32.const 1)) + (f32.const 42) + ) + (call $print_i32 (get_local $i)) + (call $print_i32-2 (get_local $i)) + (call_indirect $func_i32 (get_local $i) (i32.const 0)) + ) + + (func (export "print64") (param $i i64) + (call 1 (get_local $i)) + (call $print_i64_f64 + (i64.add (get_local $i) (i64.const 1)) + (f64.const 53) + ) + (call $print_i64 (get_local $i)) + (call $print_i64-2 (get_local $i)) + (call_indirect $func_i64 (get_local $i) (i32.const 1)) + ) +) + +(assert_return (invoke "print32" (i32.const 13))) +(assert_return (invoke "print64" (i64.const 24))) + +(module (import "test" "func" (func))) +(module (import "test" "func-i32" (func (param i32)))) +(module (import "test" "func-f32" (func (param f32)))) +(module (import "test" "func->i32" (func (result i32)))) +(module (import "test" "func->f32" (func (result f32)))) +(module (import "test" "func-i32->i32" (func (param i32) (result i32)))) + +(assert_unlinkable + (module (import "test" "unknown" (func))) + "unknown import" +) +(assert_unlinkable + (module (import "spectest" "unknown" (func))) + "unknown import" +) + +(assert_unlinkable + (module (import "test" "func" (func (param i32)))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "func" (func (result i32)))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "func" (func (param i32) (result i32)))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "func-i32" (func))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "func-i32" (func (result i32)))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "func-i32" (func (param f32)))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "func-i32" (func (param i64)))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "func-i32" (func (param i32) (result i32)))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "func->i32" (func))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "func->i32" (func (param i32)))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "func->i32" (func (result f32)))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "func->i32" (func (result i64)))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "func->i32" (func (param i32) (result i32)))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "func-i32->i32" (func))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "func-i32->i32" (func (param i32)))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "func-i32->i32" (func (result i32)))) + "type mismatch" +) + +(assert_unlinkable + (module (import "test" "global-i32" (func (result i32)))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "table-10-inf" (func))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "memory-2-inf" (func))) + "type mismatch" +) +(assert_unlinkable + (module (import "spectest" "global" (func))) + "type mismatch" +) +(assert_unlinkable + (module (import "spectest" "table" (func))) + "type mismatch" +) +(assert_unlinkable + (module (import "spectest" "memory" (func))) + "type mismatch" +) + + +;; Globals + +(module + (import "spectest" "global" (global i32)) + (global (import "spectest" "global") i32) + + (import "spectest" "global" (global $x i32)) + (global $y (import "spectest" "global") i32) + + ;; limitation of the spidermonkey testing mode (an imported global can't be both a number and i64). + ;;(import "spectest" "global" (global i64)) + (import "spectest" "global" (global f32)) + (import "spectest" "global" (global f64)) + + (func (export "get-0") (result i32) (get_global 0)) + (func (export "get-1") (result i32) (get_global 1)) + (func (export "get-x") (result i32) (get_global $x)) + (func (export "get-y") (result i32) (get_global $y)) +) + +(assert_return (invoke "get-0") (i32.const 666)) +(assert_return (invoke "get-1") (i32.const 666)) +(assert_return (invoke "get-x") (i32.const 666)) +(assert_return (invoke "get-y") (i32.const 666)) + +(module (import "test" "global-i32" (global i32))) +(module (import "test" "global-f32" (global f32))) + +(assert_unlinkable + (module (import "test" "unknown" (global i32))) + "unknown import" +) +(assert_unlinkable + (module (import "spectest" "unknown" (global i32))) + "unknown import" +) + +(assert_unlinkable + (module (import "test" "func" (global i32))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "table-10-inf" (global i32))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "memory-2-inf" (global i32))) + "type mismatch" +) +(assert_unlinkable + (module (import "spectest" "print" (global i32))) + "type mismatch" +) +(assert_unlinkable + (module (import "spectest" "table" (global i32))) + "type mismatch" +) +(assert_unlinkable + (module (import "spectest" "memory" (global i32))) + "type mismatch" +) + + +;; Tables + +(module + (type (func (result i32))) + (import "spectest" "table" (table 10 20 anyfunc)) + (elem 0 (i32.const 1) $f $g) + + (func (export "call") (param i32) (result i32) (call_indirect 0 (get_local 0))) + (func $f (result i32) (i32.const 11)) + (func $g (result i32) (i32.const 22)) +) + +(assert_trap (invoke "call" (i32.const 0)) "uninitialized element") +(assert_return (invoke "call" (i32.const 1)) (i32.const 11)) +(assert_return (invoke "call" (i32.const 2)) (i32.const 22)) +(assert_trap (invoke "call" (i32.const 3)) "uninitialized element") +(assert_trap (invoke "call" (i32.const 100)) "undefined element") + + +(module + (type (func (result i32))) + (table (import "spectest" "table") 10 20 anyfunc) + (elem 0 (i32.const 1) $f $g) + + (func (export "call") (param i32) (result i32) (call_indirect 0 (get_local 0))) + (func $f (result i32) (i32.const 11)) + (func $g (result i32) (i32.const 22)) +) + +(assert_trap (invoke "call" (i32.const 0)) "uninitialized element") +(assert_return (invoke "call" (i32.const 1)) (i32.const 11)) +(assert_return (invoke "call" (i32.const 2)) (i32.const 22)) +(assert_trap (invoke "call" (i32.const 3)) "uninitialized element") +(assert_trap (invoke "call" (i32.const 100)) "undefined element") + + +(assert_invalid + (module (import "" "" (table 10 anyfunc)) (import "" "" (table 10 anyfunc))) + "multiple tables" +) +(assert_invalid + (module (import "" "" (table 10 anyfunc)) (table 10 anyfunc)) + "multiple tables" +) +(assert_invalid + (module (table 10 anyfunc) (table 10 anyfunc)) + "multiple tables" +) + +(module (import "test" "table-10-inf" (table 10 anyfunc))) +(module (import "test" "table-10-inf" (table 5 anyfunc))) +(module (import "test" "table-10-inf" (table 0 anyfunc))) +(module (import "spectest" "table" (table 10 anyfunc))) +(module (import "spectest" "table" (table 5 anyfunc))) +(module (import "spectest" "table" (table 0 anyfunc))) +(module (import "spectest" "table" (table 10 20 anyfunc))) +(module (import "spectest" "table" (table 5 20 anyfunc))) +(module (import "spectest" "table" (table 0 20 anyfunc))) +(module (import "spectest" "table" (table 10 25 anyfunc))) +(module (import "spectest" "table" (table 5 25 anyfunc))) + +(assert_unlinkable + (module (import "test" "unknown" (table 10 anyfunc))) + "unknown import" +) +(assert_unlinkable + (module (import "spectest" "unknown" (table 10 anyfunc))) + "unknown import" +) + +(assert_unlinkable + (module (import "test" "table-10-inf" (table 12 anyfunc))) + "actual size smaller than declared" +) +(assert_unlinkable + (module (import "test" "table-10-inf" (table 10 20 anyfunc))) + "maximum size larger than declared" +) +(assert_unlinkable + (module (import "spectest" "table" (table 12 anyfunc))) + "actual size smaller than declared" +) +(assert_unlinkable + (module (import "spectest" "table" (table 10 15 anyfunc))) + "maximum size larger than declared" +) + +(assert_unlinkable + (module (import "test" "func" (table 10 anyfunc))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "global-i32" (table 10 anyfunc))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "memory-2-inf" (table 10 anyfunc))) + "type mismatch" +) +(assert_unlinkable + (module (import "spectest" "print" (table 10 anyfunc))) + "type mismatch" +) + + + +;; Memories + +(module + (import "spectest" "memory" (memory 1 2)) + (data 0 (i32.const 10) "\10") + + (func (export "load") (param i32) (result i32) (i32.load (get_local 0))) +) + +(assert_return (invoke "load" (i32.const 0)) (i32.const 0)) +(assert_return (invoke "load" (i32.const 10)) (i32.const 16)) +(assert_return (invoke "load" (i32.const 8)) (i32.const 0x100000)) +(assert_trap (invoke "load" (i32.const 1000000)) "out of bounds memory access") + +(module + (memory (import "spectest" "memory") 1 2) + (data 0 (i32.const 10) "\10") + + (func (export "load") (param i32) (result i32) (i32.load (get_local 0))) +) +(assert_return (invoke "load" (i32.const 0)) (i32.const 0)) +(assert_return (invoke "load" (i32.const 10)) (i32.const 16)) +(assert_return (invoke "load" (i32.const 8)) (i32.const 0x100000)) +(assert_trap (invoke "load" (i32.const 1000000)) "out of bounds memory access") + +(assert_invalid + (module (import "" "" (memory 1)) (import "" "" (memory 1))) + "multiple memories" +) +(assert_invalid + (module (import "" "" (memory 1)) (memory 0)) + "multiple memories" +) +(assert_invalid + (module (memory 0) (memory 0)) + "multiple memories" +) + +(module (import "test" "memory-2-inf" (memory 2))) +(module (import "test" "memory-2-inf" (memory 1))) +(module (import "test" "memory-2-inf" (memory 0))) +(module (import "spectest" "memory" (memory 1))) +(module (import "spectest" "memory" (memory 0))) +(module (import "spectest" "memory" (memory 1 2))) +(module (import "spectest" "memory" (memory 0 2))) +(module (import "spectest" "memory" (memory 1 3))) +(module (import "spectest" "memory" (memory 0 3))) + +(assert_unlinkable + (module (import "test" "unknown" (memory 1))) + "unknown import" +) +(assert_unlinkable + (module (import "spectest" "unknown" (memory 1))) + "unknown import" +) + +(assert_unlinkable + (module (import "test" "memory-2-inf" (memory 3))) + "actual size smaller than declared" +) +(assert_unlinkable + (module (import "test" "memory-2-inf" (memory 2 3))) + "maximum size larger than declared" +) +(assert_unlinkable + (module (import "spectest" "memory" (memory 2))) + "actual size smaller than declared" +) +(assert_unlinkable + (module (import "spectest" "memory" (memory 1 1))) + "maximum size larger than declared" +) + +(assert_unlinkable + (module (import "test" "func-i32" (memory 1))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "global-i32" (memory 1))) + "type mismatch" +) +(assert_unlinkable + (module (import "test" "table-10-inf" (memory 1))) + "type mismatch" +) +(assert_unlinkable + (module (import "spectest" "print" (memory 1))) + "type mismatch" +) +(assert_unlinkable + (module (import "spectest" "global" (memory 1))) + "type mismatch" +) +(assert_unlinkable + (module (import "spectest" "table" (memory 1))) + "type mismatch" +) + +(assert_unlinkable + (module (import "spectest" "memory" (memory 2))) + "actual size smaller than declared" +) +(assert_unlinkable + (module (import "spectest" "memory" (memory 1 1))) + "maximum size larger than declared" +) + +(module + (import "spectest" "memory" (memory 0 3)) ;; actual has max size 2 + (func (export "grow") (param i32) (result i32) (grow_memory (get_local 0))) +) +(assert_return (invoke "grow" (i32.const 0)) (i32.const 1)) +(assert_return (invoke "grow" (i32.const 1)) (i32.const 1)) +(assert_return (invoke "grow" (i32.const 0)) (i32.const 2)) +(assert_return (invoke "grow" (i32.const 1)) (i32.const -1)) +(assert_return (invoke "grow" (i32.const 0)) (i32.const 2)) diff --git a/js/src/jit-test/tests/wasm/spec/imports.wast.js b/js/src/jit-test/tests/wasm/spec/imports.wast.js new file mode 100644 index 000000000..8f3dd3106 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/imports.wast.js @@ -0,0 +1 @@ +var importedArgs = ['imports.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/int_exprs.wast b/js/src/jit-test/tests/wasm/spec/int_exprs.wast new file mode 100644 index 000000000..d8272fa7f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/int_exprs.wast @@ -0,0 +1,299 @@ +;; Test interesting integer "expressions". These tests contain code +;; patterns which tempt common value-changing optimizations. + +;; Test that x+1<y+1 is not folded to x<y + +(module + (func (export "i32.no_fold_cmp_s_offset") (param $x i32) (param $y i32) (result i32) + (i32.lt_s (i32.add (get_local $x) (i32.const 1)) (i32.add (get_local $y) (i32.const 1)))) + (func (export "i32.no_fold_cmp_u_offset") (param $x i32) (param $y i32) (result i32) + (i32.lt_u (i32.add (get_local $x) (i32.const 1)) (i32.add (get_local $y) (i32.const 1)))) + + (func (export "i64.no_fold_cmp_s_offset") (param $x i64) (param $y i64) (result i32) + (i64.lt_s (i64.add (get_local $x) (i64.const 1)) (i64.add (get_local $y) (i64.const 1)))) + (func (export "i64.no_fold_cmp_u_offset") (param $x i64) (param $y i64) (result i32) + (i64.lt_u (i64.add (get_local $x) (i64.const 1)) (i64.add (get_local $y) (i64.const 1)))) +) + +(assert_return (invoke "i32.no_fold_cmp_s_offset" (i32.const 0x7fffffff) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "i32.no_fold_cmp_u_offset" (i32.const 0xffffffff) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "i64.no_fold_cmp_s_offset" (i64.const 0x7fffffffffffffff) (i64.const 0)) (i32.const 1)) +(assert_return (invoke "i64.no_fold_cmp_u_offset" (i64.const 0xffffffffffffffff) (i64.const 0)) (i32.const 1)) + +;; Test that wrap(extend_s(x)) is not folded to x + +(module + (func (export "i64.no_fold_wrap_extend_s") (param $x i64) (result i64) + (i64.extend_s/i32 (i32.wrap/i64 (get_local $x)))) +) + +(assert_return (invoke "i64.no_fold_wrap_extend_s" (i64.const 0x0010203040506070)) (i64.const 0x0000000040506070)) +(assert_return (invoke "i64.no_fold_wrap_extend_s" (i64.const 0x00a0b0c0d0e0f0a0)) (i64.const 0xffffffffd0e0f0a0)) + +;; Test that wrap(extend_u(x)) is not folded to x + +(module + (func (export "i64.no_fold_wrap_extend_u") (param $x i64) (result i64) + (i64.extend_u/i32 (i32.wrap/i64 (get_local $x)))) +) + +(assert_return (invoke "i64.no_fold_wrap_extend_u" (i64.const 0x0010203040506070)) (i64.const 0x0000000040506070)) + +;; Test that x<<n>>n is not folded to x + +(module + (func (export "i32.no_fold_shl_shr_s") (param $x i32) (result i32) + (i32.shr_s (i32.shl (get_local $x) (i32.const 1)) (i32.const 1))) + (func (export "i32.no_fold_shl_shr_u") (param $x i32) (result i32) + (i32.shr_u (i32.shl (get_local $x) (i32.const 1)) (i32.const 1))) + + (func (export "i64.no_fold_shl_shr_s") (param $x i64) (result i64) + (i64.shr_s (i64.shl (get_local $x) (i64.const 1)) (i64.const 1))) + (func (export "i64.no_fold_shl_shr_u") (param $x i64) (result i64) + (i64.shr_u (i64.shl (get_local $x) (i64.const 1)) (i64.const 1))) +) + +(assert_return (invoke "i32.no_fold_shl_shr_s" (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "i32.no_fold_shl_shr_u" (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "i64.no_fold_shl_shr_s" (i64.const 0x8000000000000000)) (i64.const 0)) +(assert_return (invoke "i64.no_fold_shl_shr_u" (i64.const 0x8000000000000000)) (i64.const 0)) + +;; Test that x>>n<<n is not folded to x + +(module + (func (export "i32.no_fold_shr_s_shl") (param $x i32) (result i32) + (i32.shl (i32.shr_s (get_local $x) (i32.const 1)) (i32.const 1))) + (func (export "i32.no_fold_shr_u_shl") (param $x i32) (result i32) + (i32.shl (i32.shr_u (get_local $x) (i32.const 1)) (i32.const 1))) + + (func (export "i64.no_fold_shr_s_shl") (param $x i64) (result i64) + (i64.shl (i64.shr_s (get_local $x) (i64.const 1)) (i64.const 1))) + (func (export "i64.no_fold_shr_u_shl") (param $x i64) (result i64) + (i64.shl (i64.shr_u (get_local $x) (i64.const 1)) (i64.const 1))) +) + +(assert_return (invoke "i32.no_fold_shr_s_shl" (i32.const 1)) (i32.const 0)) +(assert_return (invoke "i32.no_fold_shr_u_shl" (i32.const 1)) (i32.const 0)) +(assert_return (invoke "i64.no_fold_shr_s_shl" (i64.const 1)) (i64.const 0)) +(assert_return (invoke "i64.no_fold_shr_u_shl" (i64.const 1)) (i64.const 0)) + +;; Test that x/n*n is not folded to x + +(module + (func (export "i32.no_fold_div_s_mul") (param $x i32) (result i32) + (i32.mul (i32.div_s (get_local $x) (i32.const 6)) (i32.const 6))) + (func (export "i32.no_fold_div_u_mul") (param $x i32) (result i32) + (i32.mul (i32.div_u (get_local $x) (i32.const 6)) (i32.const 6))) + + (func (export "i64.no_fold_div_s_mul") (param $x i64) (result i64) + (i64.mul (i64.div_s (get_local $x) (i64.const 6)) (i64.const 6))) + (func (export "i64.no_fold_div_u_mul") (param $x i64) (result i64) + (i64.mul (i64.div_u (get_local $x) (i64.const 6)) (i64.const 6))) +) + +(assert_return (invoke "i32.no_fold_div_s_mul" (i32.const 1)) (i32.const 0)) +(assert_return (invoke "i32.no_fold_div_u_mul" (i32.const 1)) (i32.const 0)) +(assert_return (invoke "i64.no_fold_div_s_mul" (i64.const 1)) (i64.const 0)) +(assert_return (invoke "i64.no_fold_div_u_mul" (i64.const 1)) (i64.const 0)) + +;; Test that x*n/n is not folded to x + +(module + (func (export "i32.no_fold_mul_div_s") (param $x i32) (result i32) + (i32.div_s (i32.mul (get_local $x) (i32.const 6)) (i32.const 6))) + (func (export "i32.no_fold_mul_div_u") (param $x i32) (result i32) + (i32.div_u (i32.mul (get_local $x) (i32.const 6)) (i32.const 6))) + + (func (export "i64.no_fold_mul_div_s") (param $x i64) (result i64) + (i64.div_s (i64.mul (get_local $x) (i64.const 6)) (i64.const 6))) + (func (export "i64.no_fold_mul_div_u") (param $x i64) (result i64) + (i64.div_u (i64.mul (get_local $x) (i64.const 6)) (i64.const 6))) +) + +(assert_return (invoke "i32.no_fold_mul_div_s" (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "i32.no_fold_mul_div_u" (i32.const 0x80000000)) (i32.const 0)) +(assert_return (invoke "i64.no_fold_mul_div_s" (i64.const 0x8000000000000000)) (i64.const 0)) +(assert_return (invoke "i64.no_fold_mul_div_u" (i64.const 0x8000000000000000)) (i64.const 0)) + +;; Test that x/n where n is a known power of 2 is not folded to shr_s + +(module + (func (export "i32.no_fold_div_s_2") (param $x i32) (result i32) + (i32.div_s (get_local $x) (i32.const 2))) + + (func (export "i64.no_fold_div_s_2") (param $x i64) (result i64) + (i64.div_s (get_local $x) (i64.const 2))) +) + +(assert_return (invoke "i32.no_fold_div_s_2" (i32.const -11)) (i32.const -5)) +(assert_return (invoke "i64.no_fold_div_s_2" (i64.const -11)) (i64.const -5)) + +;; Test that x%n where n is a known power of 2 is not folded to and + +(module + (func (export "i32.no_fold_rem_s_2") (param $x i32) (result i32) + (i32.rem_s (get_local $x) (i32.const 2))) + + (func (export "i64.no_fold_rem_s_2") (param $x i64) (result i64) + (i64.rem_s (get_local $x) (i64.const 2))) +) + +(assert_return (invoke "i32.no_fold_rem_s_2" (i32.const -11)) (i32.const -1)) +(assert_return (invoke "i64.no_fold_rem_s_2" (i64.const -11)) (i64.const -1)) + +;; Test that x/0 works + +(module + (func (export "i32.div_s_3") (param $x i32) (result i32) + (i32.div_s (get_local $x) (i32.const 0))) + (func (export "i32.div_u_3") (param $x i32) (result i32) + (i32.div_u (get_local $x) (i32.const 0))) + + (func (export "i64.div_s_3") (param $x i64) (result i64) + (i64.div_s (get_local $x) (i64.const 0))) + (func (export "i64.div_u_3") (param $x i64) (result i64) + (i64.div_u (get_local $x) (i64.const 0))) +) + +(assert_trap (invoke "i32.div_s_3" (i32.const 71)) "integer divide by zero") +(assert_trap (invoke "i32.div_u_3" (i32.const 71)) "integer divide by zero") +(assert_trap (invoke "i64.div_s_3" (i64.const 71)) "integer divide by zero") +(assert_trap (invoke "i64.div_u_3" (i64.const 71)) "integer divide by zero") + +;; Test that x/3 works + +(module + (func (export "i32.div_s_3") (param $x i32) (result i32) + (i32.div_s (get_local $x) (i32.const 3))) + (func (export "i32.div_u_3") (param $x i32) (result i32) + (i32.div_u (get_local $x) (i32.const 3))) + + (func (export "i64.div_s_3") (param $x i64) (result i64) + (i64.div_s (get_local $x) (i64.const 3))) + (func (export "i64.div_u_3") (param $x i64) (result i64) + (i64.div_u (get_local $x) (i64.const 3))) +) + +(assert_return (invoke "i32.div_s_3" (i32.const 71)) (i32.const 23)) +(assert_return (invoke "i32.div_s_3" (i32.const 0x60000000)) (i32.const 0x20000000)) +(assert_return (invoke "i32.div_u_3" (i32.const 71)) (i32.const 23)) +(assert_return (invoke "i32.div_u_3" (i32.const 0xc0000000)) (i32.const 0x40000000)) +(assert_return (invoke "i64.div_s_3" (i64.const 71)) (i64.const 23)) +(assert_return (invoke "i64.div_s_3" (i64.const 0x3000000000000000)) (i64.const 0x1000000000000000)) +(assert_return (invoke "i64.div_u_3" (i64.const 71)) (i64.const 23)) +(assert_return (invoke "i64.div_u_3" (i64.const 0xc000000000000000)) (i64.const 0x4000000000000000)) + +;; Test that x/5 works + +(module + (func (export "i32.div_s_5") (param $x i32) (result i32) + (i32.div_s (get_local $x) (i32.const 5))) + (func (export "i32.div_u_5") (param $x i32) (result i32) + (i32.div_u (get_local $x) (i32.const 5))) + + (func (export "i64.div_s_5") (param $x i64) (result i64) + (i64.div_s (get_local $x) (i64.const 5))) + (func (export "i64.div_u_5") (param $x i64) (result i64) + (i64.div_u (get_local $x) (i64.const 5))) +) + +(assert_return (invoke "i32.div_s_5" (i32.const 71)) (i32.const 14)) +(assert_return (invoke "i32.div_s_5" (i32.const 0x50000000)) (i32.const 0x10000000)) +(assert_return (invoke "i32.div_u_5" (i32.const 71)) (i32.const 14)) +(assert_return (invoke "i32.div_u_5" (i32.const 0xa0000000)) (i32.const 0x20000000)) +(assert_return (invoke "i64.div_s_5" (i64.const 71)) (i64.const 14)) +(assert_return (invoke "i64.div_s_5" (i64.const 0x5000000000000000)) (i64.const 0x1000000000000000)) +(assert_return (invoke "i64.div_u_5" (i64.const 71)) (i64.const 14)) +(assert_return (invoke "i64.div_u_5" (i64.const 0xa000000000000000)) (i64.const 0x2000000000000000)) + +;; Test that x/7 works + +(module + (func (export "i32.div_s_7") (param $x i32) (result i32) + (i32.div_s (get_local $x) (i32.const 7))) + (func (export "i32.div_u_7") (param $x i32) (result i32) + (i32.div_u (get_local $x) (i32.const 7))) + + (func (export "i64.div_s_7") (param $x i64) (result i64) + (i64.div_s (get_local $x) (i64.const 7))) + (func (export "i64.div_u_7") (param $x i64) (result i64) + (i64.div_u (get_local $x) (i64.const 7))) +) + +(assert_return (invoke "i32.div_s_7" (i32.const 71)) (i32.const 10)) +(assert_return (invoke "i32.div_s_7" (i32.const 0x70000000)) (i32.const 0x10000000)) +(assert_return (invoke "i32.div_u_7" (i32.const 71)) (i32.const 10)) +(assert_return (invoke "i32.div_u_7" (i32.const 0xe0000000)) (i32.const 0x20000000)) +(assert_return (invoke "i64.div_s_7" (i64.const 71)) (i64.const 10)) +(assert_return (invoke "i64.div_s_7" (i64.const 0x7000000000000000)) (i64.const 0x1000000000000000)) +(assert_return (invoke "i64.div_u_7" (i64.const 71)) (i64.const 10)) +(assert_return (invoke "i64.div_u_7" (i64.const 0xe000000000000000)) (i64.const 0x2000000000000000)) + +;; Test that x%3 works + +(module + (func (export "i32.rem_s_3") (param $x i32) (result i32) + (i32.rem_s (get_local $x) (i32.const 3))) + (func (export "i32.rem_u_3") (param $x i32) (result i32) + (i32.rem_u (get_local $x) (i32.const 3))) + + (func (export "i64.rem_s_3") (param $x i64) (result i64) + (i64.rem_s (get_local $x) (i64.const 3))) + (func (export "i64.rem_u_3") (param $x i64) (result i64) + (i64.rem_u (get_local $x) (i64.const 3))) +) + +(assert_return (invoke "i32.rem_s_3" (i32.const 71)) (i32.const 2)) +(assert_return (invoke "i32.rem_s_3" (i32.const 0x60000000)) (i32.const 0)) +(assert_return (invoke "i32.rem_u_3" (i32.const 71)) (i32.const 2)) +(assert_return (invoke "i32.rem_u_3" (i32.const 0xc0000000)) (i32.const 0)) +(assert_return (invoke "i64.rem_s_3" (i64.const 71)) (i64.const 2)) +(assert_return (invoke "i64.rem_s_3" (i64.const 0x3000000000000000)) (i64.const 0)) +(assert_return (invoke "i64.rem_u_3" (i64.const 71)) (i64.const 2)) +(assert_return (invoke "i64.rem_u_3" (i64.const 0xc000000000000000)) (i64.const 0)) + +;; Test that x%5 works + +(module + (func (export "i32.rem_s_5") (param $x i32) (result i32) + (i32.rem_s (get_local $x) (i32.const 5))) + (func (export "i32.rem_u_5") (param $x i32) (result i32) + (i32.rem_u (get_local $x) (i32.const 5))) + + (func (export "i64.rem_s_5") (param $x i64) (result i64) + (i64.rem_s (get_local $x) (i64.const 5))) + (func (export "i64.rem_u_5") (param $x i64) (result i64) + (i64.rem_u (get_local $x) (i64.const 5))) +) + +(assert_return (invoke "i32.rem_s_5" (i32.const 71)) (i32.const 1)) +(assert_return (invoke "i32.rem_s_5" (i32.const 0x50000000)) (i32.const 0)) +(assert_return (invoke "i32.rem_u_5" (i32.const 71)) (i32.const 1)) +(assert_return (invoke "i32.rem_u_5" (i32.const 0xa0000000)) (i32.const 0)) +(assert_return (invoke "i64.rem_s_5" (i64.const 71)) (i64.const 1)) +(assert_return (invoke "i64.rem_s_5" (i64.const 0x5000000000000000)) (i64.const 0)) +(assert_return (invoke "i64.rem_u_5" (i64.const 71)) (i64.const 1)) +(assert_return (invoke "i64.rem_u_5" (i64.const 0xa000000000000000)) (i64.const 0)) + +;; Test that x%7 works + +(module + (func (export "i32.rem_s_7") (param $x i32) (result i32) + (i32.rem_s (get_local $x) (i32.const 7))) + (func (export "i32.rem_u_7") (param $x i32) (result i32) + (i32.rem_u (get_local $x) (i32.const 7))) + + (func (export "i64.rem_s_7") (param $x i64) (result i64) + (i64.rem_s (get_local $x) (i64.const 7))) + (func (export "i64.rem_u_7") (param $x i64) (result i64) + (i64.rem_u (get_local $x) (i64.const 7))) +) + +(assert_return (invoke "i32.rem_s_7" (i32.const 71)) (i32.const 1)) +(assert_return (invoke "i32.rem_s_7" (i32.const 0x70000000)) (i32.const 0)) +(assert_return (invoke "i32.rem_u_7" (i32.const 71)) (i32.const 1)) +(assert_return (invoke "i32.rem_u_7" (i32.const 0xe0000000)) (i32.const 0)) +(assert_return (invoke "i64.rem_s_7" (i64.const 71)) (i64.const 1)) +(assert_return (invoke "i64.rem_s_7" (i64.const 0x7000000000000000)) (i64.const 0)) +(assert_return (invoke "i64.rem_u_7" (i64.const 71)) (i64.const 1)) +(assert_return (invoke "i64.rem_u_7" (i64.const 0xe000000000000000)) (i64.const 0)) diff --git a/js/src/jit-test/tests/wasm/spec/int_exprs.wast.js b/js/src/jit-test/tests/wasm/spec/int_exprs.wast.js new file mode 100644 index 000000000..acf94195f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/int_exprs.wast.js @@ -0,0 +1 @@ +var importedArgs = ['int_exprs.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/int_literals.wast b/js/src/jit-test/tests/wasm/spec/int_literals.wast new file mode 100644 index 000000000..f0ec04178 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/int_literals.wast @@ -0,0 +1,49 @@ +(module + (func (export "i32.test") (result i32) (return (i32.const 0x0bAdD00D))) + (func (export "i32.umax") (result i32) (return (i32.const 0xffffffff))) + (func (export "i32.smax") (result i32) (return (i32.const 0x7fffffff))) + (func (export "i32.neg_smax") (result i32) (return (i32.const -0x7fffffff))) + (func (export "i32.smin") (result i32) (return (i32.const -0x80000000))) + (func (export "i32.alt_smin") (result i32) (return (i32.const 0x80000000))) + (func (export "i32.inc_smin") (result i32) (return (i32.add (i32.const -0x80000000) (i32.const 1)))) + (func (export "i32.neg_zero") (result i32) (return (i32.const -0x0))) + (func (export "i32.not_octal") (result i32) (return (i32.const 010))) + (func (export "i32.unsigned_decimal") (result i32) (return (i32.const 4294967295))) + (func (export "i32.plus_sign") (result i32) (return (i32.const +42))) + + (func (export "i64.test") (result i64) (return (i64.const 0x0CABBA6E0ba66a6e))) + (func (export "i64.umax") (result i64) (return (i64.const 0xffffffffffffffff))) + (func (export "i64.smax") (result i64) (return (i64.const 0x7fffffffffffffff))) + (func (export "i64.neg_smax") (result i64) (return (i64.const -0x7fffffffffffffff))) + (func (export "i64.smin") (result i64) (return (i64.const -0x8000000000000000))) + (func (export "i64.alt_smin") (result i64) (return (i64.const 0x8000000000000000))) + (func (export "i64.inc_smin") (result i64) (return (i64.add (i64.const -0x8000000000000000) (i64.const 1)))) + (func (export "i64.neg_zero") (result i64) (return (i64.const -0x0))) + (func (export "i64.not_octal") (result i64) (return (i64.const 010))) + (func (export "i64.unsigned_decimal") (result i64) (return (i64.const 18446744073709551615))) + (func (export "i64.plus_sign") (result i64) (return (i64.const +42))) +) + +(assert_return (invoke "i32.test") (i32.const 195940365)) +(assert_return (invoke "i32.umax") (i32.const -1)) +(assert_return (invoke "i32.smax") (i32.const 2147483647)) +(assert_return (invoke "i32.neg_smax") (i32.const -2147483647)) +(assert_return (invoke "i32.smin") (i32.const -2147483648)) +(assert_return (invoke "i32.alt_smin") (i32.const -2147483648)) +(assert_return (invoke "i32.inc_smin") (i32.const -2147483647)) +(assert_return (invoke "i32.neg_zero") (i32.const 0)) +(assert_return (invoke "i32.not_octal") (i32.const 10)) +(assert_return (invoke "i32.unsigned_decimal") (i32.const -1)) +(assert_return (invoke "i32.plus_sign") (i32.const 42)) + +(assert_return (invoke "i64.test") (i64.const 913028331277281902)) +(assert_return (invoke "i64.umax") (i64.const -1)) +(assert_return (invoke "i64.smax") (i64.const 9223372036854775807)) +(assert_return (invoke "i64.neg_smax") (i64.const -9223372036854775807)) +(assert_return (invoke "i64.smin") (i64.const -9223372036854775808)) +(assert_return (invoke "i64.alt_smin") (i64.const -9223372036854775808)) +(assert_return (invoke "i64.inc_smin") (i64.const -9223372036854775807)) +(assert_return (invoke "i64.neg_zero") (i64.const 0)) +(assert_return (invoke "i64.not_octal") (i64.const 10)) +(assert_return (invoke "i64.unsigned_decimal") (i64.const -1)) +(assert_return (invoke "i64.plus_sign") (i64.const 42)) diff --git a/js/src/jit-test/tests/wasm/spec/int_literals.wast.js b/js/src/jit-test/tests/wasm/spec/int_literals.wast.js new file mode 100644 index 000000000..7de410c1d --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/int_literals.wast.js @@ -0,0 +1 @@ +var importedArgs = ['int_literals.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/labels.wast b/js/src/jit-test/tests/wasm/spec/labels.wast new file mode 100644 index 000000000..03e5bf722 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/labels.wast @@ -0,0 +1,308 @@ +(module + (func (export "block") (result i32) + (block $exit i32 + (br $exit (i32.const 1)) + (i32.const 0) + ) + ) + + (func (export "loop1") (result i32) + (local $i i32) + (set_local $i (i32.const 0)) + (block $exit i32 + (loop $cont i32 + (set_local $i (i32.add (get_local $i) (i32.const 1))) + (if (i32.eq (get_local $i) (i32.const 5)) + (br $exit (get_local $i)) + ) + (br $cont) + ) + ) + ) + + (func (export "loop2") (result i32) + (local $i i32) + (set_local $i (i32.const 0)) + (block $exit i32 + (loop $cont i32 + (set_local $i (i32.add (get_local $i) (i32.const 1))) + (if (i32.eq (get_local $i) (i32.const 5)) + (br $cont) + ) + (if (i32.eq (get_local $i) (i32.const 8)) + (br $exit (get_local $i)) + ) + (set_local $i (i32.add (get_local $i) (i32.const 1))) + (br $cont) + ) + ) + ) + + (func (export "loop3") (result i32) + (local $i i32) + (set_local $i (i32.const 0)) + (block $exit i32 + (loop $cont i32 + (set_local $i (i32.add (get_local $i) (i32.const 1))) + (if (i32.eq (get_local $i) (i32.const 5)) + (br $exit (get_local $i)) + ) + (get_local $i) + ) + ) + ) + + (func (export "loop4") (param $max i32) (result i32) + (local $i i32) + (set_local $i (i32.const 1)) + (block $exit i32 + (loop $cont i32 + (set_local $i (i32.add (get_local $i) (get_local $i))) + (if (i32.gt_u (get_local $i) (get_local $max)) + (br $exit (get_local $i)) + ) + (br $cont) + ) + ) + ) + + (func (export "loop5") (result i32) + (i32.add + (loop $l i32 (i32.const 1)) + (i32.const 1) + ) + ) + + (func (export "if") (result i32) + (local $i i32) + (set_local $i (i32.const 0)) + (block + (if $l + (i32.const 1) + (then (br $l) (set_local $i (i32.const 666))) + ) + (set_local $i (i32.add (get_local $i) (i32.const 1))) + (if $l + (i32.const 1) + (then (br $l) (set_local $i (i32.const 666))) + (else (set_local $i (i32.const 888))) + ) + (set_local $i (i32.add (get_local $i) (i32.const 1))) + (if $l + (i32.const 1) + (then (br $l) (set_local $i (i32.const 666))) + (else (set_local $i (i32.const 888))) + ) + (set_local $i (i32.add (get_local $i) (i32.const 1))) + (if $l + (i32.const 0) + (then (set_local $i (i32.const 888))) + (else (br $l) (set_local $i (i32.const 666))) + ) + (set_local $i (i32.add (get_local $i) (i32.const 1))) + (if $l + (i32.const 0) + (then (set_local $i (i32.const 888))) + (else (br $l) (set_local $i (i32.const 666))) + ) + (set_local $i (i32.add (get_local $i) (i32.const 1))) + ) + (get_local $i) + ) + + (func (export "if2") (result i32) + (local $i i32) + (set_local $i (i32.const 0)) + (block + (if + (i32.const 1) + (then (br 0) (set_local $i (i32.const 666))) + ) + (set_local $i (i32.add (get_local $i) (i32.const 1))) + (if + (i32.const 1) + (then (br 0) (set_local $i (i32.const 666))) + (else (set_local $i (i32.const 888))) + ) + (set_local $i (i32.add (get_local $i) (i32.const 1))) + (if + (i32.const 1) + (then (br 0) (set_local $i (i32.const 666))) + (else (set_local $i (i32.const 888))) + ) + (set_local $i (i32.add (get_local $i) (i32.const 1))) + (if + (i32.const 0) + (then (set_local $i (i32.const 888))) + (else (br 0) (set_local $i (i32.const 666))) + ) + (set_local $i (i32.add (get_local $i) (i32.const 1))) + (if + (i32.const 0) + (then (set_local $i (i32.const 888))) + (else (br 0) (set_local $i (i32.const 666))) + ) + (set_local $i (i32.add (get_local $i) (i32.const 1))) + ) + (get_local $i) + ) + + (func (export "switch") (param i32) (result i32) + (block $ret i32 + (i32.mul (i32.const 10) + (block $exit i32 + (block $0 + (block $default + (block $3 + (block $2 + (block $1 + (br_table $0 $1 $2 $3 $default (get_local 0)) + ) ;; 1 + ) ;; 2 + (br $exit (i32.const 2)) + ) ;; 3 + (br $ret (i32.const 3)) + ) ;; default + ) ;; 0 + (i32.const 5) + ) + ) + ) + ) + + (func (export "return") (param i32) (result i32) + (block $default + (block $1 + (block $0 + (br_table $0 $1 (get_local 0)) + (br $default) + ) ;; 0 + (return (i32.const 0)) + ) ;; 1 + ) ;; default + (i32.const 2) + ) + + (func (export "br_if0") (result i32) + (local $i i32) + (set_local $i (i32.const 0)) + (block $outer i32 + (block $inner + (br_if $inner (i32.const 0)) + (set_local $i (i32.or (get_local $i) (i32.const 0x1))) + (br_if $inner (i32.const 1)) + (set_local $i (i32.or (get_local $i) (i32.const 0x2))) + ) + (drop (br_if $outer + (block i32 + (set_local $i (i32.or (get_local $i) (i32.const 0x4))) + (get_local $i) + ) + (i32.const 0) + )) + (set_local $i (i32.or (get_local $i) (i32.const 0x8))) + (drop (br_if $outer + (block i32 + (set_local $i (i32.or (get_local $i) (i32.const 0x10))) + (get_local $i) + ) + (i32.const 1) + )) + (set_local $i (i32.or (get_local $i) (i32.const 0x20))) (get_local $i) + ) + ) + + (func (export "br_if1") (result i32) + (block $l0 i32 + (drop (br_if $l0 (block $l1 i32 (br $l1 (i32.const 1))) (i32.const 1))) + (i32.const 1) + ) + ) + + (func (export "br_if2") (result i32) + (block $l0 i32 + (if (i32.const 1) + (br $l0 (block $l1 i32 (br $l1 (i32.const 1)))) + ) + (i32.const 1) + ) + ) + + (func (export "br_if3") (result i32) + (local $i1 i32) + (drop + (i32.add + (block $l0 i32 + (drop (br_if $l0 + (block i32 (set_local $i1 (i32.const 1)) (get_local $i1)) + (block i32 (set_local $i1 (i32.const 2)) (get_local $i1)) + )) + (i32.const 0) + ) + (i32.const 0) + ) + ) + (get_local $i1) + ) + + (func (export "br") (result i32) + (block $l0 i32 + (if (i32.const 1) + (br $l0 (block $l1 i32 (br $l1 (i32.const 1)))) + (block (drop (block $l1 i32 (br $l1 (i32.const 1))))) + ) + (i32.const 1) + ) + ) + + (func (export "shadowing") (result i32) + (block $l1 i32 (i32.xor (br $l1 (i32.const 1)) (i32.const 2))) + ) + + (func (export "redefinition") (result i32) + (block $l1 i32 + (i32.add + (block $l1 i32 (i32.const 2)) + (block $l1 i32 (br $l1 (i32.const 3))) + ) + ) + ) +) + +(assert_return (invoke "block") (i32.const 1)) +(assert_return (invoke "loop1") (i32.const 5)) +(assert_return (invoke "loop2") (i32.const 8)) +(assert_return (invoke "loop3") (i32.const 1)) +(assert_return (invoke "loop4" (i32.const 8)) (i32.const 16)) +(assert_return (invoke "loop5") (i32.const 2)) +(assert_return (invoke "if") (i32.const 5)) +(assert_return (invoke "if2") (i32.const 5)) +(assert_return (invoke "switch" (i32.const 0)) (i32.const 50)) +(assert_return (invoke "switch" (i32.const 1)) (i32.const 20)) +(assert_return (invoke "switch" (i32.const 2)) (i32.const 20)) +(assert_return (invoke "switch" (i32.const 3)) (i32.const 3)) +(assert_return (invoke "switch" (i32.const 4)) (i32.const 50)) +(assert_return (invoke "switch" (i32.const 5)) (i32.const 50)) +(assert_return (invoke "return" (i32.const 0)) (i32.const 0)) +(assert_return (invoke "return" (i32.const 1)) (i32.const 2)) +(assert_return (invoke "return" (i32.const 2)) (i32.const 2)) +(assert_return (invoke "br_if0") (i32.const 0x1d)) +(assert_return (invoke "br_if1") (i32.const 1)) +(assert_return (invoke "br_if2") (i32.const 1)) +(assert_return (invoke "br_if3") (i32.const 2)) +(assert_return (invoke "br") (i32.const 1)) +(assert_return (invoke "shadowing") (i32.const 1)) +(assert_return (invoke "redefinition") (i32.const 5)) + +(assert_invalid + (module (func (block $l (f32.neg (br_if $l (i32.const 1))) (nop)))) + "type mismatch" +) +(assert_invalid + (module (func (block $l (br_if $l (f32.const 0) (i32.const 1))))) + "type mismatch" +) +(assert_invalid + (module (func (block $l (br_if $l (f32.const 0) (i32.const 1))))) + "type mismatch" +) diff --git a/js/src/jit-test/tests/wasm/spec/labels.wast.js b/js/src/jit-test/tests/wasm/spec/labels.wast.js new file mode 100644 index 000000000..beffdf2c6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/labels.wast.js @@ -0,0 +1 @@ +var importedArgs = ['labels.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/left-to-right.wast b/js/src/jit-test/tests/wasm/spec/left-to-right.wast new file mode 100644 index 000000000..7eeda94a8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/left-to-right.wast @@ -0,0 +1,233 @@ +(module + (memory 1) + + (type $i32_T (func (param i32 i32) (result i32))) + (type $i64_T (func (param i64 i64) (result i32))) + (type $f32_T (func (param f32 f32) (result i32))) + (type $f64_T (func (param f64 f64) (result i32))) + (table anyfunc + (elem $i32_t0 $i32_t1 $i64_t0 $i64_t1 $f32_t0 $f32_t1 $f64_t0 $f64_t1) + ) + + (func $i32_t0 (type $i32_T) (i32.const -1)) + (func $i32_t1 (type $i32_T) (i32.const -2)) + (func $i64_t0 (type $i64_T) (i32.const -1)) + (func $i64_t1 (type $i64_T) (i32.const -2)) + (func $f32_t0 (type $f32_T) (i32.const -1)) + (func $f32_t1 (type $f32_T) (i32.const -2)) + (func $f64_t0 (type $f64_T) (i32.const -1)) + (func $f64_t1 (type $f64_T) (i32.const -2)) + + ;; The idea is: We reset the memory, then the instruction call $*_left, + ;; $*_right, $*_another, $*_callee (for indirect calls), and $*_bool (when a + ;; boolean value is needed). These functions all call bump, which shifts the + ;; memory starting at address 8 up a byte, and then store a unique value at + ;; address 8. Then we read the 4-byte value at address 8. It should contain + ;; the correct sequence of unique values if the calls were evaluated in the + ;; correct order. + + (func $reset (i32.store (i32.const 8) (i32.const 0))) + + (func $bump + (i32.store8 (i32.const 11) (i32.load8_u (i32.const 10))) + (i32.store8 (i32.const 10) (i32.load8_u (i32.const 9))) + (i32.store8 (i32.const 9) (i32.load8_u (i32.const 8))) + (i32.store8 (i32.const 8) (i32.const -3))) + + (func $get (result i32) (i32.load (i32.const 8))) + + (func $i32_left (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 1)) (i32.const 0)) + (func $i32_right (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 2)) (i32.const 1)) + (func $i32_another (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 3)) (i32.const 1)) + (func $i32_callee (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 4)) (i32.const 0)) + (func $i32_bool (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 5)) (i32.const 0)) + (func $i64_left (result i64) (call $bump) (i32.store8 (i32.const 8) (i32.const 1)) (i64.const 0)) + (func $i64_right (result i64) (call $bump) (i32.store8 (i32.const 8) (i32.const 2)) (i64.const 1)) + (func $i64_another (result i64) (call $bump) (i32.store8 (i32.const 8) (i32.const 3)) (i64.const 1)) + (func $i64_callee (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 4)) (i32.const 2)) + (func $i64_bool (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 5)) (i32.const 0)) + (func $f32_left (result f32) (call $bump) (i32.store8 (i32.const 8) (i32.const 1)) (f32.const 0)) + (func $f32_right (result f32) (call $bump) (i32.store8 (i32.const 8) (i32.const 2)) (f32.const 1)) + (func $f32_another (result f32) (call $bump) (i32.store8 (i32.const 8) (i32.const 3)) (f32.const 1)) + (func $f32_callee (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 4)) (i32.const 4)) + (func $f32_bool (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 5)) (i32.const 0)) + (func $f64_left (result f64) (call $bump) (i32.store8 (i32.const 8) (i32.const 1)) (f64.const 0)) + (func $f64_right (result f64) (call $bump) (i32.store8 (i32.const 8) (i32.const 2)) (f64.const 1)) + (func $f64_another (result f64) (call $bump) (i32.store8 (i32.const 8) (i32.const 3)) (f64.const 1)) + (func $f64_callee (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 4)) (i32.const 6)) + (func $f64_bool (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 5)) (i32.const 0)) + (func $i32_dummy (param i32 i32)) + (func $i64_dummy (param i64 i64)) + (func $f32_dummy (param f32 f32)) + (func $f64_dummy (param f64 f64)) + + (func (export "i32_add") (result i32) (call $reset) (drop (i32.add (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_sub") (result i32) (call $reset) (drop (i32.sub (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_mul") (result i32) (call $reset) (drop (i32.mul (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_div_s") (result i32) (call $reset) (drop (i32.div_s (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_div_u") (result i32) (call $reset) (drop (i32.div_u (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_rem_s") (result i32) (call $reset) (drop (i32.rem_s (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_rem_u") (result i32) (call $reset) (drop (i32.rem_u (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_and") (result i32) (call $reset) (drop (i32.and (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_or") (result i32) (call $reset) (drop (i32.or (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_xor") (result i32) (call $reset) (drop (i32.xor (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_shl") (result i32) (call $reset) (drop (i32.shl (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_shr_u") (result i32) (call $reset) (drop (i32.shr_u (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_shr_s") (result i32) (call $reset) (drop (i32.shr_s (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_eq") (result i32) (call $reset) (drop (i32.eq (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_ne") (result i32) (call $reset) (drop (i32.ne (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_lt_s") (result i32) (call $reset) (drop (i32.lt_s (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_le_s") (result i32) (call $reset) (drop (i32.le_s (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_lt_u") (result i32) (call $reset) (drop (i32.lt_u (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_le_u") (result i32) (call $reset) (drop (i32.le_u (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_gt_s") (result i32) (call $reset) (drop (i32.gt_s (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_ge_s") (result i32) (call $reset) (drop (i32.ge_s (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_gt_u") (result i32) (call $reset) (drop (i32.gt_u (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_ge_u") (result i32) (call $reset) (drop (i32.ge_u (call $i32_left) (call $i32_right))) (call $get)) + (func (export "i32_store") (result i32) (call $reset) (i32.store (call $i32_left) (call $i32_right)) (call $get)) + (func (export "i32_store8") (result i32) (call $reset) (i32.store8 (call $i32_left) (call $i32_right)) (call $get)) + (func (export "i32_store16") (result i32) (call $reset) (i32.store16 (call $i32_left) (call $i32_right)) (call $get)) + (func (export "i32_call") (result i32) (call $reset) (call $i32_dummy (call $i32_left) (call $i32_right)) (call $get)) + (func (export "i32_call_indirect") (result i32) (call $reset) (drop (call_indirect $i32_T (call $i32_left) (call $i32_right) (call $i32_callee))) (call $get)) + (func (export "i32_select") (result i32) (call $reset) (drop (select (call $i32_left) (call $i32_right) (call $i32_bool))) (call $get)) + + (func (export "i64_add") (result i32) (call $reset) (drop (i64.add (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_sub") (result i32) (call $reset) (drop (i64.sub (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_mul") (result i32) (call $reset) (drop (i64.mul (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_div_s") (result i32) (call $reset) (drop (i64.div_s (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_div_u") (result i32) (call $reset) (drop (i64.div_u (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_rem_s") (result i32) (call $reset) (drop (i64.rem_s (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_rem_u") (result i32) (call $reset) (drop (i64.rem_u (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_and") (result i32) (call $reset) (drop (i64.and (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_or") (result i32) (call $reset) (drop (i64.or (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_xor") (result i32) (call $reset) (drop (i64.xor (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_shl") (result i32) (call $reset) (drop (i64.shl (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_shr_u") (result i32) (call $reset) (drop (i64.shr_u (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_shr_s") (result i32) (call $reset) (drop (i64.shr_s (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_eq") (result i32) (call $reset) (drop (i64.eq (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_ne") (result i32) (call $reset) (drop (i64.ne (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_lt_s") (result i32) (call $reset) (drop (i64.lt_s (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_le_s") (result i32) (call $reset) (drop (i64.le_s (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_lt_u") (result i32) (call $reset) (drop (i64.lt_u (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_le_u") (result i32) (call $reset) (drop (i64.le_u (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_gt_s") (result i32) (call $reset) (drop (i64.gt_s (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_ge_s") (result i32) (call $reset) (drop (i64.ge_s (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_gt_u") (result i32) (call $reset) (drop (i64.gt_u (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_ge_u") (result i32) (call $reset) (drop (i64.ge_u (call $i64_left) (call $i64_right))) (call $get)) + (func (export "i64_store") (result i32) (call $reset) (i64.store (call $i32_left) (call $i64_right)) (call $get)) + (func (export "i64_store8") (result i32) (call $reset) (i64.store8 (call $i32_left) (call $i64_right)) (call $get)) + (func (export "i64_store16") (result i32) (call $reset) (i64.store16 (call $i32_left) (call $i64_right)) (call $get)) + (func (export "i64_store32") (result i32) (call $reset) (i64.store32 (call $i32_left) (call $i64_right)) (call $get)) + (func (export "i64_call") (result i32) (call $reset) (call $i64_dummy (call $i64_left) (call $i64_right)) (call $get)) + (func (export "i64_call_indirect") (result i32) (call $reset) (drop (call_indirect $i64_T (call $i64_left) (call $i64_right) (call $i64_callee))) (call $get)) + (func (export "i64_select") (result i32) (call $reset) (drop (select (call $i64_left) (call $i64_right) (call $i64_bool))) (call $get)) + + (func (export "f32_add") (result i32) (call $reset) (drop (f32.add (call $f32_left) (call $f32_right))) (call $get)) + (func (export "f32_sub") (result i32) (call $reset) (drop (f32.sub (call $f32_left) (call $f32_right))) (call $get)) + (func (export "f32_mul") (result i32) (call $reset) (drop (f32.mul (call $f32_left) (call $f32_right))) (call $get)) + (func (export "f32_div") (result i32) (call $reset) (drop (f32.div (call $f32_left) (call $f32_right))) (call $get)) + (func (export "f32_copysign") (result i32) (call $reset) (drop (f32.copysign (call $f32_left) (call $f32_right))) (call $get)) + (func (export "f32_eq") (result i32) (call $reset) (drop (f32.eq (call $f32_left) (call $f32_right))) (call $get)) + (func (export "f32_ne") (result i32) (call $reset) (drop (f32.ne (call $f32_left) (call $f32_right))) (call $get)) + (func (export "f32_lt") (result i32) (call $reset) (drop (f32.lt (call $f32_left) (call $f32_right))) (call $get)) + (func (export "f32_le") (result i32) (call $reset) (drop (f32.le (call $f32_left) (call $f32_right))) (call $get)) + (func (export "f32_gt") (result i32) (call $reset) (drop (f32.gt (call $f32_left) (call $f32_right))) (call $get)) + (func (export "f32_ge") (result i32) (call $reset) (drop (f32.ge (call $f32_left) (call $f32_right))) (call $get)) + (func (export "f32_min") (result i32) (call $reset) (drop (f32.min (call $f32_left) (call $f32_right))) (call $get)) + (func (export "f32_max") (result i32) (call $reset) (drop (f32.max (call $f32_left) (call $f32_right))) (call $get)) + (func (export "f32_store") (result i32) (call $reset) (f32.store (call $i32_left) (call $f32_right)) (call $get)) + (func (export "f32_call") (result i32) (call $reset) (call $f32_dummy (call $f32_left) (call $f32_right)) (call $get)) + (func (export "f32_call_indirect") (result i32) (call $reset) (drop (call_indirect $f32_T (call $f32_left) (call $f32_right) (call $f32_callee))) (call $get)) + (func (export "f32_select") (result i32) (call $reset) (drop (select (call $f32_left) (call $f32_right) (call $f32_bool))) (call $get)) + + (func (export "f64_add") (result i32) (call $reset) (drop (f64.add (call $f64_left) (call $f64_right))) (call $get)) + (func (export "f64_sub") (result i32) (call $reset) (drop (f64.sub (call $f64_left) (call $f64_right))) (call $get)) + (func (export "f64_mul") (result i32) (call $reset) (drop (f64.mul (call $f64_left) (call $f64_right))) (call $get)) + (func (export "f64_div") (result i32) (call $reset) (drop (f64.div (call $f64_left) (call $f64_right))) (call $get)) + (func (export "f64_copysign") (result i32) (call $reset) (drop (f64.copysign (call $f64_left) (call $f64_right))) (call $get)) + (func (export "f64_eq") (result i32) (call $reset) (drop (f64.eq (call $f64_left) (call $f64_right))) (call $get)) + (func (export "f64_ne") (result i32) (call $reset) (drop (f64.ne (call $f64_left) (call $f64_right))) (call $get)) + (func (export "f64_lt") (result i32) (call $reset) (drop (f64.lt (call $f64_left) (call $f64_right))) (call $get)) + (func (export "f64_le") (result i32) (call $reset) (drop (f64.le (call $f64_left) (call $f64_right))) (call $get)) + (func (export "f64_gt") (result i32) (call $reset) (drop (f64.gt (call $f64_left) (call $f64_right))) (call $get)) + (func (export "f64_ge") (result i32) (call $reset) (drop (f64.ge (call $f64_left) (call $f64_right))) (call $get)) + (func (export "f64_min") (result i32) (call $reset) (drop (f64.min (call $f64_left) (call $f64_right))) (call $get)) + (func (export "f64_max") (result i32) (call $reset) (drop (f64.max (call $f64_left) (call $f64_right))) (call $get)) + (func (export "f64_store") (result i32) (call $reset) (f64.store (call $i32_left) (call $f64_right)) (call $get)) + (func (export "f64_call") (result i32) (call $reset) (call $f64_dummy (call $f64_left) (call $f64_right)) (call $get)) + (func (export "f64_call_indirect") (result i32) (call $reset) (drop (call_indirect $f64_T (call $f64_left) (call $f64_right) (call $f64_callee))) (call $get)) + (func (export "f64_select") (result i32) (call $reset) (drop (select (call $f64_left) (call $f64_right) (call $f64_bool))) (call $get)) + + (func (export "br_if") (result i32) + (block i32 + (call $reset) + (drop (br_if 0 (call $i32_left) (i32.and (call $i32_right) (i32.const 0)))) + (call $get) + ) + ) + (func (export "br_table") (result i32) + (block $a i32 + (call $reset) + (drop + (block $b i32 + (br_table $a $b (call $i32_left) (call $i32_right)) + ) + ) + (call $get) + ) + ) +) + +(assert_return (invoke "i32_add") (i32.const 0x0102)) (assert_return (invoke "i64_add") (i32.const 0x0102)) +(assert_return (invoke "i32_sub") (i32.const 0x0102)) (assert_return (invoke "i64_sub") (i32.const 0x0102)) +(assert_return (invoke "i32_mul") (i32.const 0x0102)) (assert_return (invoke "i64_mul") (i32.const 0x0102)) +(assert_return (invoke "i32_div_s") (i32.const 0x0102)) (assert_return (invoke "i64_div_s") (i32.const 0x0102)) +(assert_return (invoke "i32_div_u") (i32.const 0x0102)) (assert_return (invoke "i64_div_u") (i32.const 0x0102)) +(assert_return (invoke "i32_rem_s") (i32.const 0x0102)) (assert_return (invoke "i64_rem_s") (i32.const 0x0102)) +(assert_return (invoke "i32_rem_u") (i32.const 0x0102)) (assert_return (invoke "i64_rem_u") (i32.const 0x0102)) +(assert_return (invoke "i32_and") (i32.const 0x0102)) (assert_return (invoke "i64_and") (i32.const 0x0102)) +(assert_return (invoke "i32_or") (i32.const 0x0102)) (assert_return (invoke "i64_or") (i32.const 0x0102)) +(assert_return (invoke "i32_xor") (i32.const 0x0102)) (assert_return (invoke "i64_xor") (i32.const 0x0102)) +(assert_return (invoke "i32_shl") (i32.const 0x0102)) (assert_return (invoke "i64_shl") (i32.const 0x0102)) +(assert_return (invoke "i32_shr_u") (i32.const 0x0102)) (assert_return (invoke "i64_shr_u") (i32.const 0x0102)) +(assert_return (invoke "i32_shr_s") (i32.const 0x0102)) (assert_return (invoke "i64_shr_s") (i32.const 0x0102)) +(assert_return (invoke "i32_eq") (i32.const 0x0102)) (assert_return (invoke "i64_eq") (i32.const 0x0102)) +(assert_return (invoke "i32_ne") (i32.const 0x0102)) (assert_return (invoke "i64_ne") (i32.const 0x0102)) +(assert_return (invoke "i32_lt_s") (i32.const 0x0102)) (assert_return (invoke "i64_lt_s") (i32.const 0x0102)) +(assert_return (invoke "i32_le_s") (i32.const 0x0102)) (assert_return (invoke "i64_le_s") (i32.const 0x0102)) +(assert_return (invoke "i32_lt_u") (i32.const 0x0102)) (assert_return (invoke "i64_lt_u") (i32.const 0x0102)) +(assert_return (invoke "i32_le_u") (i32.const 0x0102)) (assert_return (invoke "i64_le_u") (i32.const 0x0102)) +(assert_return (invoke "i32_gt_s") (i32.const 0x0102)) (assert_return (invoke "i64_gt_s") (i32.const 0x0102)) +(assert_return (invoke "i32_ge_s") (i32.const 0x0102)) (assert_return (invoke "i64_ge_s") (i32.const 0x0102)) +(assert_return (invoke "i32_gt_u") (i32.const 0x0102)) (assert_return (invoke "i64_gt_u") (i32.const 0x0102)) +(assert_return (invoke "i32_ge_u") (i32.const 0x0102)) (assert_return (invoke "i64_ge_u") (i32.const 0x0102)) +(assert_return (invoke "i32_store") (i32.const 0x0102)) (assert_return (invoke "i64_store") (i32.const 0x0102)) +(assert_return (invoke "i32_store8") (i32.const 0x0102)) (assert_return (invoke "i64_store8") (i32.const 0x0102)) +(assert_return (invoke "i32_store16") (i32.const 0x0102)) (assert_return (invoke "i64_store16") (i32.const 0x0102)) +(assert_return (invoke "i64_store32") (i32.const 0x0102)) +(assert_return (invoke "i32_call") (i32.const 0x0102)) (assert_return (invoke "i64_call") (i32.const 0x0102)) +(assert_return (invoke "i32_call_indirect") (i32.const 0x010204)) +(assert_return (invoke "i64_call_indirect") (i32.const 0x010204)) +(assert_return (invoke "i32_select") (i32.const 0x010205)) (assert_return (invoke "i64_select") (i32.const 0x010205)) + +(assert_return (invoke "f32_add") (i32.const 0x0102)) (assert_return (invoke "f64_add") (i32.const 0x0102)) +(assert_return (invoke "f32_sub") (i32.const 0x0102)) (assert_return (invoke "f64_sub") (i32.const 0x0102)) +(assert_return (invoke "f32_mul") (i32.const 0x0102)) (assert_return (invoke "f64_mul") (i32.const 0x0102)) +(assert_return (invoke "f32_div") (i32.const 0x0102)) (assert_return (invoke "f64_div") (i32.const 0x0102)) +(assert_return (invoke "f32_copysign") (i32.const 0x0102))(assert_return (invoke "f64_copysign") (i32.const 0x0102)) +(assert_return (invoke "f32_eq") (i32.const 0x0102)) (assert_return (invoke "f64_eq") (i32.const 0x0102)) +(assert_return (invoke "f32_ne") (i32.const 0x0102)) (assert_return (invoke "f64_ne") (i32.const 0x0102)) +(assert_return (invoke "f32_lt") (i32.const 0x0102)) (assert_return (invoke "f64_lt") (i32.const 0x0102)) +(assert_return (invoke "f32_le") (i32.const 0x0102)) (assert_return (invoke "f64_le") (i32.const 0x0102)) +(assert_return (invoke "f32_gt") (i32.const 0x0102)) (assert_return (invoke "f64_gt") (i32.const 0x0102)) +(assert_return (invoke "f32_ge") (i32.const 0x0102)) (assert_return (invoke "f64_ge") (i32.const 0x0102)) +(assert_return (invoke "f32_min") (i32.const 0x0102)) (assert_return (invoke "f64_min") (i32.const 0x0102)) +(assert_return (invoke "f32_max") (i32.const 0x0102)) (assert_return (invoke "f64_max") (i32.const 0x0102)) +(assert_return (invoke "f32_store") (i32.const 0x0102)) (assert_return (invoke "f64_store") (i32.const 0x0102)) +(assert_return (invoke "f32_call") (i32.const 0x0102)) (assert_return (invoke "f64_call") (i32.const 0x0102)) +(assert_return (invoke "f32_call_indirect") (i32.const 0x010204)) +(assert_return (invoke "f64_call_indirect") (i32.const 0x010204)) +(assert_return (invoke "f32_select") (i32.const 0x010205)) (assert_return (invoke "f64_select") (i32.const 0x010205)) + +(assert_return (invoke "br_if") (i32.const 0x0102)) +(assert_return (invoke "br_table") (i32.const 0x0102)) diff --git a/js/src/jit-test/tests/wasm/spec/left-to-right.wast.js b/js/src/jit-test/tests/wasm/spec/left-to-right.wast.js new file mode 100644 index 000000000..fb38a5f59 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/left-to-right.wast.js @@ -0,0 +1 @@ +var importedArgs = ['left-to-right.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/linking.wast b/js/src/jit-test/tests/wasm/spec/linking.wast new file mode 100644 index 000000000..3d186a0e4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/linking.wast @@ -0,0 +1,241 @@ +;; Functions + +(module $Mf + (func (export "call") (result i32) (call $g)) + (func $g (result i32) (i32.const 2)) +) +(register "Mf" $Mf) + +(module $Nf + (func $f (import "Mf" "call") (result i32)) + (export "Mf.call" (func $f)) + (func (export "call Mf.call") (result i32) (call $f)) + (func (export "call") (result i32) (call $g)) + (func $g (result i32) (i32.const 3)) +) + +(assert_return (invoke $Mf "call") (i32.const 2)) +(assert_return (invoke $Nf "Mf.call") (i32.const 2)) +(assert_return (invoke $Nf "call") (i32.const 3)) +(assert_return (invoke $Nf "call Mf.call") (i32.const 2)) + +(module + (import "spectest" "print" (func $f (param i32))) + (export "print" (func $f)) +) +(register "reexport_f") +(assert_unlinkable + (module (import "reexport_f" "print" (func (param i64)))) + "type mismatch" +) +(assert_unlinkable + (module (import "reexport_f" "print" (func (param i32) (result i32)))) + "type mismatch" +) + + +;; Globals + +(module $Mg + (global $glob (export "glob") i32 (i32.const 42)) + (func (export "get") (result i32) (get_global $glob)) +) +(register "Mg" $Mg) + +(module $Ng + (global $x (import "Mg" "glob") i32) + (func $f (import "Mg" "get") (result i32)) + (export "Mg.glob" (global $x)) + (export "Mg.get" (func $f)) + (global $glob (export "glob") i32 (i32.const 43)) + (func (export "get") (result i32) (get_global $glob)) +) + +(assert_return (get $Mg "glob") (i32.const 42)) +(assert_return (get $Ng "Mg.glob") (i32.const 42)) +(assert_return (get $Ng "glob") (i32.const 43)) +(assert_return (invoke $Mg "get") (i32.const 42)) +(assert_return (invoke $Ng "Mg.get") (i32.const 42)) +(assert_return (invoke $Ng "get") (i32.const 43)) + + +;; Tables + +(module $Mt + (type (func (result i32))) + (type (func)) + + (table (export "tab") 10 anyfunc) + (elem (i32.const 2) $g $g $g $g) + (func $g (result i32) (i32.const 4)) + (func (export "h") (result i32) (i32.const -4)) + + (func (export "call") (param i32) (result i32) + (call_indirect 0 (get_local 0)) + ) +) +(register "Mt" $Mt) + +(module $Nt + (type (func)) + (type (func (result i32))) + + (func $f (import "Mt" "call") (param i32) (result i32)) + (func $h (import "Mt" "h") (result i32)) + + (table anyfunc (elem $g $g $g $h $f)) + (func $g (result i32) (i32.const 5)) + + (export "Mt.call" (func $f)) + (func (export "call Mt.call") (param i32) (result i32) + (call $f (get_local 0)) + ) + (func (export "call") (param i32) (result i32) + (call_indirect 1 (get_local 0)) + ) +) + +(assert_return (invoke $Mt "call" (i32.const 2)) (i32.const 4)) +(assert_return (invoke $Nt "Mt.call" (i32.const 2)) (i32.const 4)) +(assert_return (invoke $Nt "call" (i32.const 2)) (i32.const 5)) +(assert_return (invoke $Nt "call Mt.call" (i32.const 2)) (i32.const 4)) + +(assert_trap (invoke $Mt "call" (i32.const 1)) "uninitialized") +(assert_trap (invoke $Nt "Mt.call" (i32.const 1)) "uninitialized") +(assert_return (invoke $Nt "call" (i32.const 1)) (i32.const 5)) +(assert_trap (invoke $Nt "call Mt.call" (i32.const 1)) "uninitialized") + +(assert_trap (invoke $Mt "call" (i32.const 0)) "uninitialized") +(assert_trap (invoke $Nt "Mt.call" (i32.const 0)) "uninitialized") +(assert_return (invoke $Nt "call" (i32.const 0)) (i32.const 5)) +(assert_trap (invoke $Nt "call Mt.call" (i32.const 0)) "uninitialized") + +(assert_trap (invoke $Mt "call" (i32.const 20)) "undefined") +(assert_trap (invoke $Nt "Mt.call" (i32.const 20)) "undefined") +(assert_trap (invoke $Nt "call" (i32.const 7)) "undefined") +(assert_trap (invoke $Nt "call Mt.call" (i32.const 20)) "undefined") + +(assert_return (invoke $Nt "call" (i32.const 3)) (i32.const -4)) +(assert_trap (invoke $Nt "call" (i32.const 4)) "indirect call") + +(module $Ot + (type (func (result i32))) + + (func $h (import "Mt" "h") (result i32)) + (table (import "Mt" "tab") 5 anyfunc) + (elem (i32.const 1) $i $h) + (func $i (result i32) (i32.const 6)) + + (func (export "call") (param i32) (result i32) + (call_indirect 0 (get_local 0)) + ) +) + +(assert_return (invoke $Mt "call" (i32.const 3)) (i32.const 4)) +(assert_return (invoke $Nt "Mt.call" (i32.const 3)) (i32.const 4)) +(assert_return (invoke $Nt "call Mt.call" (i32.const 3)) (i32.const 4)) +(assert_return (invoke $Ot "call" (i32.const 3)) (i32.const 4)) + +(assert_return (invoke $Mt "call" (i32.const 2)) (i32.const -4)) +(assert_return (invoke $Nt "Mt.call" (i32.const 2)) (i32.const -4)) +(assert_return (invoke $Nt "call" (i32.const 2)) (i32.const 5)) +(assert_return (invoke $Nt "call Mt.call" (i32.const 2)) (i32.const -4)) +(assert_return (invoke $Ot "call" (i32.const 2)) (i32.const -4)) + +(assert_return (invoke $Mt "call" (i32.const 1)) (i32.const 6)) +(assert_return (invoke $Nt "Mt.call" (i32.const 1)) (i32.const 6)) +(assert_return (invoke $Nt "call" (i32.const 1)) (i32.const 5)) +(assert_return (invoke $Nt "call Mt.call" (i32.const 1)) (i32.const 6)) +(assert_return (invoke $Ot "call" (i32.const 1)) (i32.const 6)) + +(assert_trap (invoke $Mt "call" (i32.const 0)) "uninitialized") +(assert_trap (invoke $Nt "Mt.call" (i32.const 0)) "uninitialized") +(assert_return (invoke $Nt "call" (i32.const 0)) (i32.const 5)) +(assert_trap (invoke $Nt "call Mt.call" (i32.const 0)) "uninitialized") +(assert_trap (invoke $Ot "call" (i32.const 0)) "uninitialized") + +(assert_trap (invoke $Ot "call" (i32.const 20)) "undefined") + +(assert_unlinkable + (module + (func $host (import "spectest" "print")) + (table (import "Mt" "tab") 10 anyfunc) + (memory (import "Mt" "mem") 1) ;; does not exist + (elem (i32.const 7) $own) + (elem (i32.const 9) $host) + (func $own (result i32) (i32.const 666)) + ) + "unknown import" +) +(assert_trap (invoke $Mt "call" (i32.const 7)) "uninitialized") + + +;; Memories + +(module $Mm + (memory (export "mem") 1 5) + (data (i32.const 10) "\00\01\02\03\04\05\06\07\08\09") + + (func (export "load") (param $a i32) (result i32) + (i32.load8_u (get_local 0)) + ) +) +(register "Mm" $Mm) + +(module $Nm + (func $loadM (import "Mm" "load") (param i32) (result i32)) + + (memory 1) + (data (i32.const 10) "\f0\f1\f2\f3\f4\f5") + + (export "Mm.load" (func $loadM)) + (func (export "load") (param $a i32) (result i32) + (i32.load8_u (get_local 0)) + ) +) + +(assert_return (invoke $Mm "load" (i32.const 12)) (i32.const 2)) +(assert_return (invoke $Nm "Mm.load" (i32.const 12)) (i32.const 2)) +(assert_return (invoke $Nm "load" (i32.const 12)) (i32.const 0xf2)) + +(module $Om + (memory (import "Mm" "mem") 1) + (data (i32.const 5) "\a0\a1\a2\a3\a4\a5\a6\a7") + + (func (export "load") (param $a i32) (result i32) + (i32.load8_u (get_local 0)) + ) +) + +(assert_return (invoke $Mm "load" (i32.const 12)) (i32.const 0xa7)) +(assert_return (invoke $Nm "Mm.load" (i32.const 12)) (i32.const 0xa7)) +(assert_return (invoke $Nm "load" (i32.const 12)) (i32.const 0xf2)) +(assert_return (invoke $Om "load" (i32.const 12)) (i32.const 0xa7)) + +(module $Pm + (memory (import "Mm" "mem") 1 8) + + (func (export "grow") (param $a i32) (result i32) + (grow_memory (get_local 0)) + ) +) + +(assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 1)) +(assert_return (invoke $Pm "grow" (i32.const 2)) (i32.const 1)) +(assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 3)) +(assert_return (invoke $Pm "grow" (i32.const 1)) (i32.const 3)) +(assert_return (invoke $Pm "grow" (i32.const 1)) (i32.const 4)) +(assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 5)) +(assert_return (invoke $Pm "grow" (i32.const 1)) (i32.const -1)) +(assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 5)) + +(assert_unlinkable + (module + (func $host (import "spectest" "print")) + (memory (import "Mm" "mem") 1) + (table (import "Mm" "tab") 0 anyfunc) ;; does not exist + (data (i32.const 0) "abc") + ) + "unknown import" +) +(assert_return (invoke $Mm "load" (i32.const 0)) (i32.const 0)) diff --git a/js/src/jit-test/tests/wasm/spec/linking.wast.js b/js/src/jit-test/tests/wasm/spec/linking.wast.js new file mode 100644 index 000000000..f6ceb5d1e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/linking.wast.js @@ -0,0 +1 @@ +var importedArgs = ['linking.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/loop.wast b/js/src/jit-test/tests/wasm/spec/loop.wast new file mode 100644 index 000000000..ee040c387 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/loop.wast @@ -0,0 +1,254 @@ +;; Test `loop` opcode + +(module + (func $dummy) + + (func (export "empty") + (loop) + (loop $l) + ) + + (func (export "singular") (result i32) + (loop (nop)) + (loop i32 (i32.const 7)) + ) + + (func (export "multi") (result i32) + (loop (call $dummy) (call $dummy) (call $dummy) (call $dummy)) + (loop i32 (call $dummy) (call $dummy) (call $dummy) (i32.const 8)) + ) + + (func (export "nested") (result i32) + (loop i32 + (loop (call $dummy) (block) (nop)) + (loop i32 (call $dummy) (i32.const 9)) + ) + ) + + (func (export "deep") (result i32) + (loop i32 (block i32 (loop i32 (block i32 (loop i32 (block i32 + (loop i32 (block i32 (loop i32 (block i32 (loop i32 (block i32 + (loop i32 (block i32 (loop i32 (block i32 (loop i32 (block i32 + (loop i32 (block i32 (loop i32 (block i32 (loop i32 (block i32 + (loop i32 (block i32 (loop i32 (block i32 (loop i32 (block i32 + (loop i32 (block i32 (loop i32 (block i32 (loop i32 (block i32 + (loop i32 (block i32 (loop i32 (block i32 (loop i32 (block i32 + (loop i32 (block i32 (call $dummy) (i32.const 150))) + )))))) + )))))) + )))))) + )))))) + )))))) + )))))) + )))))) + ) + + (func (export "as-unary-operand") (result i32) + (i32.ctz (loop i32 (call $dummy) (i32.const 13))) + ) + (func (export "as-binary-operand") (result i32) + (i32.mul + (loop i32 (call $dummy) (i32.const 3)) + (loop i32 (call $dummy) (i32.const 4)) + ) + ) + (func (export "as-test-operand") (result i32) + (i32.eqz (loop i32 (call $dummy) (i32.const 13))) + ) + (func (export "as-compare-operand") (result i32) + (f32.gt + (loop f32 (call $dummy) (f32.const 3)) + (loop f32 (call $dummy) (f32.const 3)) + ) + ) + + (func (export "break-bare") (result i32) + (block (loop (br 1) (br 0) (unreachable))) + (block (loop (br_if 1 (i32.const 1)) (unreachable))) + (block (loop (br_table 1 (i32.const 0)) (unreachable))) + (block (loop (br_table 1 1 1 (i32.const 1)) (unreachable))) + (i32.const 19) + ) + (func (export "break-value") (result i32) + (block i32 (loop i32 (br 1 (i32.const 18)) (br 0) (i32.const 19))) + ) + (func (export "break-repeated") (result i32) + (block i32 + (loop i32 + (br 1 (i32.const 18)) + (br 1 (i32.const 19)) + (drop (br_if 1 (i32.const 20) (i32.const 0))) + (drop (br_if 1 (i32.const 20) (i32.const 1))) + (br 1 (i32.const 21)) + (br_table 1 (i32.const 22) (i32.const 0)) + (br_table 1 1 1 (i32.const 23) (i32.const 1)) + (i32.const 21) + ) + ) + ) + (func (export "break-inner") (result i32) + (local i32) + (set_local 0 (i32.const 0)) + (set_local 0 (i32.add (get_local 0) (block i32 (loop i32 (block i32 (br 2 (i32.const 0x1))))))) + (set_local 0 (i32.add (get_local 0) (block i32 (loop i32 (loop i32 (br 2 (i32.const 0x2))))))) + (set_local 0 (i32.add (get_local 0) (block i32 (loop i32 (block i32 (loop i32 (br 1 (i32.const 0x4)))))))) + (set_local 0 (i32.add (get_local 0) (block i32 (loop i32 (i32.ctz (br 1 (i32.const 0x8))))))) + (set_local 0 (i32.add (get_local 0) (block i32 (loop i32 (i32.ctz (loop i32 (br 2 (i32.const 0x10)))))))) + (get_local 0) + ) + (func (export "cont-inner") (result i32) + (local i32) + (set_local 0 (i32.const 0)) + (set_local 0 (i32.add (get_local 0) (loop i32 (loop i32 (br 1))))) + (set_local 0 (i32.add (get_local 0) (loop i32 (i32.ctz (br 0))))) + (set_local 0 (i32.add (get_local 0) (loop i32 (i32.ctz (loop i32 (br 1)))))) + (get_local 0) + ) + + (func $fx (export "effects") (result i32) + (local i32) + (block + (loop + (set_local 0 (i32.const 1)) + (set_local 0 (i32.mul (get_local 0) (i32.const 3))) + (set_local 0 (i32.sub (get_local 0) (i32.const 5))) + (set_local 0 (i32.mul (get_local 0) (i32.const 7))) + (br 1) + (set_local 0 (i32.mul (get_local 0) (i32.const 100))) + ) + ) + (i32.eq (get_local 0) (i32.const -14)) + ) + + (func (export "while") (param i64) (result i64) + (local i64) + (set_local 1 (i64.const 1)) + (block + (loop + (br_if 1 (i64.eqz (get_local 0))) + (set_local 1 (i64.mul (get_local 0) (get_local 1))) + (set_local 0 (i64.sub (get_local 0) (i64.const 1))) + (br 0) + ) + ) + (get_local 1) + ) + + (func (export "for") (param i64) (result i64) + (local i64 i64) + (set_local 1 (i64.const 1)) + (set_local 2 (i64.const 2)) + (block + (loop + (br_if 1 (i64.gt_u (get_local 2) (get_local 0))) + (set_local 1 (i64.mul (get_local 1) (get_local 2))) + (set_local 2 (i64.add (get_local 2) (i64.const 1))) + (br 0) + ) + ) + (get_local 1) + ) + + (func (export "nesting") (param f32 f32) (result f32) + (local f32 f32) + (block + (loop + (br_if 1 (f32.eq (get_local 0) (f32.const 0))) + (set_local 2 (get_local 1)) + (block + (loop + (br_if 1 (f32.eq (get_local 2) (f32.const 0))) + (br_if 3 (f32.lt (get_local 2) (f32.const 0))) + (set_local 3 (f32.add (get_local 3) (get_local 2))) + (set_local 2 (f32.sub (get_local 2) (f32.const 2))) + (br 0) + ) + ) + (set_local 3 (f32.div (get_local 3) (get_local 0))) + (set_local 0 (f32.sub (get_local 0) (f32.const 1))) + (br 0) + ) + ) + (get_local 3) + ) +) + +(assert_return (invoke "empty")) +(assert_return (invoke "singular") (i32.const 7)) +(assert_return (invoke "multi") (i32.const 8)) +(assert_return (invoke "nested") (i32.const 9)) +(assert_return (invoke "deep") (i32.const 150)) + +(assert_return (invoke "as-unary-operand") (i32.const 0)) +(assert_return (invoke "as-binary-operand") (i32.const 12)) +(assert_return (invoke "as-test-operand") (i32.const 0)) +(assert_return (invoke "as-compare-operand") (i32.const 0)) + +(assert_return (invoke "break-bare") (i32.const 19)) +(assert_return (invoke "break-value") (i32.const 18)) +(assert_return (invoke "break-repeated") (i32.const 18)) +(assert_return (invoke "break-inner") (i32.const 0x1f)) + +(assert_return (invoke "effects") (i32.const 1)) + +(assert_return (invoke "while" (i64.const 0)) (i64.const 1)) +(assert_return (invoke "while" (i64.const 1)) (i64.const 1)) +(assert_return (invoke "while" (i64.const 2)) (i64.const 2)) +(assert_return (invoke "while" (i64.const 3)) (i64.const 6)) +(assert_return (invoke "while" (i64.const 5)) (i64.const 120)) +(assert_return (invoke "while" (i64.const 20)) (i64.const 2432902008176640000)) + +(assert_return (invoke "for" (i64.const 0)) (i64.const 1)) +(assert_return (invoke "for" (i64.const 1)) (i64.const 1)) +(assert_return (invoke "for" (i64.const 2)) (i64.const 2)) +(assert_return (invoke "for" (i64.const 3)) (i64.const 6)) +(assert_return (invoke "for" (i64.const 5)) (i64.const 120)) +(assert_return (invoke "for" (i64.const 20)) (i64.const 2432902008176640000)) + +(assert_return (invoke "nesting" (f32.const 0) (f32.const 7)) (f32.const 0)) +(assert_return (invoke "nesting" (f32.const 7) (f32.const 0)) (f32.const 0)) +(assert_return (invoke "nesting" (f32.const 1) (f32.const 1)) (f32.const 1)) +(assert_return (invoke "nesting" (f32.const 1) (f32.const 2)) (f32.const 2)) +(assert_return (invoke "nesting" (f32.const 1) (f32.const 3)) (f32.const 4)) +(assert_return (invoke "nesting" (f32.const 1) (f32.const 4)) (f32.const 6)) +(assert_return (invoke "nesting" (f32.const 1) (f32.const 100)) (f32.const 2550)) +(assert_return (invoke "nesting" (f32.const 1) (f32.const 101)) (f32.const 2601)) +(assert_return (invoke "nesting" (f32.const 2) (f32.const 1)) (f32.const 1)) +(assert_return (invoke "nesting" (f32.const 3) (f32.const 1)) (f32.const 1)) +(assert_return (invoke "nesting" (f32.const 10) (f32.const 1)) (f32.const 1)) +(assert_return (invoke "nesting" (f32.const 2) (f32.const 2)) (f32.const 3)) +(assert_return (invoke "nesting" (f32.const 2) (f32.const 3)) (f32.const 4)) +(assert_return (invoke "nesting" (f32.const 7) (f32.const 4)) (f32.const 10.3095235825)) +(assert_return (invoke "nesting" (f32.const 7) (f32.const 100)) (f32.const 4381.54785156)) +(assert_return (invoke "nesting" (f32.const 7) (f32.const 101)) (f32.const 2601)) + +(assert_invalid + (module (func $type-empty-i32 (result i32) (loop))) + "type mismatch" +) +(assert_invalid + (module (func $type-empty-i64 (result i64) (loop))) + "type mismatch" +) +(assert_invalid + (module (func $type-empty-f32 (result f32) (loop))) + "type mismatch" +) +(assert_invalid + (module (func $type-empty-f64 (result f64) (loop))) + "type mismatch" +) + +(assert_invalid + (module (func $type-value-void-vs-num (result i32) + (loop (nop)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-value-num-vs-num (result i32) + (loop (f32.const 0)) + )) + "type mismatch" +) + diff --git a/js/src/jit-test/tests/wasm/spec/loop.wast.js b/js/src/jit-test/tests/wasm/spec/loop.wast.js new file mode 100644 index 000000000..66337834e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/loop.wast.js @@ -0,0 +1 @@ +var importedArgs = ['loop.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/memory.wast b/js/src/jit-test/tests/wasm/spec/memory.wast new file mode 100644 index 000000000..2bf51788f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory.wast @@ -0,0 +1,330 @@ +;; Test memory section structure +(module (memory 0 0)) +(module (memory 0 1)) +(module (memory 1 256)) +;; Too big for Spidermonkey. +;; (module (memory 0 65536)) +(module (memory 0 0) (data (i32.const 0))) +(module (memory 0 0) (data (i32.const 0) "")) +(module (memory 1 1) (data (i32.const 0) "a")) +(module (memory 1 2) (data (i32.const 0) "a") (data (i32.const 65535) "b")) +(module (memory 1 2) + (data (i32.const 0) "a") (data (i32.const 1) "b") (data (i32.const 2) "c") +) +(module (memory 1) (global i32 (i32.const 0)) (data (get_global 0) "a")) +(module (memory 1) (global $g i32 (i32.const 0)) (data (get_global $g) "a")) +(module (memory 1) (data (get_global 0) "a") (global i32 (i32.const 0))) +(module (memory 1) (data (get_global $g) "a") (global $g i32 (i32.const 0))) + +(module (memory (data)) (func (export "memsize") (result i32) (current_memory))) +(assert_return (invoke "memsize") (i32.const 0)) +(module (memory (data "")) (func (export "memsize") (result i32) (current_memory))) +(assert_return (invoke "memsize") (i32.const 0)) +(module (memory (data "x")) (func (export "memsize") (result i32) (current_memory))) +(assert_return (invoke "memsize") (i32.const 1)) + +(assert_invalid (module (data (i32.const 0))) "unknown memory") +(assert_invalid (module (data (i32.const 0) "")) "unknown memory") +(assert_invalid (module (data (i32.const 0) "x")) "unknown memory") + +(assert_invalid + (module (memory 1) (data (i64.const 0))) + "type mismatch" +) +(assert_invalid + (module (memory 1) (data (i32.ctz (i32.const 0)))) + "constant expression required" +) +(assert_invalid + (module (memory 1) (data (nop))) + "constant expression required" +) +(assert_invalid + (module (memory 1) (data (get_global $g)) (global $g (mut i32) (i32.const 0))) + "constant expression required" +) + +(assert_unlinkable + (module (memory 0 0) (data (i32.const 0) "a")) + "data segment does not fit" +) +(assert_unlinkable + (module (memory 1 2) (data (i32.const 0) "a") (data (i32.const 98304) "b")) + "data segment does not fit" +) +;; This seems to cause a time-out on Travis. +(;assert_unlinkable + (module (memory 0x10000) (data (i32.const 0xffffffff) "ab")) + "" ;; either out of memory or segment does not fit +;) +(assert_unlinkable + (module (memory 1) (data (get_global 0) "a") (global i32 (i32.const 0x10000))) + "data segment does not fit" +) + +(module (memory 0 0) (data (i32.const 0) "")) +(module (memory 0 0) (data (i32.const 1) "")) +(module (memory 1 2) (data (i32.const 0) "abc") (data (i32.const 0) "def")) +(module (memory 1 2) (data (i32.const 3) "ab") (data (i32.const 0) "de")) +(module + (memory 1 2) + (data (i32.const 0) "a") (data (i32.const 2) "b") (data (i32.const 1) "c") +) + +(assert_invalid + (module (memory 1 0)) + "memory size minimum must not be greater than maximum" +) +(assert_invalid + (module (memory 65537)) + "memory size must be at most 65536 pages (4GiB)" +) +(assert_invalid + (module (memory 2147483648)) + "memory size must be at most 65536 pages (4GiB)" +) +(assert_invalid + (module (memory 4294967295)) + "memory size must be at most 65536 pages (4GiB)" +) +(assert_invalid + (module (memory 0 65537)) + "memory size must be at most 65536 pages (4GiB)" +) +(assert_invalid + (module (memory 0 2147483648)) + "memory size must be at most 65536 pages (4GiB)" +) +(assert_invalid + (module (memory 0 4294967295)) + "memory size must be at most 65536 pages (4GiB)" +) + +;; Test alignment annotation rules +(module (memory 0) (func (drop (i32.load8_u align=1 (i32.const 0))))) +(module (memory 0) (func (drop (i32.load16_u align=2 (i32.const 0))))) +(module (memory 0) (func (drop (i32.load align=4 (i32.const 0))))) +(module (memory 0) (func (drop (f32.load align=4 (i32.const 0))))) + +(assert_invalid + (module (memory 0) (func (drop (i64.load align=0 (i32.const 0))))) + "alignment must be a power of two" +) +(assert_invalid + (module (memory 0) (func (drop (i64.load align=3 (i32.const 0))))) + "alignment must be a power of two" +) +(assert_invalid + (module (memory 0) (func (drop (i64.load align=5 (i32.const 0))))) + "alignment must be a power of two" +) +(assert_invalid + (module (memory 0) (func (drop (i64.load align=6 (i32.const 0))))) + "alignment must be a power of two" +) +(assert_invalid + (module (memory 0) (func (drop (i64.load align=7 (i32.const 0))))) + "alignment must be a power of two" +) + +(assert_invalid + (module (memory 0) (func (drop (i64.load align=16 (i32.const 0))))) + "alignment must not be larger than natural" +) +(assert_invalid + (module (memory 0) (func (drop (i64.load align=32 (i32.const 0))))) + "alignment must not be larger than natural" +) +(assert_invalid + (module (memory 0) (func (drop (i32.load align=8 (i32.const 0))))) + "alignment must not be larger than natural" +) +(assert_invalid + (module (memory 0) (func (drop (i32.load16_u align=4 (i32.const 0))))) + "alignment must not be larger than natural" +) +(assert_invalid + (module (memory 0) (func (drop (i32.load8_u align=2 (i32.const 0))))) + "alignment must not be larger than natural" +) +(assert_invalid + (module (memory 0) (func (i32.store8 align=2 (i32.const 0) (i32.const 0)))) + "alignment must not be larger than natural" +) +(assert_invalid + (module (memory 0) (func (i32.load16_u align=4 (i32.const 0)))) + "alignment must not be larger than natural" +) +(assert_invalid + (module (memory 0) (func (i32.load8_u align=2 (i32.const 0)))) + "alignment must not be larger than natural" +) +(assert_invalid + (module (memory 0) (func (i32.store8 align=2 (i32.const 0) (i32.const 0)))) + "alignment must not be larger than natural" +) + +(module + (memory 1) + (data (i32.const 0) "ABC\a7D") (data (i32.const 20) "WASM") + + ;; Data section + (func (export "data") (result i32) + (i32.and + (i32.and + (i32.and + (i32.eq (i32.load8_u (i32.const 0)) (i32.const 65)) + (i32.eq (i32.load8_u (i32.const 3)) (i32.const 167)) + ) + (i32.and + (i32.eq (i32.load8_u (i32.const 6)) (i32.const 0)) + (i32.eq (i32.load8_u (i32.const 19)) (i32.const 0)) + ) + ) + (i32.and + (i32.and + (i32.eq (i32.load8_u (i32.const 20)) (i32.const 87)) + (i32.eq (i32.load8_u (i32.const 23)) (i32.const 77)) + ) + (i32.and + (i32.eq (i32.load8_u (i32.const 24)) (i32.const 0)) + (i32.eq (i32.load8_u (i32.const 1023)) (i32.const 0)) + ) + ) + ) + ) + + ;; Aligned read/write + (func (export "aligned") (result i32) + (local i32 i32 i32) + (set_local 0 (i32.const 10)) + (block + (loop + (if + (i32.eq (get_local 0) (i32.const 0)) + (br 2) + ) + (set_local 2 (i32.mul (get_local 0) (i32.const 4))) + (i32.store (get_local 2) (get_local 0)) + (set_local 1 (i32.load (get_local 2))) + (if + (i32.ne (get_local 0) (get_local 1)) + (return (i32.const 0)) + ) + (set_local 0 (i32.sub (get_local 0) (i32.const 1))) + (br 0) + ) + ) + (i32.const 1) + ) + + ;; Unaligned read/write + (func (export "unaligned") (result i32) + (local i32 f64 f64) + (set_local 0 (i32.const 10)) + (block + (loop + (if + (i32.eq (get_local 0) (i32.const 0)) + (br 2) + ) + (set_local 2 (f64.convert_s/i32 (get_local 0))) + (f64.store align=1 (get_local 0) (get_local 2)) + (set_local 1 (f64.load align=1 (get_local 0))) + (if + (f64.ne (get_local 2) (get_local 1)) + (return (i32.const 0)) + ) + (set_local 0 (i32.sub (get_local 0) (i32.const 1))) + (br 0) + ) + ) + (i32.const 1) + ) + + ;; Memory cast + (func (export "cast") (result f64) + (i64.store (i32.const 8) (i64.const -12345)) + (if + (f64.eq + (f64.load (i32.const 8)) + (f64.reinterpret/i64 (i64.const -12345)) + ) + (return (f64.const 0)) + ) + (i64.store align=1 (i32.const 9) (i64.const 0)) + (i32.store16 align=1 (i32.const 15) (i32.const 16453)) + (f64.load align=1 (i32.const 9)) + ) + + ;; Sign and zero extending memory loads + (func (export "i32_load8_s") (param $i i32) (result i32) + (i32.store8 (i32.const 8) (get_local $i)) + (i32.load8_s (i32.const 8)) + ) + (func (export "i32_load8_u") (param $i i32) (result i32) + (i32.store8 (i32.const 8) (get_local $i)) + (i32.load8_u (i32.const 8)) + ) + (func (export "i32_load16_s") (param $i i32) (result i32) + (i32.store16 (i32.const 8) (get_local $i)) + (i32.load16_s (i32.const 8)) + ) + (func (export "i32_load16_u") (param $i i32) (result i32) + (i32.store16 (i32.const 8) (get_local $i)) + (i32.load16_u (i32.const 8)) + ) + (func (export "i64_load8_s") (param $i i64) (result i64) + (i64.store8 (i32.const 8) (get_local $i)) + (i64.load8_s (i32.const 8)) + ) + (func (export "i64_load8_u") (param $i i64) (result i64) + (i64.store8 (i32.const 8) (get_local $i)) + (i64.load8_u (i32.const 8)) + ) + (func (export "i64_load16_s") (param $i i64) (result i64) + (i64.store16 (i32.const 8) (get_local $i)) + (i64.load16_s (i32.const 8)) + ) + (func (export "i64_load16_u") (param $i i64) (result i64) + (i64.store16 (i32.const 8) (get_local $i)) + (i64.load16_u (i32.const 8)) + ) + (func (export "i64_load32_s") (param $i i64) (result i64) + (i64.store32 (i32.const 8) (get_local $i)) + (i64.load32_s (i32.const 8)) + ) + (func (export "i64_load32_u") (param $i i64) (result i64) + (i64.store32 (i32.const 8) (get_local $i)) + (i64.load32_u (i32.const 8)) + ) +) + +(assert_return (invoke "data") (i32.const 1)) +(assert_return (invoke "aligned") (i32.const 1)) +(assert_return (invoke "unaligned") (i32.const 1)) +(assert_return (invoke "cast") (f64.const 42.0)) + +(assert_return (invoke "i32_load8_s" (i32.const -1)) (i32.const -1)) +(assert_return (invoke "i32_load8_u" (i32.const -1)) (i32.const 255)) +(assert_return (invoke "i32_load16_s" (i32.const -1)) (i32.const -1)) +(assert_return (invoke "i32_load16_u" (i32.const -1)) (i32.const 65535)) + +(assert_return (invoke "i32_load8_s" (i32.const 100)) (i32.const 100)) +(assert_return (invoke "i32_load8_u" (i32.const 200)) (i32.const 200)) +(assert_return (invoke "i32_load16_s" (i32.const 20000)) (i32.const 20000)) +(assert_return (invoke "i32_load16_u" (i32.const 40000)) (i32.const 40000)) + +(assert_return (invoke "i64_load8_s" (i64.const -1)) (i64.const -1)) +(assert_return (invoke "i64_load8_u" (i64.const -1)) (i64.const 255)) +(assert_return (invoke "i64_load16_s" (i64.const -1)) (i64.const -1)) +(assert_return (invoke "i64_load16_u" (i64.const -1)) (i64.const 65535)) +(assert_return (invoke "i64_load32_s" (i64.const -1)) (i64.const -1)) +(assert_return (invoke "i64_load32_u" (i64.const -1)) (i64.const 4294967295)) + +(assert_return (invoke "i64_load8_s" (i64.const 100)) (i64.const 100)) +(assert_return (invoke "i64_load8_u" (i64.const 200)) (i64.const 200)) +(assert_return (invoke "i64_load16_s" (i64.const 20000)) (i64.const 20000)) +(assert_return (invoke "i64_load16_u" (i64.const 40000)) (i64.const 40000)) +(assert_return (invoke "i64_load32_s" (i64.const 20000)) (i64.const 20000)) +(assert_return (invoke "i64_load32_u" (i64.const 40000)) (i64.const 40000)) diff --git a/js/src/jit-test/tests/wasm/spec/memory.wast.js b/js/src/jit-test/tests/wasm/spec/memory.wast.js new file mode 100644 index 000000000..956dcb6dd --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory.wast.js @@ -0,0 +1,3 @@ +// TODO initializer expression can reference global module-defined variables? +quit(); +var importedArgs = ['memory.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/memory_redundancy.wast b/js/src/jit-test/tests/wasm/spec/memory_redundancy.wast new file mode 100644 index 000000000..2911537e1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory_redundancy.wast @@ -0,0 +1,43 @@ +;; Test that optimizers don't do redundant-load, store-to-load, or dead-store +;; optimizations when there are interfering stores, even of different types +;; and to non-identical addresses. + +(module + (memory 1 1) + + (func (export "zero_everything") + (i32.store (i32.const 0) (i32.const 0)) + (i32.store (i32.const 4) (i32.const 0)) + (i32.store (i32.const 8) (i32.const 0)) + (i32.store (i32.const 12) (i32.const 0)) + ) + + (func (export "test_store_to_load") (result i32) + (i32.store (i32.const 8) (i32.const 0)) + (f32.store (i32.const 5) (f32.const -0.0)) + (i32.load (i32.const 8)) + ) + + (func (export "test_redundant_load") (result i32) + (local $t i32) + (local $s i32) + (set_local $t (i32.load (i32.const 8))) + (i32.store (i32.const 5) (i32.const 0x80000000)) + (set_local $s (i32.load (i32.const 8))) + (i32.add (get_local $t) (get_local $s)) + ) + + (func (export "test_dead_store") (result f32) + (local $t f32) + (i32.store (i32.const 8) (i32.const 0x23232323)) + (set_local $t (f32.load (i32.const 11))) + (i32.store (i32.const 8) (i32.const 0)) + (get_local $t) + ) +) + +(assert_return (invoke "test_store_to_load") (i32.const 0x00000080)) +(invoke "zero_everything") +(assert_return (invoke "test_redundant_load") (i32.const 0x00000080)) +(invoke "zero_everything") +(assert_return (invoke "test_dead_store") (f32.const 0x1.18p-144)) diff --git a/js/src/jit-test/tests/wasm/spec/memory_redundancy.wast.js b/js/src/jit-test/tests/wasm/spec/memory_redundancy.wast.js new file mode 100644 index 000000000..20a00ba85 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory_redundancy.wast.js @@ -0,0 +1 @@ +var importedArgs = ['memory_redundancy.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/memory_trap.wast b/js/src/jit-test/tests/wasm/spec/memory_trap.wast new file mode 100644 index 000000000..4fc4dccf9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory_trap.wast @@ -0,0 +1,33 @@ +(module + (memory 1) + + (func $addr_limit (result i32) + (i32.mul (current_memory) (i32.const 0x10000)) + ) + + (func (export "store") (param $i i32) (param $v i32) + (i32.store (i32.add (call $addr_limit) (get_local $i)) (get_local $v)) + ) + + (func (export "load") (param $i i32) (result i32) + (i32.load (i32.add (call $addr_limit) (get_local $i))) + ) + + (func (export "grow_memory") (param i32) (result i32) + (grow_memory (get_local 0)) + ) +) + +(assert_return (invoke "store" (i32.const -4) (i32.const 42))) +(assert_return (invoke "load" (i32.const -4)) (i32.const 42)) +(assert_trap (invoke "store" (i32.const -3) (i32.const 13)) "out of bounds memory access") +(assert_trap (invoke "load" (i32.const -3)) "out of bounds memory access") +(assert_trap (invoke "store" (i32.const -2) (i32.const 13)) "out of bounds memory access") +(assert_trap (invoke "load" (i32.const -2)) "out of bounds memory access") +(assert_trap (invoke "store" (i32.const -1) (i32.const 13)) "out of bounds memory access") +(assert_trap (invoke "load" (i32.const -1)) "out of bounds memory access") +(assert_trap (invoke "store" (i32.const 0) (i32.const 13)) "out of bounds memory access") +(assert_trap (invoke "load" (i32.const 0)) "out of bounds memory access") +(assert_trap (invoke "store" (i32.const 0x80000000) (i32.const 13)) "out of bounds memory access") +(assert_trap (invoke "load" (i32.const 0x80000000)) "out of bounds memory access") +(assert_return (invoke "grow_memory" (i32.const 0x10001)) (i32.const -1)) diff --git a/js/src/jit-test/tests/wasm/spec/memory_trap.wast.js b/js/src/jit-test/tests/wasm/spec/memory_trap.wast.js new file mode 100644 index 000000000..40ea2e28e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory_trap.wast.js @@ -0,0 +1 @@ +var importedArgs = ['memory_trap.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/names.wast b/js/src/jit-test/tests/wasm/spec/names.wast new file mode 100644 index 000000000..07b4deb58 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/names.wast @@ -0,0 +1,76 @@ +;; Test files can define multiple modules. Test that implementations treat +;; each module independently from the other. + +(module + (func (export "foo") (result i32) (i32.const 0)) +) + +(assert_return (invoke "foo") (i32.const 0)) + +;; Another module, same function name, different contents. + +(module + (func (export "foo") (result i32) (i32.const 1)) +) + +(assert_return (invoke "foo") (i32.const 1)) + + +(module + ;; Test that we can use the empty string as a symbol. + (func (export "") (result f32) (f32.const 0x1.91p+2)) + + ;; Test that we can use names beginning with a digit. + (func (export "0") (result f32) (f32.const 0x1.97p+2)) + + ;; Test that we can use names beginning with an underscore. + (func (export "_") (result f32) (f32.const 0x1.98p+2)) + + ;; Test that we can use names beginning with a dollar sign. + (func (export "$") (result f32) (f32.const 0x1.99p+2)) + + ;; Test that we can use names beginning with an at sign. + (func (export "@") (result f32) (f32.const 0x2.00p+2)) + + ;; Test that we can use non-alphanumeric names. + (func (export "~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./ ") (result f32) (f32.const 0x1.96p+2)) + + ;; Test that we can use names that have special meaning in JS. + (func (export "NaN") (result f32) (f32.const 0x2.01p+2)) + (func (export "Infinity") (result f32) (f32.const 0x2.02p+2)) + (func (export "if") (result f32) (f32.const 0x2.03p+2)) + + ;; Test that we can use common libc names without conflict. + (func (export "malloc") (result f32) (f32.const 0x1.92p+2)) + + ;; Test that we can use some libc hidden names without conflict. + (func (export "_malloc") (result f32) (f32.const 0x1.93p+2)) + (func (export "__malloc") (result f32) (f32.const 0x1.94p+2)) +) + +(assert_return (invoke "") (f32.const 0x1.91p+2)) +(assert_return (invoke "malloc") (f32.const 0x1.92p+2)) +(assert_return (invoke "_malloc") (f32.const 0x1.93p+2)) +(assert_return (invoke "__malloc") (f32.const 0x1.94p+2)) +(assert_return (invoke "~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./ ") (f32.const 0x1.96p+2)) +(assert_return (invoke "0") (f32.const 0x1.97p+2)) +(assert_return (invoke "_") (f32.const 0x1.98p+2)) +(assert_return (invoke "$") (f32.const 0x1.99p+2)) +(assert_return (invoke "@") (f32.const 0x2.00p+2)) +(assert_return (invoke "NaN") (f32.const 0x2.01p+2)) +(assert_return (invoke "Infinity") (f32.const 0x2.02p+2)) +(assert_return (invoke "if") (f32.const 0x2.03p+2)) + +(module + ;; Test that we can use indices instead of names to reference imports, + ;; exports, functions and parameters. + (import "spectest" "print" (func (param i32))) + (func (import "spectest" "print") (param i32)) + (func (param i32) (param i32) + (call 0 (get_local 0)) + (call 1 (get_local 1)) + ) + (export "print32" (func 2)) +) + +(invoke "print32" (i32.const 42) (i32.const 123)) diff --git a/js/src/jit-test/tests/wasm/spec/names.wast.js b/js/src/jit-test/tests/wasm/spec/names.wast.js new file mode 100644 index 000000000..668e896dd --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/names.wast.js @@ -0,0 +1 @@ +var importedArgs = ['names.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/nop.wast b/js/src/jit-test/tests/wasm/spec/nop.wast new file mode 100644 index 000000000..ab83eede2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/nop.wast @@ -0,0 +1,260 @@ +;; Test `nop` operator. + +(module + ;; Auxiliary definitions + (func $dummy) + (func $3-ary (param i32 i32 i32) (result i32) + get_local 0 get_local 1 get_local 2 i32.sub i32.add + ) + (memory 1) + + (func (export "as-func-first") (result i32) + (nop) (i32.const 1) + ) + (func (export "as-func-mid") (result i32) + (call $dummy) (nop) (i32.const 2) + ) + (func (export "as-func-last") (result i32) + (call $dummy) (i32.const 3) (nop) + ) + (func (export "as-func-everywhere") (result i32) + (nop) (nop) (call $dummy) (nop) (i32.const 4) (nop) (nop) + ) + + (func (export "as-drop-last") (param i32) + (get_local 0) (nop) (drop) + ) + (func (export "as-drop-everywhere") (param i32) + (nop) (nop) (get_local 0) (nop) (nop) (drop) + ) + + (func (export "as-select-mid1") (param i32) (result i32) + (get_local 0) (nop) (get_local 0) (get_local 0) (select) + ) + (func (export "as-select-mid2") (param i32) (result i32) + (get_local 0) (get_local 0) (nop) (get_local 0) (select) + ) + (func (export "as-select-last") (param i32) (result i32) + (get_local 0) (get_local 0) (get_local 0) (nop) (select) + ) + (func (export "as-select-everywhere") (param i32) (result i32) + (nop) (get_local 0) (nop) (nop) (get_local 0) + (nop) (nop) (get_local 0) (nop) (nop) (select) + ) + + (func (export "as-block-first") (result i32) + (block i32 (nop) (i32.const 2)) + ) + (func (export "as-block-mid") (result i32) + (block i32 (call $dummy) (nop) (i32.const 2)) + ) + (func (export "as-block-last") (result i32) + (block i32 (nop) (call $dummy) (i32.const 3) (nop)) + ) + (func (export "as-block-everywhere") (result i32) + (block i32 (nop) (nop) (call $dummy) (nop) (i32.const 4) (nop) (nop)) + ) + + (func (export "as-loop-first") (result i32) + (loop i32 (nop) (i32.const 2)) + ) + (func (export "as-loop-mid") (result i32) + (loop i32 (call $dummy) (nop) (i32.const 2)) + ) + (func (export "as-loop-last") (result i32) + (loop i32 (call $dummy) (i32.const 3) (nop)) + ) + (func (export "as-loop-everywhere") (result i32) + (loop i32 (nop) (nop) (call $dummy) (nop) (i32.const 4) (nop) (nop)) + ) + + (func (export "as-if-condition") (param i32) + (get_local 0) (nop) (if (then (call $dummy))) + ) + (func (export "as-if-then") (param i32) + (if (get_local 0) (nop) (call $dummy)) + ) + (func (export "as-if-else") (param i32) + (if (get_local 0) (call $dummy) (nop)) + ) + + (func (export "as-br-last") (param i32) (result i32) + (block i32 (get_local 0) (nop) (br 0)) + ) + (func (export "as-br-everywhere") (param i32) (result i32) + (block i32 (nop) (nop) (get_local 0) (nop) (nop) (br 0)) + ) + + (func (export "as-br_if-mid") (param i32) (result i32) + (block i32 (get_local 0) (nop) (get_local 0) (br_if 0)) + ) + (func (export "as-br_if-last") (param i32) (result i32) + (block i32 (get_local 0) (get_local 0) (nop) (br_if 0)) + ) + (func (export "as-br_if-everywhere") (param i32) (result i32) + (block i32 + (nop) (nop) (get_local 0) (nop) (nop) (get_local 0) (nop) (nop) + (br_if 0) + ) + ) + + (func (export "as-br_table-mid") (param i32) (result i32) + (block i32 (get_local 0) (nop) (get_local 0) (br_table 0 0)) + ) + (func (export "as-br_table-last") (param i32) (result i32) + (block i32 (get_local 0) (get_local 0) (nop) (br_table 0 0)) + ) + (func (export "as-br_table-everywhere") (param i32) (result i32) + (block i32 + (nop) (nop) (get_local 0) (nop) (nop) (get_local 0) (nop) (nop) + (br_table 0 0) + ) + ) + + (func (export "as-return-last") (param i32) (result i32) + (get_local 0) (nop) (return) + ) + (func (export "as-return-everywhere") (param i32) (result i32) + (nop) (nop) (get_local 0) (nop) (nop) (return) + ) + + (func (export "as-call-mid1") (param i32 i32 i32) (result i32) + (get_local 0) (nop) (get_local 1) (get_local 2) (call $3-ary) + ) + (func (export "as-call-mid2") (param i32 i32 i32) (result i32) + (get_local 0) (get_local 1) (nop) (get_local 2) (call $3-ary) + ) + (func (export "as-call-last") (param i32 i32 i32) (result i32) + (get_local 0) (get_local 1) (get_local 2) (nop) (call $3-ary) + ) + (func (export "as-call-everywhere") (param i32 i32 i32) (result i32) + (nop) (nop) (get_local 0) (nop) (nop) (get_local 1) + (nop) (nop) (get_local 2) (nop) (nop) (call $3-ary) + ) + + ;; TODO(stack): call_indirect, *_local, load*, store* + + (func (export "as-unary-last") (param i32) (result i32) + (get_local 0) (nop) (i32.ctz) + ) + (func (export "as-unary-everywhere") (param i32) (result i32) + (nop) (nop) (get_local 0) (nop) (nop) (i32.ctz) + ) + + (func (export "as-binary-mid") (param i32) (result i32) + (get_local 0) (nop) (get_local 0) (i32.add) + ) + (func (export "as-binary-last") (param i32) (result i32) + (get_local 0) (get_local 0) (nop) (i32.add) + ) + (func (export "as-binary-everywhere") (param i32) (result i32) + (nop) (get_local 0) (nop) (nop) (get_local 0) (nop) (nop) (i32.add) + ) + + (func (export "as-test-last") (param i32) (result i32) + (get_local 0) (nop) (i32.eqz) + ) + (func (export "as-test-everywhere") (param i32) (result i32) + (nop) (nop) (get_local 0) (nop) (nop) i32.eqz + ) + + (func (export "as-compare-mid") (param i32) (result i32) + (get_local 0) (nop) (get_local 0) (i32.ne) + ) + (func (export "as-compare-last") (param i32) (result i32) + (get_local 0) (get_local 0) (nop) (i32.lt_u) + ) + (func (export "as-compare-everywhere") (param i32) (result i32) + (nop) (get_local 0) (nop) (nop) (get_local 0) (nop) (nop) (i32.le_s) + ) + + (func (export "as-grow_memory-last") (param i32) (result i32) + (get_local 0) (nop) (grow_memory) + ) + (func (export "as-grow_memory-everywhere") (param i32) (result i32) + (nop) (nop) (get_local 0) (nop) (nop) (grow_memory) + ) +) + +(assert_return (invoke "as-func-first") (i32.const 1)) +(assert_return (invoke "as-func-mid") (i32.const 2)) +(assert_return (invoke "as-func-last") (i32.const 3)) +(assert_return (invoke "as-func-everywhere") (i32.const 4)) + +(assert_return (invoke "as-drop-last" (i32.const 0))) +(assert_return (invoke "as-drop-everywhere" (i32.const 0))) + +(assert_return (invoke "as-select-mid1" (i32.const 3)) (i32.const 3)) +(assert_return (invoke "as-select-mid2" (i32.const 3)) (i32.const 3)) +(assert_return (invoke "as-select-last" (i32.const 3)) (i32.const 3)) +(assert_return (invoke "as-select-everywhere" (i32.const 3)) (i32.const 3)) + +(assert_return (invoke "as-block-first") (i32.const 2)) +(assert_return (invoke "as-block-mid") (i32.const 2)) +(assert_return (invoke "as-block-last") (i32.const 3)) +(assert_return (invoke "as-block-everywhere") (i32.const 4)) + +(assert_return (invoke "as-loop-first") (i32.const 2)) +(assert_return (invoke "as-loop-mid") (i32.const 2)) +(assert_return (invoke "as-loop-last") (i32.const 3)) +(assert_return (invoke "as-loop-everywhere") (i32.const 4)) + +(assert_return (invoke "as-if-condition" (i32.const 0))) +(assert_return (invoke "as-if-condition" (i32.const -1))) +(assert_return (invoke "as-if-then" (i32.const 0))) +(assert_return (invoke "as-if-then" (i32.const 4))) +(assert_return (invoke "as-if-else" (i32.const 0))) +(assert_return (invoke "as-if-else" (i32.const 3))) + +(assert_return (invoke "as-br-last" (i32.const 6)) (i32.const 6)) +(assert_return (invoke "as-br-everywhere" (i32.const 7)) (i32.const 7)) + +(assert_return (invoke "as-br_if-mid" (i32.const 5)) (i32.const 5)) +(assert_return (invoke "as-br_if-last" (i32.const 6)) (i32.const 6)) +(assert_return (invoke "as-br_if-everywhere" (i32.const 7)) (i32.const 7)) + +(assert_return (invoke "as-br_table-mid" (i32.const 5)) (i32.const 5)) +(assert_return (invoke "as-br_table-last" (i32.const 6)) (i32.const 6)) +(assert_return (invoke "as-br_table-everywhere" (i32.const 7)) (i32.const 7)) + +(assert_return (invoke "as-return-last" (i32.const 6)) (i32.const 6)) +(assert_return (invoke "as-return-everywhere" (i32.const 7)) (i32.const 7)) + +(assert_return (invoke "as-call-mid1" (i32.const 3) (i32.const 1) (i32.const 2)) (i32.const 2)) +(assert_return (invoke "as-call-mid2" (i32.const 0) (i32.const 3) (i32.const 1)) (i32.const 2)) +(assert_return (invoke "as-call-last" (i32.const 10) (i32.const 9) (i32.const -1)) (i32.const 20)) +(assert_return (invoke "as-call-everywhere" (i32.const 2) (i32.const 1) (i32.const 5)) (i32.const -2)) + +(assert_return (invoke "as-unary-last" (i32.const 30)) (i32.const 1)) +(assert_return (invoke "as-unary-everywhere" (i32.const 12)) (i32.const 2)) + +(assert_return (invoke "as-binary-mid" (i32.const 3)) (i32.const 6)) +(assert_return (invoke "as-binary-last" (i32.const 3)) (i32.const 6)) +(assert_return (invoke "as-binary-everywhere" (i32.const 3)) (i32.const 6)) + +(assert_return (invoke "as-test-last" (i32.const 0)) (i32.const 1)) +(assert_return (invoke "as-test-everywhere" (i32.const 0)) (i32.const 1)) + +(assert_return (invoke "as-compare-mid" (i32.const 3)) (i32.const 0)) +(assert_return (invoke "as-compare-last" (i32.const 3)) (i32.const 0)) +(assert_return (invoke "as-compare-everywhere" (i32.const 3)) (i32.const 1)) + +(assert_return (invoke "as-grow_memory-last" (i32.const 2)) (i32.const 1)) +(assert_return (invoke "as-grow_memory-everywhere" (i32.const 12)) (i32.const 3)) + +(assert_invalid + (module (func $type-i32 (result i32) (nop))) + "type mismatch" +) +(assert_invalid + (module (func $type-i64 (result i64) (nop))) + "type mismatch" +) +(assert_invalid + (module (func $type-f32 (result f32) (nop))) + "type mismatch" +) +(assert_invalid + (module (func $type-f64 (result f64) (nop))) + "type mismatch" +) diff --git a/js/src/jit-test/tests/wasm/spec/nop.wast.js b/js/src/jit-test/tests/wasm/spec/nop.wast.js new file mode 100644 index 000000000..405554d50 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/nop.wast.js @@ -0,0 +1 @@ +var importedArgs = ['nop.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/resizing.wast b/js/src/jit-test/tests/wasm/spec/resizing.wast new file mode 100644 index 000000000..937e6cab1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/resizing.wast @@ -0,0 +1,58 @@ +(module + (memory 0) + + (func (export "load_at_zero") (result i32) (i32.load (i32.const 0))) + (func (export "store_at_zero") (i32.store (i32.const 0) (i32.const 2))) + + (func (export "load_at_page_size") (result i32) (i32.load (i32.const 0x10000))) + (func (export "store_at_page_size") (i32.store (i32.const 0x10000) (i32.const 3))) + + (func (export "grow") (param $sz i32) (result i32) (grow_memory (get_local $sz))) + (func (export "size") (result i32) (current_memory)) +) + +(assert_return (invoke "size") (i32.const 0)) +(assert_trap (invoke "store_at_zero") "out of bounds memory access") +(assert_trap (invoke "load_at_zero") "out of bounds memory access") +(assert_trap (invoke "store_at_page_size") "out of bounds memory access") +(assert_trap (invoke "load_at_page_size") "out of bounds memory access") +(assert_return (invoke "grow" (i32.const 1)) (i32.const 0)) +(assert_return (invoke "size") (i32.const 1)) +(assert_return (invoke "load_at_zero") (i32.const 0)) +(assert_return (invoke "store_at_zero")) +(assert_return (invoke "load_at_zero") (i32.const 2)) +(assert_trap (invoke "store_at_page_size") "out of bounds memory access") +(assert_trap (invoke "load_at_page_size") "out of bounds memory access") +(assert_return (invoke "grow" (i32.const 4)) (i32.const 1)) +(assert_return (invoke "size") (i32.const 5)) +(assert_return (invoke "load_at_zero") (i32.const 2)) +(assert_return (invoke "store_at_zero")) +(assert_return (invoke "load_at_zero") (i32.const 2)) +(assert_return (invoke "load_at_page_size") (i32.const 0)) +(assert_return (invoke "store_at_page_size")) +(assert_return (invoke "load_at_page_size") (i32.const 3)) + + +(module + (memory 0) + (func (export "grow") (param i32) (result i32) (grow_memory (get_local 0))) +) + +(assert_return (invoke "grow" (i32.const 0)) (i32.const 0)) +(assert_return (invoke "grow" (i32.const 1)) (i32.const 0)) +(assert_return (invoke "grow" (i32.const 0)) (i32.const 1)) +(assert_return (invoke "grow" (i32.const 2)) (i32.const 1)) +(assert_return (invoke "grow" (i32.const 800)) (i32.const 3)) + +(module + (memory 0 10) + (func (export "grow") (param i32) (result i32) (grow_memory (get_local 0))) +) + +(assert_return (invoke "grow" (i32.const 0)) (i32.const 0)) +(assert_return (invoke "grow" (i32.const 1)) (i32.const 0)) +(assert_return (invoke "grow" (i32.const 1)) (i32.const 1)) +(assert_return (invoke "grow" (i32.const 2)) (i32.const 2)) +(assert_return (invoke "grow" (i32.const 6)) (i32.const 4)) +(assert_return (invoke "grow" (i32.const 0)) (i32.const 10)) +(assert_return (invoke "grow" (i32.const 1)) (i32.const -1)) diff --git a/js/src/jit-test/tests/wasm/spec/resizing.wast.js b/js/src/jit-test/tests/wasm/spec/resizing.wast.js new file mode 100644 index 000000000..de3c0b5ae --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/resizing.wast.js @@ -0,0 +1 @@ +var importedArgs = ['resizing.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/return.wast b/js/src/jit-test/tests/wasm/spec/return.wast new file mode 100644 index 000000000..60db41c1f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/return.wast @@ -0,0 +1,281 @@ +;; Test `return` operator + +(module + ;; Auxiliary definition + (func $dummy) + + (func (export "type-i32") (drop (i32.ctz (return)))) + (func (export "type-i64") (drop (i64.ctz (return)))) + (func (export "type-f32") (drop (f32.neg (return)))) + (func (export "type-f64") (drop (f64.neg (return)))) + + (func (export "nullary") (return)) + (func (export "unary") (result f64) (return (f64.const 3))) + + (func (export "as-func-first") (result i32) + (return (i32.const 1)) (i32.const 2) + ) + (func (export "as-func-mid") (result i32) + (call $dummy) (return (i32.const 2)) (i32.const 3) + ) + (func (export "as-func-last") + (nop) (call $dummy) (return) + ) + (func (export "as-func-value") (result i32) + (nop) (call $dummy) (return (i32.const 3)) + ) + + (func (export "as-block-first") + (block (return) (call $dummy)) + ) + (func (export "as-block-mid") + (block (call $dummy) (return) (call $dummy)) + ) + (func (export "as-block-last") + (block (nop) (call $dummy) (return)) + ) + (func (export "as-block-value") (result i32) + (block i32 (nop) (call $dummy) (return (i32.const 2))) + ) + + (func (export "as-loop-first") (result i32) + (loop i32 (return (i32.const 3)) (i32.const 2)) + ) + (func (export "as-loop-mid") (result i32) + (loop i32 (call $dummy) (return (i32.const 4)) (i32.const 2)) + ) + (func (export "as-loop-last") (result i32) + (loop i32 (nop) (call $dummy) (return (i32.const 5))) + ) + + (func (export "as-br-value") (result i32) + (block i32 (br 0 (return (i32.const 9)))) + ) + + (func (export "as-br_if-cond") + (block (br_if 0 (return))) + ) + (func (export "as-br_if-value") (result i32) + (block i32 + (drop (br_if 0 (return (i32.const 8)) (i32.const 1))) (i32.const 7) + ) + ) + (func (export "as-br_if-value-cond") (result i32) + (block i32 + (drop (br_if 0 (i32.const 6) (return (i32.const 9)))) (i32.const 7) + ) + ) + + (func (export "as-br_table-index") (result i64) + (block (br_table 0 0 0 (return (i64.const 9)))) (i64.const -1) + ) + (func (export "as-br_table-value") (result i32) + (block i32 + (br_table 0 0 0 (return (i32.const 10)) (i32.const 1)) (i32.const 7) + ) + ) + (func (export "as-br_table-value-index") (result i32) + (block i32 + (br_table 0 0 (i32.const 6) (return (i32.const 11))) (i32.const 7) + ) + ) + + (func (export "as-return-value") (result i64) + (return (return (i64.const 7))) + ) + + (func (export "as-if-cond") (result i32) + (if i32 (return (i32.const 2)) (i32.const 0) (i32.const 1)) + ) + (func (export "as-if-then") (param i32 i32) (result i32) + (if i32 (get_local 0) (return (i32.const 3)) (get_local 1)) + ) + (func (export "as-if-else") (param i32 i32) (result i32) + (if i32 (get_local 0) (get_local 1) (return (i32.const 4))) + ) + + (func (export "as-select-first") (param i32 i32) (result i32) + (select (return (i32.const 5)) (get_local 0) (get_local 1)) + ) + (func (export "as-select-second") (param i32 i32) (result i32) + (select (get_local 0) (return (i32.const 6)) (get_local 1)) + ) + (func (export "as-select-cond") (result i32) + (select (i32.const 0) (i32.const 1) (return (i32.const 7))) + ) + + (func $f (param i32 i32 i32) (result i32) (i32.const -1)) + (func (export "as-call-first") (result i32) + (call $f (return (i32.const 12)) (i32.const 2) (i32.const 3)) + ) + (func (export "as-call-mid") (result i32) + (call $f (i32.const 1) (return (i32.const 13)) (i32.const 3)) + ) + (func (export "as-call-last") (result i32) + (call $f (i32.const 1) (i32.const 2) (return (i32.const 14))) + ) + + (type $sig (func (param i32 i32 i32) (result i32))) + (table anyfunc (elem $f)) + (func (export "as-call_indirect-func") (result i32) + (call_indirect $sig (return (i32.const 20)) (i32.const 1) (i32.const 2) (i32.const 3)) + ) + (func (export "as-call_indirect-first") (result i32) + (call_indirect $sig (i32.const 0) (return (i32.const 21)) (i32.const 2) (i32.const 3)) + ) + (func (export "as-call_indirect-mid") (result i32) + (call_indirect $sig (i32.const 0) (i32.const 1) (return (i32.const 22)) (i32.const 3)) + ) + (func (export "as-call_indirect-last") (result i32) + (call_indirect $sig (i32.const 0) (i32.const 1) (i32.const 2) (return (i32.const 23))) + ) + + (func (export "as-set_local-value") (result i32) (local f32) + (set_local 0 (return (i32.const 17))) (i32.const -1) + ) + + (memory 1) + (func (export "as-load-address") (result f32) + (f32.load (return (f32.const 1.7))) + ) + (func (export "as-loadN-address") (result i64) + (i64.load8_s (return (i64.const 30))) + ) + + (func (export "as-store-address") (result i32) + (f64.store (return (i32.const 30)) (f64.const 7)) (i32.const -1) + ) + (func (export "as-store-value") (result i32) + (i64.store (i32.const 2) (return (i32.const 31))) (i32.const -1) + ) + + (func (export "as-storeN-address") (result i32) + (i32.store8 (return (i32.const 32)) (i32.const 7)) (i32.const -1) + ) + (func (export "as-storeN-value") (result i32) + (i64.store16 (i32.const 2) (return (i32.const 33))) (i32.const -1) + ) + + (func (export "as-unary-operand") (result f32) + (f32.neg (return (f32.const 3.4))) + ) + + (func (export "as-binary-left") (result i32) + (i32.add (return (i32.const 3)) (i32.const 10)) + ) + (func (export "as-binary-right") (result i64) + (i64.sub (i64.const 10) (return (i64.const 45))) + ) + + (func (export "as-test-operand") (result i32) + (i32.eqz (return (i32.const 44))) + ) + + (func (export "as-compare-left") (result i32) + (f64.le (return (i32.const 43)) (f64.const 10)) + ) + (func (export "as-compare-right") (result i32) + (f32.ne (f32.const 10) (return (i32.const 42))) + ) + + (func (export "as-convert-operand") (result i32) + (i32.wrap/i64 (return (i32.const 41))) + ) + + (func (export "as-grow_memory-size") (result i32) + (grow_memory (return (i32.const 40))) + ) +) + +(assert_return (invoke "type-i32")) +(assert_return (invoke "type-i64")) +(assert_return (invoke "type-f32")) +(assert_return (invoke "type-f64")) + +(assert_return (invoke "nullary")) +(assert_return (invoke "unary") (f64.const 3)) + +(assert_return (invoke "as-func-first") (i32.const 1)) +(assert_return (invoke "as-func-mid") (i32.const 2)) +(assert_return (invoke "as-func-last")) +(assert_return (invoke "as-func-value") (i32.const 3)) + +(assert_return (invoke "as-block-first")) +(assert_return (invoke "as-block-mid")) +(assert_return (invoke "as-block-last")) +(assert_return (invoke "as-block-value") (i32.const 2)) + +(assert_return (invoke "as-loop-first") (i32.const 3)) +(assert_return (invoke "as-loop-mid") (i32.const 4)) +(assert_return (invoke "as-loop-last") (i32.const 5)) + +(assert_return (invoke "as-br-value") (i32.const 9)) + +(assert_return (invoke "as-br_if-cond")) +(assert_return (invoke "as-br_if-value") (i32.const 8)) +(assert_return (invoke "as-br_if-value-cond") (i32.const 9)) + +(assert_return (invoke "as-br_table-index") (i64.const 9)) +(assert_return (invoke "as-br_table-value") (i32.const 10)) +(assert_return (invoke "as-br_table-value-index") (i32.const 11)) + +(assert_return (invoke "as-return-value") (i64.const 7)) + +(assert_return (invoke "as-if-cond") (i32.const 2)) +(assert_return (invoke "as-if-then" (i32.const 1) (i32.const 6)) (i32.const 3)) +(assert_return (invoke "as-if-then" (i32.const 0) (i32.const 6)) (i32.const 6)) +(assert_return (invoke "as-if-else" (i32.const 0) (i32.const 6)) (i32.const 4)) +(assert_return (invoke "as-if-else" (i32.const 1) (i32.const 6)) (i32.const 6)) + +(assert_return (invoke "as-select-first" (i32.const 0) (i32.const 6)) (i32.const 5)) +(assert_return (invoke "as-select-first" (i32.const 1) (i32.const 6)) (i32.const 5)) +(assert_return (invoke "as-select-second" (i32.const 0) (i32.const 6)) (i32.const 6)) +(assert_return (invoke "as-select-second" (i32.const 1) (i32.const 6)) (i32.const 6)) +(assert_return (invoke "as-select-cond") (i32.const 7)) + +(assert_return (invoke "as-call-first") (i32.const 12)) +(assert_return (invoke "as-call-mid") (i32.const 13)) +(assert_return (invoke "as-call-last") (i32.const 14)) + +(assert_return (invoke "as-call_indirect-func") (i32.const 20)) +(assert_return (invoke "as-call_indirect-first") (i32.const 21)) +(assert_return (invoke "as-call_indirect-mid") (i32.const 22)) +(assert_return (invoke "as-call_indirect-last") (i32.const 23)) + +(assert_return (invoke "as-set_local-value") (i32.const 17)) + +(assert_return (invoke "as-load-address") (f32.const 1.7)) +(assert_return (invoke "as-loadN-address") (i64.const 30)) + +(assert_return (invoke "as-store-address") (i32.const 30)) +(assert_return (invoke "as-store-value") (i32.const 31)) +(assert_return (invoke "as-storeN-address") (i32.const 32)) +(assert_return (invoke "as-storeN-value") (i32.const 33)) + +(assert_return (invoke "as-unary-operand") (f32.const 3.4)) + +(assert_return (invoke "as-binary-left") (i32.const 3)) +(assert_return (invoke "as-binary-right") (i64.const 45)) + +(assert_return (invoke "as-test-operand") (i32.const 44)) + +(assert_return (invoke "as-compare-left") (i32.const 43)) +(assert_return (invoke "as-compare-right") (i32.const 42)) + +(assert_return (invoke "as-convert-operand") (i32.const 41)) + +(assert_return (invoke "as-grow_memory-size") (i32.const 40)) + +(assert_invalid + (module (func $type-value-empty-vs-num (result f64) (return))) + "type mismatch" +) +(assert_invalid + (module (func $type-value-void-vs-num (result f64) (return (nop)))) + "type mismatch" +) +(assert_invalid + (module (func $type-value-num-vs-num (result f64) (return (i64.const 1)))) + "type mismatch" +) + diff --git a/js/src/jit-test/tests/wasm/spec/return.wast.js b/js/src/jit-test/tests/wasm/spec/return.wast.js new file mode 100644 index 000000000..4c0864df0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/return.wast.js @@ -0,0 +1 @@ +var importedArgs = ['return.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/select.wast b/js/src/jit-test/tests/wasm/spec/select.wast new file mode 100644 index 000000000..a2406017f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/select.wast @@ -0,0 +1,57 @@ +(module + (func (export "select_i32") (param $lhs i32) (param $rhs i32) (param $cond i32) (result i32) + (select (get_local $lhs) (get_local $rhs) (get_local $cond))) + + (func (export "select_i64") (param $lhs i64) (param $rhs i64) (param $cond i32) (result i64) + (select (get_local $lhs) (get_local $rhs) (get_local $cond))) + + (func (export "select_f32") (param $lhs f32) (param $rhs f32) (param $cond i32) (result f32) + (select (get_local $lhs) (get_local $rhs) (get_local $cond))) + + (func (export "select_f64") (param $lhs f64) (param $rhs f64) (param $cond i32) (result f64) + (select (get_local $lhs) (get_local $rhs) (get_local $cond))) + + ;; Check that both sides of the select are evaluated + (func (export "select_trap_l") (param $cond i32) (result i32) + (select (unreachable) (i32.const 0) (get_local $cond))) + (func (export "select_trap_r") (param $cond i32) (result i32) + (select (i32.const 0) (unreachable) (get_local $cond))) +) + +(assert_return (invoke "select_i32" (i32.const 1) (i32.const 2) (i32.const 1)) (i32.const 1)) +(assert_return (invoke "select_i64" (i64.const 2) (i64.const 1) (i32.const 1)) (i64.const 2)) +(assert_return (invoke "select_f32" (f32.const 1) (f32.const 2) (i32.const 1)) (f32.const 1)) +(assert_return (invoke "select_f64" (f64.const 1) (f64.const 2) (i32.const 1)) (f64.const 1)) + +(assert_return (invoke "select_i32" (i32.const 1) (i32.const 2) (i32.const 0)) (i32.const 2)) +(assert_return (invoke "select_i32" (i32.const 2) (i32.const 1) (i32.const 0)) (i32.const 1)) +(assert_return (invoke "select_i64" (i64.const 2) (i64.const 1) (i32.const -1)) (i64.const 2)) +(assert_return (invoke "select_i64" (i64.const 2) (i64.const 1) (i32.const 0xf0f0f0f0)) (i64.const 2)) + +(assert_return (invoke "select_f32" (f32.const nan) (f32.const 1) (i32.const 1)) (f32.const nan)) +(assert_return (invoke "select_f32" (f32.const nan:0x20304) (f32.const 1) (i32.const 1)) (f32.const nan:0x20304)) +(assert_return (invoke "select_f32" (f32.const nan) (f32.const 1) (i32.const 0)) (f32.const 1)) +(assert_return (invoke "select_f32" (f32.const nan:0x20304) (f32.const 1) (i32.const 0)) (f32.const 1)) +(assert_return (invoke "select_f32" (f32.const 2) (f32.const nan) (i32.const 1)) (f32.const 2)) +(assert_return (invoke "select_f32" (f32.const 2) (f32.const nan:0x20304) (i32.const 1)) (f32.const 2)) +(assert_return (invoke "select_f32" (f32.const 2) (f32.const nan) (i32.const 0)) (f32.const nan)) +(assert_return (invoke "select_f32" (f32.const 2) (f32.const nan:0x20304) (i32.const 0)) (f32.const nan:0x20304)) + +(assert_return (invoke "select_f64" (f64.const nan) (f64.const 1) (i32.const 1)) (f64.const nan)) +(assert_return (invoke "select_f64" (f64.const nan:0x20304) (f64.const 1) (i32.const 1)) (f64.const nan:0x20304)) +(assert_return (invoke "select_f64" (f64.const nan) (f64.const 1) (i32.const 0)) (f64.const 1)) +(assert_return (invoke "select_f64" (f64.const nan:0x20304) (f64.const 1) (i32.const 0)) (f64.const 1)) +(assert_return (invoke "select_f64" (f64.const 2) (f64.const nan) (i32.const 1)) (f64.const 2)) +(assert_return (invoke "select_f64" (f64.const 2) (f64.const nan:0x20304) (i32.const 1)) (f64.const 2)) +(assert_return (invoke "select_f64" (f64.const 2) (f64.const nan) (i32.const 0)) (f64.const nan)) +(assert_return (invoke "select_f64" (f64.const 2) (f64.const nan:0x20304) (i32.const 0)) (f64.const nan:0x20304)) + +(assert_trap (invoke "select_trap_l" (i32.const 1)) "unreachable executed") +(assert_trap (invoke "select_trap_l" (i32.const 0)) "unreachable executed") +(assert_trap (invoke "select_trap_r" (i32.const 1)) "unreachable executed") +(assert_trap (invoke "select_trap_r" (i32.const 0)) "unreachable executed") + +(assert_invalid + (module (func $arity-0 (select (nop) (nop) (i32.const 1)))) + "type mismatch" +) diff --git a/js/src/jit-test/tests/wasm/spec/select.wast.js b/js/src/jit-test/tests/wasm/spec/select.wast.js new file mode 100644 index 000000000..8c3d86291 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/select.wast.js @@ -0,0 +1 @@ +var importedArgs = ['select.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/set_local.wast b/js/src/jit-test/tests/wasm/spec/set_local.wast new file mode 100644 index 000000000..5a006e114 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/set_local.wast @@ -0,0 +1,205 @@ +;; Test `set_local` operator + +(module + ;; Typing + + (func (export "type-local-i32") (local i32) (set_local 0 (i32.const 0))) + (func (export "type-local-i64") (local i64) (set_local 0 (i64.const 0))) + (func (export "type-local-f32") (local f32) (set_local 0 (f32.const 0))) + (func (export "type-local-f64") (local f64) (set_local 0 (f64.const 0))) + + (func (export "type-param-i32") (param i32) (set_local 0 (i32.const 10))) + (func (export "type-param-i64") (param i64) (set_local 0 (i64.const 11))) + (func (export "type-param-f32") (param f32) (set_local 0 (f32.const 11.1))) + (func (export "type-param-f64") (param f64) (set_local 0 (f64.const 12.2))) + + (func (export "type-mixed") (param i64 f32 f64 i32 i32) (local f32 i64 i64 f64) + (set_local 0 (i64.const 0)) + (set_local 1 (f32.const 0)) + (set_local 2 (f64.const 0)) + (set_local 3 (i32.const 0)) + (set_local 4 (i32.const 0)) + (set_local 5 (f32.const 0)) + (set_local 6 (i64.const 0)) + (set_local 7 (i64.const 0)) + (set_local 8 (f64.const 0)) + ) + + ;; Writing + + (func (export "write") (param i64 f32 f64 i32 i32) (result i64) + (local f32 i64 i64 f64) + (set_local 1 (f32.const -0.3)) + (set_local 3 (i32.const 40)) + (set_local 4 (i32.const -7)) + (set_local 5 (f32.const 5.5)) + (set_local 6 (i64.const 6)) + (set_local 8 (f64.const 8)) + (i64.trunc_s/f64 + (f64.add + (f64.convert_u/i64 (get_local 0)) + (f64.add + (f64.promote/f32 (get_local 1)) + (f64.add + (get_local 2) + (f64.add + (f64.convert_u/i32 (get_local 3)) + (f64.add + (f64.convert_s/i32 (get_local 4)) + (f64.add + (f64.promote/f32 (get_local 5)) + (f64.add + (f64.convert_u/i64 (get_local 6)) + (f64.add + (f64.convert_u/i64 (get_local 7)) + (get_local 8) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) +) + +(assert_return (invoke "type-local-i32")) +(assert_return (invoke "type-local-i64")) +(assert_return (invoke "type-local-f32")) +(assert_return (invoke "type-local-f64")) + +(assert_return (invoke "type-param-i32" (i32.const 2))) +(assert_return (invoke "type-param-i64" (i64.const 3))) +(assert_return (invoke "type-param-f32" (f32.const 4.4))) +(assert_return (invoke "type-param-f64" (f64.const 5.5))) + +(assert_return + (invoke "type-mixed" + (i64.const 1) (f32.const 2.2) (f64.const 3.3) (i32.const 4) (i32.const 5) + ) +) + +(assert_return + (invoke "write" + (i64.const 1) (f32.const 2) (f64.const 3.3) (i32.const 4) (i32.const 5) + ) + (i64.const 56) +) + + +;; Invalid typing of access to locals + +(assert_invalid + (module (func $type-local-num-vs-num (result i64) (local i32) + (set_local 0 (i32.const 0)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-local-num-vs-num (local f32) + (i32.eqz (set_local 0 (f32.const 0))) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-local-num-vs-num (local f64 i64) + (f64.neg (set_local 1 (i64.const 0))) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-local-arg-void-vs-num (local i32) (set_local 0 (nop)))) + "type mismatch" +) +(assert_invalid + (module (func $type-local-arg-num-vs-num (local i32) (set_local 0 (f32.const 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-local-arg-num-vs-num (local f32) (set_local 0 (f64.const 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-local-arg-num-vs-num (local f64 i64) (set_local 1 (f64.const 0)))) + "type mismatch" +) + + +;; Invalid typing of access to parameters + +(assert_invalid + (module (func $type-param-num-vs-num (param i32) (result i64) (get_local 0))) + "type mismatch" +) +(assert_invalid + (module (func $type-param-num-vs-num (param f32) (i32.eqz (get_local 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-param-num-vs-num (param f64 i64) (f64.neg (get_local 1)))) + "type mismatch" +) + +(assert_invalid + (module (func $type-param-arg-void-vs-num (param i32) (set_local 0 (nop)))) + "type mismatch" +) +(assert_invalid + (module (func $type-param-arg-num-vs-num (param i32) (set_local 0 (f32.const 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-param-arg-num-vs-num (param f32) (set_local 0 (f64.const 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-param-arg-num-vs-num (param f64 i64) (set_local 1 (f64.const 0)))) + "type mismatch" +) + + +;; Invalid local index + +(assert_invalid + (module (func $unbound-local (local i32 i64) (get_local 3))) + "unknown local" +) +(assert_invalid + (module (func $large-local (local i32 i64) (get_local 14324343))) + "unknown local" +) + +(assert_invalid + (module (func $unbound-param (param i32 i64) (get_local 2))) + "unknown local" +) +(assert_invalid + (module (func $large-param (local i32 i64) (get_local 714324343))) + "unknown local" +) + +(assert_invalid + (module (func $unbound-mixed (param i32) (local i32 i64) (get_local 3))) + "unknown local" +) +(assert_invalid + (module (func $large-mixed (param i64) (local i32 i64) (get_local 214324343))) + "unknown local" +) + +(assert_invalid + (module (func $type-mixed-arg-num-vs-num (param f32) (local i32) (set_local 1 (f32.const 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-mixed-arg-num-vs-num (param i64 i32) (local f32) (set_local 1 (f32.const 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-mixed-arg-num-vs-num (param i64) (local f64 i64) (set_local 1 (i64.const 0)))) + "type mismatch" +) + diff --git a/js/src/jit-test/tests/wasm/spec/set_local.wast.js b/js/src/jit-test/tests/wasm/spec/set_local.wast.js new file mode 100644 index 000000000..a0049fea8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/set_local.wast.js @@ -0,0 +1 @@ +var importedArgs = ['set_local.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/skip-stack-guard-page.wast b/js/src/jit-test/tests/wasm/spec/skip-stack-guard-page.wast new file mode 100644 index 000000000..2b9f1ccea --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/skip-stack-guard-page.wast @@ -0,0 +1,2284 @@ +;; This tests that the stack overflow guard page can't be skipped by a function with more than a page of locals. +(module + (memory 1) + (export "test-guard-page-skip" (func $test-guard-page-skip)) + + (func $test-guard-page-skip + (param $depth i32) + (if (i32.eq (get_local $depth) (i32.const 0)) + (then (call $function-with-many-locals)) + (else (call $test-guard-page-skip (i32.sub (get_local $depth) (i32.const 1)))) + ) + ) + + (func $function-with-many-locals + + ;; 1056 i64 = 8448 bytes of locals + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x000-0x007 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x008-0x00f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x010-0x017 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x018-0x01f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x020-0x027 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x028-0x02f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x030-0x037 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x038-0x03f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x040-0x047 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x048-0x04f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x050-0x057 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x058-0x05f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x060-0x067 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x068-0x06f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x070-0x077 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x078-0x07f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x080-0x087 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x088-0x08f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x090-0x097 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x098-0x09f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0a0-0x0a7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0a8-0x0af + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0b0-0x0b7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0b8-0x0bf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0c0-0x0c7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0c8-0x0cf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0d0-0x0d7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0d8-0x0df + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0e0-0x0e7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0e8-0x0ef + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0f0-0x0f7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0f8-0x0ff + + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x100-0x107 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x108-0x10f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x110-0x117 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x118-0x11f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x120-0x127 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x128-0x12f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x130-0x137 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x138-0x13f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x140-0x147 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x148-0x14f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x150-0x157 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x158-0x15f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x160-0x167 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x168-0x16f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x170-0x177 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x178-0x17f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x180-0x187 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x188-0x18f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x190-0x197 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x198-0x19f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1a0-0x1a7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1a8-0x1af + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1b0-0x1b7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1b8-0x1bf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1c0-0x1c7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1c8-0x1cf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1d0-0x1d7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1d8-0x1df + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1e0-0x1e7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1e8-0x1ef + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1f0-0x1f7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1f8-0x1ff + + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x200-0x207 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x208-0x20f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x210-0x217 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x218-0x21f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x220-0x227 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x228-0x22f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x230-0x237 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x238-0x23f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x240-0x247 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x248-0x24f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x250-0x257 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x258-0x25f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x260-0x267 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x268-0x26f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x270-0x277 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x278-0x27f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x280-0x287 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x288-0x28f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x290-0x297 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x298-0x29f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2a0-0x2a7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2a8-0x2af + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2b0-0x2b7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2b8-0x2bf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2c0-0x2c7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2c8-0x2cf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2d0-0x2d7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2d8-0x2df + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2e0-0x2e7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2e8-0x2ef + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2f0-0x2f7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2f8-0x2ff + + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x300-0x307 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x308-0x30f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x310-0x317 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x318-0x31f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x320-0x327 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x328-0x32f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x330-0x337 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x338-0x33f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x340-0x347 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x348-0x34f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x350-0x357 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x358-0x35f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x360-0x367 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x368-0x36f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x370-0x377 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x378-0x37f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x380-0x387 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x388-0x38f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x390-0x397 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x398-0x39f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3a0-0x3a7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3a8-0x3af + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3b0-0x3b7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3b8-0x3bf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3c0-0x3c7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3c8-0x3cf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3d0-0x3d7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3d8-0x3df + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3e0-0x3e7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3e8-0x3ef + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3f0-0x3f7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3f8-0x3ff + + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x400-0x407 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x408-0x40f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x410-0x417 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x418-0x41f + + ;; recurse first to try to make the callee access the stack below the space allocated for the locals before the locals themselves have been initialized. + (call $function-with-many-locals) + + ;; load from memory into the locals + (set_local 0x000 (i64.load offset=0x000 align=1 (i32.const 0))) + (set_local 0x001 (i64.load offset=0x001 align=1 (i32.const 0))) + (set_local 0x002 (i64.load offset=0x002 align=1 (i32.const 0))) + (set_local 0x003 (i64.load offset=0x003 align=1 (i32.const 0))) + (set_local 0x004 (i64.load offset=0x004 align=1 (i32.const 0))) + (set_local 0x005 (i64.load offset=0x005 align=1 (i32.const 0))) + (set_local 0x006 (i64.load offset=0x006 align=1 (i32.const 0))) + (set_local 0x007 (i64.load offset=0x007 align=1 (i32.const 0))) + (set_local 0x008 (i64.load offset=0x008 align=1 (i32.const 0))) + (set_local 0x009 (i64.load offset=0x009 align=1 (i32.const 0))) + (set_local 0x00a (i64.load offset=0x00a align=1 (i32.const 0))) + (set_local 0x00b (i64.load offset=0x00b align=1 (i32.const 0))) + (set_local 0x00c (i64.load offset=0x00c align=1 (i32.const 0))) + (set_local 0x00d (i64.load offset=0x00d align=1 (i32.const 0))) + (set_local 0x00e (i64.load offset=0x00e align=1 (i32.const 0))) + (set_local 0x00f (i64.load offset=0x00f align=1 (i32.const 0))) + (set_local 0x010 (i64.load offset=0x010 align=1 (i32.const 0))) + (set_local 0x011 (i64.load offset=0x011 align=1 (i32.const 0))) + (set_local 0x012 (i64.load offset=0x012 align=1 (i32.const 0))) + (set_local 0x013 (i64.load offset=0x013 align=1 (i32.const 0))) + (set_local 0x014 (i64.load offset=0x014 align=1 (i32.const 0))) + (set_local 0x015 (i64.load offset=0x015 align=1 (i32.const 0))) + (set_local 0x016 (i64.load offset=0x016 align=1 (i32.const 0))) + (set_local 0x017 (i64.load offset=0x017 align=1 (i32.const 0))) + (set_local 0x018 (i64.load offset=0x018 align=1 (i32.const 0))) + (set_local 0x019 (i64.load offset=0x019 align=1 (i32.const 0))) + (set_local 0x01a (i64.load offset=0x01a align=1 (i32.const 0))) + (set_local 0x01b (i64.load offset=0x01b align=1 (i32.const 0))) + (set_local 0x01c (i64.load offset=0x01c align=1 (i32.const 0))) + (set_local 0x01d (i64.load offset=0x01d align=1 (i32.const 0))) + (set_local 0x01e (i64.load offset=0x01e align=1 (i32.const 0))) + (set_local 0x01f (i64.load offset=0x01f align=1 (i32.const 0))) + (set_local 0x020 (i64.load offset=0x020 align=1 (i32.const 0))) + (set_local 0x021 (i64.load offset=0x021 align=1 (i32.const 0))) + (set_local 0x022 (i64.load offset=0x022 align=1 (i32.const 0))) + (set_local 0x023 (i64.load offset=0x023 align=1 (i32.const 0))) + (set_local 0x024 (i64.load offset=0x024 align=1 (i32.const 0))) + (set_local 0x025 (i64.load offset=0x025 align=1 (i32.const 0))) + (set_local 0x026 (i64.load offset=0x026 align=1 (i32.const 0))) + (set_local 0x027 (i64.load offset=0x027 align=1 (i32.const 0))) + (set_local 0x028 (i64.load offset=0x028 align=1 (i32.const 0))) + (set_local 0x029 (i64.load offset=0x029 align=1 (i32.const 0))) + (set_local 0x02a (i64.load offset=0x02a align=1 (i32.const 0))) + (set_local 0x02b (i64.load offset=0x02b align=1 (i32.const 0))) + (set_local 0x02c (i64.load offset=0x02c align=1 (i32.const 0))) + (set_local 0x02d (i64.load offset=0x02d align=1 (i32.const 0))) + (set_local 0x02e (i64.load offset=0x02e align=1 (i32.const 0))) + (set_local 0x02f (i64.load offset=0x02f align=1 (i32.const 0))) + (set_local 0x030 (i64.load offset=0x030 align=1 (i32.const 0))) + (set_local 0x031 (i64.load offset=0x031 align=1 (i32.const 0))) + (set_local 0x032 (i64.load offset=0x032 align=1 (i32.const 0))) + (set_local 0x033 (i64.load offset=0x033 align=1 (i32.const 0))) + (set_local 0x034 (i64.load offset=0x034 align=1 (i32.const 0))) + (set_local 0x035 (i64.load offset=0x035 align=1 (i32.const 0))) + (set_local 0x036 (i64.load offset=0x036 align=1 (i32.const 0))) + (set_local 0x037 (i64.load offset=0x037 align=1 (i32.const 0))) + (set_local 0x038 (i64.load offset=0x038 align=1 (i32.const 0))) + (set_local 0x039 (i64.load offset=0x039 align=1 (i32.const 0))) + (set_local 0x03a (i64.load offset=0x03a align=1 (i32.const 0))) + (set_local 0x03b (i64.load offset=0x03b align=1 (i32.const 0))) + (set_local 0x03c (i64.load offset=0x03c align=1 (i32.const 0))) + (set_local 0x03d (i64.load offset=0x03d align=1 (i32.const 0))) + (set_local 0x03e (i64.load offset=0x03e align=1 (i32.const 0))) + (set_local 0x03f (i64.load offset=0x03f align=1 (i32.const 0))) + (set_local 0x040 (i64.load offset=0x040 align=1 (i32.const 0))) + (set_local 0x041 (i64.load offset=0x041 align=1 (i32.const 0))) + (set_local 0x042 (i64.load offset=0x042 align=1 (i32.const 0))) + (set_local 0x043 (i64.load offset=0x043 align=1 (i32.const 0))) + (set_local 0x044 (i64.load offset=0x044 align=1 (i32.const 0))) + (set_local 0x045 (i64.load offset=0x045 align=1 (i32.const 0))) + (set_local 0x046 (i64.load offset=0x046 align=1 (i32.const 0))) + (set_local 0x047 (i64.load offset=0x047 align=1 (i32.const 0))) + (set_local 0x048 (i64.load offset=0x048 align=1 (i32.const 0))) + (set_local 0x049 (i64.load offset=0x049 align=1 (i32.const 0))) + (set_local 0x04a (i64.load offset=0x04a align=1 (i32.const 0))) + (set_local 0x04b (i64.load offset=0x04b align=1 (i32.const 0))) + (set_local 0x04c (i64.load offset=0x04c align=1 (i32.const 0))) + (set_local 0x04d (i64.load offset=0x04d align=1 (i32.const 0))) + (set_local 0x04e (i64.load offset=0x04e align=1 (i32.const 0))) + (set_local 0x04f (i64.load offset=0x04f align=1 (i32.const 0))) + (set_local 0x050 (i64.load offset=0x050 align=1 (i32.const 0))) + (set_local 0x051 (i64.load offset=0x051 align=1 (i32.const 0))) + (set_local 0x052 (i64.load offset=0x052 align=1 (i32.const 0))) + (set_local 0x053 (i64.load offset=0x053 align=1 (i32.const 0))) + (set_local 0x054 (i64.load offset=0x054 align=1 (i32.const 0))) + (set_local 0x055 (i64.load offset=0x055 align=1 (i32.const 0))) + (set_local 0x056 (i64.load offset=0x056 align=1 (i32.const 0))) + (set_local 0x057 (i64.load offset=0x057 align=1 (i32.const 0))) + (set_local 0x058 (i64.load offset=0x058 align=1 (i32.const 0))) + (set_local 0x059 (i64.load offset=0x059 align=1 (i32.const 0))) + (set_local 0x05a (i64.load offset=0x05a align=1 (i32.const 0))) + (set_local 0x05b (i64.load offset=0x05b align=1 (i32.const 0))) + (set_local 0x05c (i64.load offset=0x05c align=1 (i32.const 0))) + (set_local 0x05d (i64.load offset=0x05d align=1 (i32.const 0))) + (set_local 0x05e (i64.load offset=0x05e align=1 (i32.const 0))) + (set_local 0x05f (i64.load offset=0x05f align=1 (i32.const 0))) + (set_local 0x060 (i64.load offset=0x060 align=1 (i32.const 0))) + (set_local 0x061 (i64.load offset=0x061 align=1 (i32.const 0))) + (set_local 0x062 (i64.load offset=0x062 align=1 (i32.const 0))) + (set_local 0x063 (i64.load offset=0x063 align=1 (i32.const 0))) + (set_local 0x064 (i64.load offset=0x064 align=1 (i32.const 0))) + (set_local 0x065 (i64.load offset=0x065 align=1 (i32.const 0))) + (set_local 0x066 (i64.load offset=0x066 align=1 (i32.const 0))) + (set_local 0x067 (i64.load offset=0x067 align=1 (i32.const 0))) + (set_local 0x068 (i64.load offset=0x068 align=1 (i32.const 0))) + (set_local 0x069 (i64.load offset=0x069 align=1 (i32.const 0))) + (set_local 0x06a (i64.load offset=0x06a align=1 (i32.const 0))) + (set_local 0x06b (i64.load offset=0x06b align=1 (i32.const 0))) + (set_local 0x06c (i64.load offset=0x06c align=1 (i32.const 0))) + (set_local 0x06d (i64.load offset=0x06d align=1 (i32.const 0))) + (set_local 0x06e (i64.load offset=0x06e align=1 (i32.const 0))) + (set_local 0x06f (i64.load offset=0x06f align=1 (i32.const 0))) + (set_local 0x070 (i64.load offset=0x070 align=1 (i32.const 0))) + (set_local 0x071 (i64.load offset=0x071 align=1 (i32.const 0))) + (set_local 0x072 (i64.load offset=0x072 align=1 (i32.const 0))) + (set_local 0x073 (i64.load offset=0x073 align=1 (i32.const 0))) + (set_local 0x074 (i64.load offset=0x074 align=1 (i32.const 0))) + (set_local 0x075 (i64.load offset=0x075 align=1 (i32.const 0))) + (set_local 0x076 (i64.load offset=0x076 align=1 (i32.const 0))) + (set_local 0x077 (i64.load offset=0x077 align=1 (i32.const 0))) + (set_local 0x078 (i64.load offset=0x078 align=1 (i32.const 0))) + (set_local 0x079 (i64.load offset=0x079 align=1 (i32.const 0))) + (set_local 0x07a (i64.load offset=0x07a align=1 (i32.const 0))) + (set_local 0x07b (i64.load offset=0x07b align=1 (i32.const 0))) + (set_local 0x07c (i64.load offset=0x07c align=1 (i32.const 0))) + (set_local 0x07d (i64.load offset=0x07d align=1 (i32.const 0))) + (set_local 0x07e (i64.load offset=0x07e align=1 (i32.const 0))) + (set_local 0x07f (i64.load offset=0x07f align=1 (i32.const 0))) + (set_local 0x080 (i64.load offset=0x080 align=1 (i32.const 0))) + (set_local 0x081 (i64.load offset=0x081 align=1 (i32.const 0))) + (set_local 0x082 (i64.load offset=0x082 align=1 (i32.const 0))) + (set_local 0x083 (i64.load offset=0x083 align=1 (i32.const 0))) + (set_local 0x084 (i64.load offset=0x084 align=1 (i32.const 0))) + (set_local 0x085 (i64.load offset=0x085 align=1 (i32.const 0))) + (set_local 0x086 (i64.load offset=0x086 align=1 (i32.const 0))) + (set_local 0x087 (i64.load offset=0x087 align=1 (i32.const 0))) + (set_local 0x088 (i64.load offset=0x088 align=1 (i32.const 0))) + (set_local 0x089 (i64.load offset=0x089 align=1 (i32.const 0))) + (set_local 0x08a (i64.load offset=0x08a align=1 (i32.const 0))) + (set_local 0x08b (i64.load offset=0x08b align=1 (i32.const 0))) + (set_local 0x08c (i64.load offset=0x08c align=1 (i32.const 0))) + (set_local 0x08d (i64.load offset=0x08d align=1 (i32.const 0))) + (set_local 0x08e (i64.load offset=0x08e align=1 (i32.const 0))) + (set_local 0x08f (i64.load offset=0x08f align=1 (i32.const 0))) + (set_local 0x090 (i64.load offset=0x090 align=1 (i32.const 0))) + (set_local 0x091 (i64.load offset=0x091 align=1 (i32.const 0))) + (set_local 0x092 (i64.load offset=0x092 align=1 (i32.const 0))) + (set_local 0x093 (i64.load offset=0x093 align=1 (i32.const 0))) + (set_local 0x094 (i64.load offset=0x094 align=1 (i32.const 0))) + (set_local 0x095 (i64.load offset=0x095 align=1 (i32.const 0))) + (set_local 0x096 (i64.load offset=0x096 align=1 (i32.const 0))) + (set_local 0x097 (i64.load offset=0x097 align=1 (i32.const 0))) + (set_local 0x098 (i64.load offset=0x098 align=1 (i32.const 0))) + (set_local 0x099 (i64.load offset=0x099 align=1 (i32.const 0))) + (set_local 0x09a (i64.load offset=0x09a align=1 (i32.const 0))) + (set_local 0x09b (i64.load offset=0x09b align=1 (i32.const 0))) + (set_local 0x09c (i64.load offset=0x09c align=1 (i32.const 0))) + (set_local 0x09d (i64.load offset=0x09d align=1 (i32.const 0))) + (set_local 0x09e (i64.load offset=0x09e align=1 (i32.const 0))) + (set_local 0x09f (i64.load offset=0x09f align=1 (i32.const 0))) + (set_local 0x0a0 (i64.load offset=0x0a0 align=1 (i32.const 0))) + (set_local 0x0a1 (i64.load offset=0x0a1 align=1 (i32.const 0))) + (set_local 0x0a2 (i64.load offset=0x0a2 align=1 (i32.const 0))) + (set_local 0x0a3 (i64.load offset=0x0a3 align=1 (i32.const 0))) + (set_local 0x0a4 (i64.load offset=0x0a4 align=1 (i32.const 0))) + (set_local 0x0a5 (i64.load offset=0x0a5 align=1 (i32.const 0))) + (set_local 0x0a6 (i64.load offset=0x0a6 align=1 (i32.const 0))) + (set_local 0x0a7 (i64.load offset=0x0a7 align=1 (i32.const 0))) + (set_local 0x0a8 (i64.load offset=0x0a8 align=1 (i32.const 0))) + (set_local 0x0a9 (i64.load offset=0x0a9 align=1 (i32.const 0))) + (set_local 0x0aa (i64.load offset=0x0aa align=1 (i32.const 0))) + (set_local 0x0ab (i64.load offset=0x0ab align=1 (i32.const 0))) + (set_local 0x0ac (i64.load offset=0x0ac align=1 (i32.const 0))) + (set_local 0x0ad (i64.load offset=0x0ad align=1 (i32.const 0))) + (set_local 0x0ae (i64.load offset=0x0ae align=1 (i32.const 0))) + (set_local 0x0af (i64.load offset=0x0af align=1 (i32.const 0))) + (set_local 0x0b0 (i64.load offset=0x0b0 align=1 (i32.const 0))) + (set_local 0x0b1 (i64.load offset=0x0b1 align=1 (i32.const 0))) + (set_local 0x0b2 (i64.load offset=0x0b2 align=1 (i32.const 0))) + (set_local 0x0b3 (i64.load offset=0x0b3 align=1 (i32.const 0))) + (set_local 0x0b4 (i64.load offset=0x0b4 align=1 (i32.const 0))) + (set_local 0x0b5 (i64.load offset=0x0b5 align=1 (i32.const 0))) + (set_local 0x0b6 (i64.load offset=0x0b6 align=1 (i32.const 0))) + (set_local 0x0b7 (i64.load offset=0x0b7 align=1 (i32.const 0))) + (set_local 0x0b8 (i64.load offset=0x0b8 align=1 (i32.const 0))) + (set_local 0x0b9 (i64.load offset=0x0b9 align=1 (i32.const 0))) + (set_local 0x0ba (i64.load offset=0x0ba align=1 (i32.const 0))) + (set_local 0x0bb (i64.load offset=0x0bb align=1 (i32.const 0))) + (set_local 0x0bc (i64.load offset=0x0bc align=1 (i32.const 0))) + (set_local 0x0bd (i64.load offset=0x0bd align=1 (i32.const 0))) + (set_local 0x0be (i64.load offset=0x0be align=1 (i32.const 0))) + (set_local 0x0bf (i64.load offset=0x0bf align=1 (i32.const 0))) + (set_local 0x0c0 (i64.load offset=0x0c0 align=1 (i32.const 0))) + (set_local 0x0c1 (i64.load offset=0x0c1 align=1 (i32.const 0))) + (set_local 0x0c2 (i64.load offset=0x0c2 align=1 (i32.const 0))) + (set_local 0x0c3 (i64.load offset=0x0c3 align=1 (i32.const 0))) + (set_local 0x0c4 (i64.load offset=0x0c4 align=1 (i32.const 0))) + (set_local 0x0c5 (i64.load offset=0x0c5 align=1 (i32.const 0))) + (set_local 0x0c6 (i64.load offset=0x0c6 align=1 (i32.const 0))) + (set_local 0x0c7 (i64.load offset=0x0c7 align=1 (i32.const 0))) + (set_local 0x0c8 (i64.load offset=0x0c8 align=1 (i32.const 0))) + (set_local 0x0c9 (i64.load offset=0x0c9 align=1 (i32.const 0))) + (set_local 0x0ca (i64.load offset=0x0ca align=1 (i32.const 0))) + (set_local 0x0cb (i64.load offset=0x0cb align=1 (i32.const 0))) + (set_local 0x0cc (i64.load offset=0x0cc align=1 (i32.const 0))) + (set_local 0x0cd (i64.load offset=0x0cd align=1 (i32.const 0))) + (set_local 0x0ce (i64.load offset=0x0ce align=1 (i32.const 0))) + (set_local 0x0cf (i64.load offset=0x0cf align=1 (i32.const 0))) + (set_local 0x0d0 (i64.load offset=0x0d0 align=1 (i32.const 0))) + (set_local 0x0d1 (i64.load offset=0x0d1 align=1 (i32.const 0))) + (set_local 0x0d2 (i64.load offset=0x0d2 align=1 (i32.const 0))) + (set_local 0x0d3 (i64.load offset=0x0d3 align=1 (i32.const 0))) + (set_local 0x0d4 (i64.load offset=0x0d4 align=1 (i32.const 0))) + (set_local 0x0d5 (i64.load offset=0x0d5 align=1 (i32.const 0))) + (set_local 0x0d6 (i64.load offset=0x0d6 align=1 (i32.const 0))) + (set_local 0x0d7 (i64.load offset=0x0d7 align=1 (i32.const 0))) + (set_local 0x0d8 (i64.load offset=0x0d8 align=1 (i32.const 0))) + (set_local 0x0d9 (i64.load offset=0x0d9 align=1 (i32.const 0))) + (set_local 0x0da (i64.load offset=0x0da align=1 (i32.const 0))) + (set_local 0x0db (i64.load offset=0x0db align=1 (i32.const 0))) + (set_local 0x0dc (i64.load offset=0x0dc align=1 (i32.const 0))) + (set_local 0x0dd (i64.load offset=0x0dd align=1 (i32.const 0))) + (set_local 0x0de (i64.load offset=0x0de align=1 (i32.const 0))) + (set_local 0x0df (i64.load offset=0x0df align=1 (i32.const 0))) + (set_local 0x0e0 (i64.load offset=0x0e0 align=1 (i32.const 0))) + (set_local 0x0e1 (i64.load offset=0x0e1 align=1 (i32.const 0))) + (set_local 0x0e2 (i64.load offset=0x0e2 align=1 (i32.const 0))) + (set_local 0x0e3 (i64.load offset=0x0e3 align=1 (i32.const 0))) + (set_local 0x0e4 (i64.load offset=0x0e4 align=1 (i32.const 0))) + (set_local 0x0e5 (i64.load offset=0x0e5 align=1 (i32.const 0))) + (set_local 0x0e6 (i64.load offset=0x0e6 align=1 (i32.const 0))) + (set_local 0x0e7 (i64.load offset=0x0e7 align=1 (i32.const 0))) + (set_local 0x0e8 (i64.load offset=0x0e8 align=1 (i32.const 0))) + (set_local 0x0e9 (i64.load offset=0x0e9 align=1 (i32.const 0))) + (set_local 0x0ea (i64.load offset=0x0ea align=1 (i32.const 0))) + (set_local 0x0eb (i64.load offset=0x0eb align=1 (i32.const 0))) + (set_local 0x0ec (i64.load offset=0x0ec align=1 (i32.const 0))) + (set_local 0x0ed (i64.load offset=0x0ed align=1 (i32.const 0))) + (set_local 0x0ee (i64.load offset=0x0ee align=1 (i32.const 0))) + (set_local 0x0ef (i64.load offset=0x0ef align=1 (i32.const 0))) + (set_local 0x0f0 (i64.load offset=0x0f0 align=1 (i32.const 0))) + (set_local 0x0f1 (i64.load offset=0x0f1 align=1 (i32.const 0))) + (set_local 0x0f2 (i64.load offset=0x0f2 align=1 (i32.const 0))) + (set_local 0x0f3 (i64.load offset=0x0f3 align=1 (i32.const 0))) + (set_local 0x0f4 (i64.load offset=0x0f4 align=1 (i32.const 0))) + (set_local 0x0f5 (i64.load offset=0x0f5 align=1 (i32.const 0))) + (set_local 0x0f6 (i64.load offset=0x0f6 align=1 (i32.const 0))) + (set_local 0x0f7 (i64.load offset=0x0f7 align=1 (i32.const 0))) + (set_local 0x0f8 (i64.load offset=0x0f8 align=1 (i32.const 0))) + (set_local 0x0f9 (i64.load offset=0x0f9 align=1 (i32.const 0))) + (set_local 0x0fa (i64.load offset=0x0fa align=1 (i32.const 0))) + (set_local 0x0fb (i64.load offset=0x0fb align=1 (i32.const 0))) + (set_local 0x0fc (i64.load offset=0x0fc align=1 (i32.const 0))) + (set_local 0x0fd (i64.load offset=0x0fd align=1 (i32.const 0))) + (set_local 0x0fe (i64.load offset=0x0fe align=1 (i32.const 0))) + (set_local 0x0ff (i64.load offset=0x0ff align=1 (i32.const 0))) + (set_local 0x100 (i64.load offset=0x100 align=1 (i32.const 0))) + (set_local 0x101 (i64.load offset=0x101 align=1 (i32.const 0))) + (set_local 0x102 (i64.load offset=0x102 align=1 (i32.const 0))) + (set_local 0x103 (i64.load offset=0x103 align=1 (i32.const 0))) + (set_local 0x104 (i64.load offset=0x104 align=1 (i32.const 0))) + (set_local 0x105 (i64.load offset=0x105 align=1 (i32.const 0))) + (set_local 0x106 (i64.load offset=0x106 align=1 (i32.const 0))) + (set_local 0x107 (i64.load offset=0x107 align=1 (i32.const 0))) + (set_local 0x108 (i64.load offset=0x108 align=1 (i32.const 0))) + (set_local 0x109 (i64.load offset=0x109 align=1 (i32.const 0))) + (set_local 0x10a (i64.load offset=0x10a align=1 (i32.const 0))) + (set_local 0x10b (i64.load offset=0x10b align=1 (i32.const 0))) + (set_local 0x10c (i64.load offset=0x10c align=1 (i32.const 0))) + (set_local 0x10d (i64.load offset=0x10d align=1 (i32.const 0))) + (set_local 0x10e (i64.load offset=0x10e align=1 (i32.const 0))) + (set_local 0x10f (i64.load offset=0x10f align=1 (i32.const 0))) + (set_local 0x110 (i64.load offset=0x110 align=1 (i32.const 0))) + (set_local 0x111 (i64.load offset=0x111 align=1 (i32.const 0))) + (set_local 0x112 (i64.load offset=0x112 align=1 (i32.const 0))) + (set_local 0x113 (i64.load offset=0x113 align=1 (i32.const 0))) + (set_local 0x114 (i64.load offset=0x114 align=1 (i32.const 0))) + (set_local 0x115 (i64.load offset=0x115 align=1 (i32.const 0))) + (set_local 0x116 (i64.load offset=0x116 align=1 (i32.const 0))) + (set_local 0x117 (i64.load offset=0x117 align=1 (i32.const 0))) + (set_local 0x118 (i64.load offset=0x118 align=1 (i32.const 0))) + (set_local 0x119 (i64.load offset=0x119 align=1 (i32.const 0))) + (set_local 0x11a (i64.load offset=0x11a align=1 (i32.const 0))) + (set_local 0x11b (i64.load offset=0x11b align=1 (i32.const 0))) + (set_local 0x11c (i64.load offset=0x11c align=1 (i32.const 0))) + (set_local 0x11d (i64.load offset=0x11d align=1 (i32.const 0))) + (set_local 0x11e (i64.load offset=0x11e align=1 (i32.const 0))) + (set_local 0x11f (i64.load offset=0x11f align=1 (i32.const 0))) + (set_local 0x120 (i64.load offset=0x120 align=1 (i32.const 0))) + (set_local 0x121 (i64.load offset=0x121 align=1 (i32.const 0))) + (set_local 0x122 (i64.load offset=0x122 align=1 (i32.const 0))) + (set_local 0x123 (i64.load offset=0x123 align=1 (i32.const 0))) + (set_local 0x124 (i64.load offset=0x124 align=1 (i32.const 0))) + (set_local 0x125 (i64.load offset=0x125 align=1 (i32.const 0))) + (set_local 0x126 (i64.load offset=0x126 align=1 (i32.const 0))) + (set_local 0x127 (i64.load offset=0x127 align=1 (i32.const 0))) + (set_local 0x128 (i64.load offset=0x128 align=1 (i32.const 0))) + (set_local 0x129 (i64.load offset=0x129 align=1 (i32.const 0))) + (set_local 0x12a (i64.load offset=0x12a align=1 (i32.const 0))) + (set_local 0x12b (i64.load offset=0x12b align=1 (i32.const 0))) + (set_local 0x12c (i64.load offset=0x12c align=1 (i32.const 0))) + (set_local 0x12d (i64.load offset=0x12d align=1 (i32.const 0))) + (set_local 0x12e (i64.load offset=0x12e align=1 (i32.const 0))) + (set_local 0x12f (i64.load offset=0x12f align=1 (i32.const 0))) + (set_local 0x130 (i64.load offset=0x130 align=1 (i32.const 0))) + (set_local 0x131 (i64.load offset=0x131 align=1 (i32.const 0))) + (set_local 0x132 (i64.load offset=0x132 align=1 (i32.const 0))) + (set_local 0x133 (i64.load offset=0x133 align=1 (i32.const 0))) + (set_local 0x134 (i64.load offset=0x134 align=1 (i32.const 0))) + (set_local 0x135 (i64.load offset=0x135 align=1 (i32.const 0))) + (set_local 0x136 (i64.load offset=0x136 align=1 (i32.const 0))) + (set_local 0x137 (i64.load offset=0x137 align=1 (i32.const 0))) + (set_local 0x138 (i64.load offset=0x138 align=1 (i32.const 0))) + (set_local 0x139 (i64.load offset=0x139 align=1 (i32.const 0))) + (set_local 0x13a (i64.load offset=0x13a align=1 (i32.const 0))) + (set_local 0x13b (i64.load offset=0x13b align=1 (i32.const 0))) + (set_local 0x13c (i64.load offset=0x13c align=1 (i32.const 0))) + (set_local 0x13d (i64.load offset=0x13d align=1 (i32.const 0))) + (set_local 0x13e (i64.load offset=0x13e align=1 (i32.const 0))) + (set_local 0x13f (i64.load offset=0x13f align=1 (i32.const 0))) + (set_local 0x140 (i64.load offset=0x140 align=1 (i32.const 0))) + (set_local 0x141 (i64.load offset=0x141 align=1 (i32.const 0))) + (set_local 0x142 (i64.load offset=0x142 align=1 (i32.const 0))) + (set_local 0x143 (i64.load offset=0x143 align=1 (i32.const 0))) + (set_local 0x144 (i64.load offset=0x144 align=1 (i32.const 0))) + (set_local 0x145 (i64.load offset=0x145 align=1 (i32.const 0))) + (set_local 0x146 (i64.load offset=0x146 align=1 (i32.const 0))) + (set_local 0x147 (i64.load offset=0x147 align=1 (i32.const 0))) + (set_local 0x148 (i64.load offset=0x148 align=1 (i32.const 0))) + (set_local 0x149 (i64.load offset=0x149 align=1 (i32.const 0))) + (set_local 0x14a (i64.load offset=0x14a align=1 (i32.const 0))) + (set_local 0x14b (i64.load offset=0x14b align=1 (i32.const 0))) + (set_local 0x14c (i64.load offset=0x14c align=1 (i32.const 0))) + (set_local 0x14d (i64.load offset=0x14d align=1 (i32.const 0))) + (set_local 0x14e (i64.load offset=0x14e align=1 (i32.const 0))) + (set_local 0x14f (i64.load offset=0x14f align=1 (i32.const 0))) + (set_local 0x150 (i64.load offset=0x150 align=1 (i32.const 0))) + (set_local 0x151 (i64.load offset=0x151 align=1 (i32.const 0))) + (set_local 0x152 (i64.load offset=0x152 align=1 (i32.const 0))) + (set_local 0x153 (i64.load offset=0x153 align=1 (i32.const 0))) + (set_local 0x154 (i64.load offset=0x154 align=1 (i32.const 0))) + (set_local 0x155 (i64.load offset=0x155 align=1 (i32.const 0))) + (set_local 0x156 (i64.load offset=0x156 align=1 (i32.const 0))) + (set_local 0x157 (i64.load offset=0x157 align=1 (i32.const 0))) + (set_local 0x158 (i64.load offset=0x158 align=1 (i32.const 0))) + (set_local 0x159 (i64.load offset=0x159 align=1 (i32.const 0))) + (set_local 0x15a (i64.load offset=0x15a align=1 (i32.const 0))) + (set_local 0x15b (i64.load offset=0x15b align=1 (i32.const 0))) + (set_local 0x15c (i64.load offset=0x15c align=1 (i32.const 0))) + (set_local 0x15d (i64.load offset=0x15d align=1 (i32.const 0))) + (set_local 0x15e (i64.load offset=0x15e align=1 (i32.const 0))) + (set_local 0x15f (i64.load offset=0x15f align=1 (i32.const 0))) + (set_local 0x160 (i64.load offset=0x160 align=1 (i32.const 0))) + (set_local 0x161 (i64.load offset=0x161 align=1 (i32.const 0))) + (set_local 0x162 (i64.load offset=0x162 align=1 (i32.const 0))) + (set_local 0x163 (i64.load offset=0x163 align=1 (i32.const 0))) + (set_local 0x164 (i64.load offset=0x164 align=1 (i32.const 0))) + (set_local 0x165 (i64.load offset=0x165 align=1 (i32.const 0))) + (set_local 0x166 (i64.load offset=0x166 align=1 (i32.const 0))) + (set_local 0x167 (i64.load offset=0x167 align=1 (i32.const 0))) + (set_local 0x168 (i64.load offset=0x168 align=1 (i32.const 0))) + (set_local 0x169 (i64.load offset=0x169 align=1 (i32.const 0))) + (set_local 0x16a (i64.load offset=0x16a align=1 (i32.const 0))) + (set_local 0x16b (i64.load offset=0x16b align=1 (i32.const 0))) + (set_local 0x16c (i64.load offset=0x16c align=1 (i32.const 0))) + (set_local 0x16d (i64.load offset=0x16d align=1 (i32.const 0))) + (set_local 0x16e (i64.load offset=0x16e align=1 (i32.const 0))) + (set_local 0x16f (i64.load offset=0x16f align=1 (i32.const 0))) + (set_local 0x170 (i64.load offset=0x170 align=1 (i32.const 0))) + (set_local 0x171 (i64.load offset=0x171 align=1 (i32.const 0))) + (set_local 0x172 (i64.load offset=0x172 align=1 (i32.const 0))) + (set_local 0x173 (i64.load offset=0x173 align=1 (i32.const 0))) + (set_local 0x174 (i64.load offset=0x174 align=1 (i32.const 0))) + (set_local 0x175 (i64.load offset=0x175 align=1 (i32.const 0))) + (set_local 0x176 (i64.load offset=0x176 align=1 (i32.const 0))) + (set_local 0x177 (i64.load offset=0x177 align=1 (i32.const 0))) + (set_local 0x178 (i64.load offset=0x178 align=1 (i32.const 0))) + (set_local 0x179 (i64.load offset=0x179 align=1 (i32.const 0))) + (set_local 0x17a (i64.load offset=0x17a align=1 (i32.const 0))) + (set_local 0x17b (i64.load offset=0x17b align=1 (i32.const 0))) + (set_local 0x17c (i64.load offset=0x17c align=1 (i32.const 0))) + (set_local 0x17d (i64.load offset=0x17d align=1 (i32.const 0))) + (set_local 0x17e (i64.load offset=0x17e align=1 (i32.const 0))) + (set_local 0x17f (i64.load offset=0x17f align=1 (i32.const 0))) + (set_local 0x180 (i64.load offset=0x180 align=1 (i32.const 0))) + (set_local 0x181 (i64.load offset=0x181 align=1 (i32.const 0))) + (set_local 0x182 (i64.load offset=0x182 align=1 (i32.const 0))) + (set_local 0x183 (i64.load offset=0x183 align=1 (i32.const 0))) + (set_local 0x184 (i64.load offset=0x184 align=1 (i32.const 0))) + (set_local 0x185 (i64.load offset=0x185 align=1 (i32.const 0))) + (set_local 0x186 (i64.load offset=0x186 align=1 (i32.const 0))) + (set_local 0x187 (i64.load offset=0x187 align=1 (i32.const 0))) + (set_local 0x188 (i64.load offset=0x188 align=1 (i32.const 0))) + (set_local 0x189 (i64.load offset=0x189 align=1 (i32.const 0))) + (set_local 0x18a (i64.load offset=0x18a align=1 (i32.const 0))) + (set_local 0x18b (i64.load offset=0x18b align=1 (i32.const 0))) + (set_local 0x18c (i64.load offset=0x18c align=1 (i32.const 0))) + (set_local 0x18d (i64.load offset=0x18d align=1 (i32.const 0))) + (set_local 0x18e (i64.load offset=0x18e align=1 (i32.const 0))) + (set_local 0x18f (i64.load offset=0x18f align=1 (i32.const 0))) + (set_local 0x190 (i64.load offset=0x190 align=1 (i32.const 0))) + (set_local 0x191 (i64.load offset=0x191 align=1 (i32.const 0))) + (set_local 0x192 (i64.load offset=0x192 align=1 (i32.const 0))) + (set_local 0x193 (i64.load offset=0x193 align=1 (i32.const 0))) + (set_local 0x194 (i64.load offset=0x194 align=1 (i32.const 0))) + (set_local 0x195 (i64.load offset=0x195 align=1 (i32.const 0))) + (set_local 0x196 (i64.load offset=0x196 align=1 (i32.const 0))) + (set_local 0x197 (i64.load offset=0x197 align=1 (i32.const 0))) + (set_local 0x198 (i64.load offset=0x198 align=1 (i32.const 0))) + (set_local 0x199 (i64.load offset=0x199 align=1 (i32.const 0))) + (set_local 0x19a (i64.load offset=0x19a align=1 (i32.const 0))) + (set_local 0x19b (i64.load offset=0x19b align=1 (i32.const 0))) + (set_local 0x19c (i64.load offset=0x19c align=1 (i32.const 0))) + (set_local 0x19d (i64.load offset=0x19d align=1 (i32.const 0))) + (set_local 0x19e (i64.load offset=0x19e align=1 (i32.const 0))) + (set_local 0x19f (i64.load offset=0x19f align=1 (i32.const 0))) + (set_local 0x1a0 (i64.load offset=0x1a0 align=1 (i32.const 0))) + (set_local 0x1a1 (i64.load offset=0x1a1 align=1 (i32.const 0))) + (set_local 0x1a2 (i64.load offset=0x1a2 align=1 (i32.const 0))) + (set_local 0x1a3 (i64.load offset=0x1a3 align=1 (i32.const 0))) + (set_local 0x1a4 (i64.load offset=0x1a4 align=1 (i32.const 0))) + (set_local 0x1a5 (i64.load offset=0x1a5 align=1 (i32.const 0))) + (set_local 0x1a6 (i64.load offset=0x1a6 align=1 (i32.const 0))) + (set_local 0x1a7 (i64.load offset=0x1a7 align=1 (i32.const 0))) + (set_local 0x1a8 (i64.load offset=0x1a8 align=1 (i32.const 0))) + (set_local 0x1a9 (i64.load offset=0x1a9 align=1 (i32.const 0))) + (set_local 0x1aa (i64.load offset=0x1aa align=1 (i32.const 0))) + (set_local 0x1ab (i64.load offset=0x1ab align=1 (i32.const 0))) + (set_local 0x1ac (i64.load offset=0x1ac align=1 (i32.const 0))) + (set_local 0x1ad (i64.load offset=0x1ad align=1 (i32.const 0))) + (set_local 0x1ae (i64.load offset=0x1ae align=1 (i32.const 0))) + (set_local 0x1af (i64.load offset=0x1af align=1 (i32.const 0))) + (set_local 0x1b0 (i64.load offset=0x1b0 align=1 (i32.const 0))) + (set_local 0x1b1 (i64.load offset=0x1b1 align=1 (i32.const 0))) + (set_local 0x1b2 (i64.load offset=0x1b2 align=1 (i32.const 0))) + (set_local 0x1b3 (i64.load offset=0x1b3 align=1 (i32.const 0))) + (set_local 0x1b4 (i64.load offset=0x1b4 align=1 (i32.const 0))) + (set_local 0x1b5 (i64.load offset=0x1b5 align=1 (i32.const 0))) + (set_local 0x1b6 (i64.load offset=0x1b6 align=1 (i32.const 0))) + (set_local 0x1b7 (i64.load offset=0x1b7 align=1 (i32.const 0))) + (set_local 0x1b8 (i64.load offset=0x1b8 align=1 (i32.const 0))) + (set_local 0x1b9 (i64.load offset=0x1b9 align=1 (i32.const 0))) + (set_local 0x1ba (i64.load offset=0x1ba align=1 (i32.const 0))) + (set_local 0x1bb (i64.load offset=0x1bb align=1 (i32.const 0))) + (set_local 0x1bc (i64.load offset=0x1bc align=1 (i32.const 0))) + (set_local 0x1bd (i64.load offset=0x1bd align=1 (i32.const 0))) + (set_local 0x1be (i64.load offset=0x1be align=1 (i32.const 0))) + (set_local 0x1bf (i64.load offset=0x1bf align=1 (i32.const 0))) + (set_local 0x1c0 (i64.load offset=0x1c0 align=1 (i32.const 0))) + (set_local 0x1c1 (i64.load offset=0x1c1 align=1 (i32.const 0))) + (set_local 0x1c2 (i64.load offset=0x1c2 align=1 (i32.const 0))) + (set_local 0x1c3 (i64.load offset=0x1c3 align=1 (i32.const 0))) + (set_local 0x1c4 (i64.load offset=0x1c4 align=1 (i32.const 0))) + (set_local 0x1c5 (i64.load offset=0x1c5 align=1 (i32.const 0))) + (set_local 0x1c6 (i64.load offset=0x1c6 align=1 (i32.const 0))) + (set_local 0x1c7 (i64.load offset=0x1c7 align=1 (i32.const 0))) + (set_local 0x1c8 (i64.load offset=0x1c8 align=1 (i32.const 0))) + (set_local 0x1c9 (i64.load offset=0x1c9 align=1 (i32.const 0))) + (set_local 0x1ca (i64.load offset=0x1ca align=1 (i32.const 0))) + (set_local 0x1cb (i64.load offset=0x1cb align=1 (i32.const 0))) + (set_local 0x1cc (i64.load offset=0x1cc align=1 (i32.const 0))) + (set_local 0x1cd (i64.load offset=0x1cd align=1 (i32.const 0))) + (set_local 0x1ce (i64.load offset=0x1ce align=1 (i32.const 0))) + (set_local 0x1cf (i64.load offset=0x1cf align=1 (i32.const 0))) + (set_local 0x1d0 (i64.load offset=0x1d0 align=1 (i32.const 0))) + (set_local 0x1d1 (i64.load offset=0x1d1 align=1 (i32.const 0))) + (set_local 0x1d2 (i64.load offset=0x1d2 align=1 (i32.const 0))) + (set_local 0x1d3 (i64.load offset=0x1d3 align=1 (i32.const 0))) + (set_local 0x1d4 (i64.load offset=0x1d4 align=1 (i32.const 0))) + (set_local 0x1d5 (i64.load offset=0x1d5 align=1 (i32.const 0))) + (set_local 0x1d6 (i64.load offset=0x1d6 align=1 (i32.const 0))) + (set_local 0x1d7 (i64.load offset=0x1d7 align=1 (i32.const 0))) + (set_local 0x1d8 (i64.load offset=0x1d8 align=1 (i32.const 0))) + (set_local 0x1d9 (i64.load offset=0x1d9 align=1 (i32.const 0))) + (set_local 0x1da (i64.load offset=0x1da align=1 (i32.const 0))) + (set_local 0x1db (i64.load offset=0x1db align=1 (i32.const 0))) + (set_local 0x1dc (i64.load offset=0x1dc align=1 (i32.const 0))) + (set_local 0x1dd (i64.load offset=0x1dd align=1 (i32.const 0))) + (set_local 0x1de (i64.load offset=0x1de align=1 (i32.const 0))) + (set_local 0x1df (i64.load offset=0x1df align=1 (i32.const 0))) + (set_local 0x1e0 (i64.load offset=0x1e0 align=1 (i32.const 0))) + (set_local 0x1e1 (i64.load offset=0x1e1 align=1 (i32.const 0))) + (set_local 0x1e2 (i64.load offset=0x1e2 align=1 (i32.const 0))) + (set_local 0x1e3 (i64.load offset=0x1e3 align=1 (i32.const 0))) + (set_local 0x1e4 (i64.load offset=0x1e4 align=1 (i32.const 0))) + (set_local 0x1e5 (i64.load offset=0x1e5 align=1 (i32.const 0))) + (set_local 0x1e6 (i64.load offset=0x1e6 align=1 (i32.const 0))) + (set_local 0x1e7 (i64.load offset=0x1e7 align=1 (i32.const 0))) + (set_local 0x1e8 (i64.load offset=0x1e8 align=1 (i32.const 0))) + (set_local 0x1e9 (i64.load offset=0x1e9 align=1 (i32.const 0))) + (set_local 0x1ea (i64.load offset=0x1ea align=1 (i32.const 0))) + (set_local 0x1eb (i64.load offset=0x1eb align=1 (i32.const 0))) + (set_local 0x1ec (i64.load offset=0x1ec align=1 (i32.const 0))) + (set_local 0x1ed (i64.load offset=0x1ed align=1 (i32.const 0))) + (set_local 0x1ee (i64.load offset=0x1ee align=1 (i32.const 0))) + (set_local 0x1ef (i64.load offset=0x1ef align=1 (i32.const 0))) + (set_local 0x1f0 (i64.load offset=0x1f0 align=1 (i32.const 0))) + (set_local 0x1f1 (i64.load offset=0x1f1 align=1 (i32.const 0))) + (set_local 0x1f2 (i64.load offset=0x1f2 align=1 (i32.const 0))) + (set_local 0x1f3 (i64.load offset=0x1f3 align=1 (i32.const 0))) + (set_local 0x1f4 (i64.load offset=0x1f4 align=1 (i32.const 0))) + (set_local 0x1f5 (i64.load offset=0x1f5 align=1 (i32.const 0))) + (set_local 0x1f6 (i64.load offset=0x1f6 align=1 (i32.const 0))) + (set_local 0x1f7 (i64.load offset=0x1f7 align=1 (i32.const 0))) + (set_local 0x1f8 (i64.load offset=0x1f8 align=1 (i32.const 0))) + (set_local 0x1f9 (i64.load offset=0x1f9 align=1 (i32.const 0))) + (set_local 0x1fa (i64.load offset=0x1fa align=1 (i32.const 0))) + (set_local 0x1fb (i64.load offset=0x1fb align=1 (i32.const 0))) + (set_local 0x1fc (i64.load offset=0x1fc align=1 (i32.const 0))) + (set_local 0x1fd (i64.load offset=0x1fd align=1 (i32.const 0))) + (set_local 0x1fe (i64.load offset=0x1fe align=1 (i32.const 0))) + (set_local 0x1ff (i64.load offset=0x1ff align=1 (i32.const 0))) + (set_local 0x200 (i64.load offset=0x200 align=1 (i32.const 0))) + (set_local 0x201 (i64.load offset=0x201 align=1 (i32.const 0))) + (set_local 0x202 (i64.load offset=0x202 align=1 (i32.const 0))) + (set_local 0x203 (i64.load offset=0x203 align=1 (i32.const 0))) + (set_local 0x204 (i64.load offset=0x204 align=1 (i32.const 0))) + (set_local 0x205 (i64.load offset=0x205 align=1 (i32.const 0))) + (set_local 0x206 (i64.load offset=0x206 align=1 (i32.const 0))) + (set_local 0x207 (i64.load offset=0x207 align=1 (i32.const 0))) + (set_local 0x208 (i64.load offset=0x208 align=1 (i32.const 0))) + (set_local 0x209 (i64.load offset=0x209 align=1 (i32.const 0))) + (set_local 0x20a (i64.load offset=0x20a align=1 (i32.const 0))) + (set_local 0x20b (i64.load offset=0x20b align=1 (i32.const 0))) + (set_local 0x20c (i64.load offset=0x20c align=1 (i32.const 0))) + (set_local 0x20d (i64.load offset=0x20d align=1 (i32.const 0))) + (set_local 0x20e (i64.load offset=0x20e align=1 (i32.const 0))) + (set_local 0x20f (i64.load offset=0x20f align=1 (i32.const 0))) + (set_local 0x210 (i64.load offset=0x210 align=1 (i32.const 0))) + (set_local 0x211 (i64.load offset=0x211 align=1 (i32.const 0))) + (set_local 0x212 (i64.load offset=0x212 align=1 (i32.const 0))) + (set_local 0x213 (i64.load offset=0x213 align=1 (i32.const 0))) + (set_local 0x214 (i64.load offset=0x214 align=1 (i32.const 0))) + (set_local 0x215 (i64.load offset=0x215 align=1 (i32.const 0))) + (set_local 0x216 (i64.load offset=0x216 align=1 (i32.const 0))) + (set_local 0x217 (i64.load offset=0x217 align=1 (i32.const 0))) + (set_local 0x218 (i64.load offset=0x218 align=1 (i32.const 0))) + (set_local 0x219 (i64.load offset=0x219 align=1 (i32.const 0))) + (set_local 0x21a (i64.load offset=0x21a align=1 (i32.const 0))) + (set_local 0x21b (i64.load offset=0x21b align=1 (i32.const 0))) + (set_local 0x21c (i64.load offset=0x21c align=1 (i32.const 0))) + (set_local 0x21d (i64.load offset=0x21d align=1 (i32.const 0))) + (set_local 0x21e (i64.load offset=0x21e align=1 (i32.const 0))) + (set_local 0x21f (i64.load offset=0x21f align=1 (i32.const 0))) + (set_local 0x220 (i64.load offset=0x220 align=1 (i32.const 0))) + (set_local 0x221 (i64.load offset=0x221 align=1 (i32.const 0))) + (set_local 0x222 (i64.load offset=0x222 align=1 (i32.const 0))) + (set_local 0x223 (i64.load offset=0x223 align=1 (i32.const 0))) + (set_local 0x224 (i64.load offset=0x224 align=1 (i32.const 0))) + (set_local 0x225 (i64.load offset=0x225 align=1 (i32.const 0))) + (set_local 0x226 (i64.load offset=0x226 align=1 (i32.const 0))) + (set_local 0x227 (i64.load offset=0x227 align=1 (i32.const 0))) + (set_local 0x228 (i64.load offset=0x228 align=1 (i32.const 0))) + (set_local 0x229 (i64.load offset=0x229 align=1 (i32.const 0))) + (set_local 0x22a (i64.load offset=0x22a align=1 (i32.const 0))) + (set_local 0x22b (i64.load offset=0x22b align=1 (i32.const 0))) + (set_local 0x22c (i64.load offset=0x22c align=1 (i32.const 0))) + (set_local 0x22d (i64.load offset=0x22d align=1 (i32.const 0))) + (set_local 0x22e (i64.load offset=0x22e align=1 (i32.const 0))) + (set_local 0x22f (i64.load offset=0x22f align=1 (i32.const 0))) + (set_local 0x230 (i64.load offset=0x230 align=1 (i32.const 0))) + (set_local 0x231 (i64.load offset=0x231 align=1 (i32.const 0))) + (set_local 0x232 (i64.load offset=0x232 align=1 (i32.const 0))) + (set_local 0x233 (i64.load offset=0x233 align=1 (i32.const 0))) + (set_local 0x234 (i64.load offset=0x234 align=1 (i32.const 0))) + (set_local 0x235 (i64.load offset=0x235 align=1 (i32.const 0))) + (set_local 0x236 (i64.load offset=0x236 align=1 (i32.const 0))) + (set_local 0x237 (i64.load offset=0x237 align=1 (i32.const 0))) + (set_local 0x238 (i64.load offset=0x238 align=1 (i32.const 0))) + (set_local 0x239 (i64.load offset=0x239 align=1 (i32.const 0))) + (set_local 0x23a (i64.load offset=0x23a align=1 (i32.const 0))) + (set_local 0x23b (i64.load offset=0x23b align=1 (i32.const 0))) + (set_local 0x23c (i64.load offset=0x23c align=1 (i32.const 0))) + (set_local 0x23d (i64.load offset=0x23d align=1 (i32.const 0))) + (set_local 0x23e (i64.load offset=0x23e align=1 (i32.const 0))) + (set_local 0x23f (i64.load offset=0x23f align=1 (i32.const 0))) + (set_local 0x240 (i64.load offset=0x240 align=1 (i32.const 0))) + (set_local 0x241 (i64.load offset=0x241 align=1 (i32.const 0))) + (set_local 0x242 (i64.load offset=0x242 align=1 (i32.const 0))) + (set_local 0x243 (i64.load offset=0x243 align=1 (i32.const 0))) + (set_local 0x244 (i64.load offset=0x244 align=1 (i32.const 0))) + (set_local 0x245 (i64.load offset=0x245 align=1 (i32.const 0))) + (set_local 0x246 (i64.load offset=0x246 align=1 (i32.const 0))) + (set_local 0x247 (i64.load offset=0x247 align=1 (i32.const 0))) + (set_local 0x248 (i64.load offset=0x248 align=1 (i32.const 0))) + (set_local 0x249 (i64.load offset=0x249 align=1 (i32.const 0))) + (set_local 0x24a (i64.load offset=0x24a align=1 (i32.const 0))) + (set_local 0x24b (i64.load offset=0x24b align=1 (i32.const 0))) + (set_local 0x24c (i64.load offset=0x24c align=1 (i32.const 0))) + (set_local 0x24d (i64.load offset=0x24d align=1 (i32.const 0))) + (set_local 0x24e (i64.load offset=0x24e align=1 (i32.const 0))) + (set_local 0x24f (i64.load offset=0x24f align=1 (i32.const 0))) + (set_local 0x250 (i64.load offset=0x250 align=1 (i32.const 0))) + (set_local 0x251 (i64.load offset=0x251 align=1 (i32.const 0))) + (set_local 0x252 (i64.load offset=0x252 align=1 (i32.const 0))) + (set_local 0x253 (i64.load offset=0x253 align=1 (i32.const 0))) + (set_local 0x254 (i64.load offset=0x254 align=1 (i32.const 0))) + (set_local 0x255 (i64.load offset=0x255 align=1 (i32.const 0))) + (set_local 0x256 (i64.load offset=0x256 align=1 (i32.const 0))) + (set_local 0x257 (i64.load offset=0x257 align=1 (i32.const 0))) + (set_local 0x258 (i64.load offset=0x258 align=1 (i32.const 0))) + (set_local 0x259 (i64.load offset=0x259 align=1 (i32.const 0))) + (set_local 0x25a (i64.load offset=0x25a align=1 (i32.const 0))) + (set_local 0x25b (i64.load offset=0x25b align=1 (i32.const 0))) + (set_local 0x25c (i64.load offset=0x25c align=1 (i32.const 0))) + (set_local 0x25d (i64.load offset=0x25d align=1 (i32.const 0))) + (set_local 0x25e (i64.load offset=0x25e align=1 (i32.const 0))) + (set_local 0x25f (i64.load offset=0x25f align=1 (i32.const 0))) + (set_local 0x260 (i64.load offset=0x260 align=1 (i32.const 0))) + (set_local 0x261 (i64.load offset=0x261 align=1 (i32.const 0))) + (set_local 0x262 (i64.load offset=0x262 align=1 (i32.const 0))) + (set_local 0x263 (i64.load offset=0x263 align=1 (i32.const 0))) + (set_local 0x264 (i64.load offset=0x264 align=1 (i32.const 0))) + (set_local 0x265 (i64.load offset=0x265 align=1 (i32.const 0))) + (set_local 0x266 (i64.load offset=0x266 align=1 (i32.const 0))) + (set_local 0x267 (i64.load offset=0x267 align=1 (i32.const 0))) + (set_local 0x268 (i64.load offset=0x268 align=1 (i32.const 0))) + (set_local 0x269 (i64.load offset=0x269 align=1 (i32.const 0))) + (set_local 0x26a (i64.load offset=0x26a align=1 (i32.const 0))) + (set_local 0x26b (i64.load offset=0x26b align=1 (i32.const 0))) + (set_local 0x26c (i64.load offset=0x26c align=1 (i32.const 0))) + (set_local 0x26d (i64.load offset=0x26d align=1 (i32.const 0))) + (set_local 0x26e (i64.load offset=0x26e align=1 (i32.const 0))) + (set_local 0x26f (i64.load offset=0x26f align=1 (i32.const 0))) + (set_local 0x270 (i64.load offset=0x270 align=1 (i32.const 0))) + (set_local 0x271 (i64.load offset=0x271 align=1 (i32.const 0))) + (set_local 0x272 (i64.load offset=0x272 align=1 (i32.const 0))) + (set_local 0x273 (i64.load offset=0x273 align=1 (i32.const 0))) + (set_local 0x274 (i64.load offset=0x274 align=1 (i32.const 0))) + (set_local 0x275 (i64.load offset=0x275 align=1 (i32.const 0))) + (set_local 0x276 (i64.load offset=0x276 align=1 (i32.const 0))) + (set_local 0x277 (i64.load offset=0x277 align=1 (i32.const 0))) + (set_local 0x278 (i64.load offset=0x278 align=1 (i32.const 0))) + (set_local 0x279 (i64.load offset=0x279 align=1 (i32.const 0))) + (set_local 0x27a (i64.load offset=0x27a align=1 (i32.const 0))) + (set_local 0x27b (i64.load offset=0x27b align=1 (i32.const 0))) + (set_local 0x27c (i64.load offset=0x27c align=1 (i32.const 0))) + (set_local 0x27d (i64.load offset=0x27d align=1 (i32.const 0))) + (set_local 0x27e (i64.load offset=0x27e align=1 (i32.const 0))) + (set_local 0x27f (i64.load offset=0x27f align=1 (i32.const 0))) + (set_local 0x280 (i64.load offset=0x280 align=1 (i32.const 0))) + (set_local 0x281 (i64.load offset=0x281 align=1 (i32.const 0))) + (set_local 0x282 (i64.load offset=0x282 align=1 (i32.const 0))) + (set_local 0x283 (i64.load offset=0x283 align=1 (i32.const 0))) + (set_local 0x284 (i64.load offset=0x284 align=1 (i32.const 0))) + (set_local 0x285 (i64.load offset=0x285 align=1 (i32.const 0))) + (set_local 0x286 (i64.load offset=0x286 align=1 (i32.const 0))) + (set_local 0x287 (i64.load offset=0x287 align=1 (i32.const 0))) + (set_local 0x288 (i64.load offset=0x288 align=1 (i32.const 0))) + (set_local 0x289 (i64.load offset=0x289 align=1 (i32.const 0))) + (set_local 0x28a (i64.load offset=0x28a align=1 (i32.const 0))) + (set_local 0x28b (i64.load offset=0x28b align=1 (i32.const 0))) + (set_local 0x28c (i64.load offset=0x28c align=1 (i32.const 0))) + (set_local 0x28d (i64.load offset=0x28d align=1 (i32.const 0))) + (set_local 0x28e (i64.load offset=0x28e align=1 (i32.const 0))) + (set_local 0x28f (i64.load offset=0x28f align=1 (i32.const 0))) + (set_local 0x290 (i64.load offset=0x290 align=1 (i32.const 0))) + (set_local 0x291 (i64.load offset=0x291 align=1 (i32.const 0))) + (set_local 0x292 (i64.load offset=0x292 align=1 (i32.const 0))) + (set_local 0x293 (i64.load offset=0x293 align=1 (i32.const 0))) + (set_local 0x294 (i64.load offset=0x294 align=1 (i32.const 0))) + (set_local 0x295 (i64.load offset=0x295 align=1 (i32.const 0))) + (set_local 0x296 (i64.load offset=0x296 align=1 (i32.const 0))) + (set_local 0x297 (i64.load offset=0x297 align=1 (i32.const 0))) + (set_local 0x298 (i64.load offset=0x298 align=1 (i32.const 0))) + (set_local 0x299 (i64.load offset=0x299 align=1 (i32.const 0))) + (set_local 0x29a (i64.load offset=0x29a align=1 (i32.const 0))) + (set_local 0x29b (i64.load offset=0x29b align=1 (i32.const 0))) + (set_local 0x29c (i64.load offset=0x29c align=1 (i32.const 0))) + (set_local 0x29d (i64.load offset=0x29d align=1 (i32.const 0))) + (set_local 0x29e (i64.load offset=0x29e align=1 (i32.const 0))) + (set_local 0x29f (i64.load offset=0x29f align=1 (i32.const 0))) + (set_local 0x2a0 (i64.load offset=0x2a0 align=1 (i32.const 0))) + (set_local 0x2a1 (i64.load offset=0x2a1 align=1 (i32.const 0))) + (set_local 0x2a2 (i64.load offset=0x2a2 align=1 (i32.const 0))) + (set_local 0x2a3 (i64.load offset=0x2a3 align=1 (i32.const 0))) + (set_local 0x2a4 (i64.load offset=0x2a4 align=1 (i32.const 0))) + (set_local 0x2a5 (i64.load offset=0x2a5 align=1 (i32.const 0))) + (set_local 0x2a6 (i64.load offset=0x2a6 align=1 (i32.const 0))) + (set_local 0x2a7 (i64.load offset=0x2a7 align=1 (i32.const 0))) + (set_local 0x2a8 (i64.load offset=0x2a8 align=1 (i32.const 0))) + (set_local 0x2a9 (i64.load offset=0x2a9 align=1 (i32.const 0))) + (set_local 0x2aa (i64.load offset=0x2aa align=1 (i32.const 0))) + (set_local 0x2ab (i64.load offset=0x2ab align=1 (i32.const 0))) + (set_local 0x2ac (i64.load offset=0x2ac align=1 (i32.const 0))) + (set_local 0x2ad (i64.load offset=0x2ad align=1 (i32.const 0))) + (set_local 0x2ae (i64.load offset=0x2ae align=1 (i32.const 0))) + (set_local 0x2af (i64.load offset=0x2af align=1 (i32.const 0))) + (set_local 0x2b0 (i64.load offset=0x2b0 align=1 (i32.const 0))) + (set_local 0x2b1 (i64.load offset=0x2b1 align=1 (i32.const 0))) + (set_local 0x2b2 (i64.load offset=0x2b2 align=1 (i32.const 0))) + (set_local 0x2b3 (i64.load offset=0x2b3 align=1 (i32.const 0))) + (set_local 0x2b4 (i64.load offset=0x2b4 align=1 (i32.const 0))) + (set_local 0x2b5 (i64.load offset=0x2b5 align=1 (i32.const 0))) + (set_local 0x2b6 (i64.load offset=0x2b6 align=1 (i32.const 0))) + (set_local 0x2b7 (i64.load offset=0x2b7 align=1 (i32.const 0))) + (set_local 0x2b8 (i64.load offset=0x2b8 align=1 (i32.const 0))) + (set_local 0x2b9 (i64.load offset=0x2b9 align=1 (i32.const 0))) + (set_local 0x2ba (i64.load offset=0x2ba align=1 (i32.const 0))) + (set_local 0x2bb (i64.load offset=0x2bb align=1 (i32.const 0))) + (set_local 0x2bc (i64.load offset=0x2bc align=1 (i32.const 0))) + (set_local 0x2bd (i64.load offset=0x2bd align=1 (i32.const 0))) + (set_local 0x2be (i64.load offset=0x2be align=1 (i32.const 0))) + (set_local 0x2bf (i64.load offset=0x2bf align=1 (i32.const 0))) + (set_local 0x2c0 (i64.load offset=0x2c0 align=1 (i32.const 0))) + (set_local 0x2c1 (i64.load offset=0x2c1 align=1 (i32.const 0))) + (set_local 0x2c2 (i64.load offset=0x2c2 align=1 (i32.const 0))) + (set_local 0x2c3 (i64.load offset=0x2c3 align=1 (i32.const 0))) + (set_local 0x2c4 (i64.load offset=0x2c4 align=1 (i32.const 0))) + (set_local 0x2c5 (i64.load offset=0x2c5 align=1 (i32.const 0))) + (set_local 0x2c6 (i64.load offset=0x2c6 align=1 (i32.const 0))) + (set_local 0x2c7 (i64.load offset=0x2c7 align=1 (i32.const 0))) + (set_local 0x2c8 (i64.load offset=0x2c8 align=1 (i32.const 0))) + (set_local 0x2c9 (i64.load offset=0x2c9 align=1 (i32.const 0))) + (set_local 0x2ca (i64.load offset=0x2ca align=1 (i32.const 0))) + (set_local 0x2cb (i64.load offset=0x2cb align=1 (i32.const 0))) + (set_local 0x2cc (i64.load offset=0x2cc align=1 (i32.const 0))) + (set_local 0x2cd (i64.load offset=0x2cd align=1 (i32.const 0))) + (set_local 0x2ce (i64.load offset=0x2ce align=1 (i32.const 0))) + (set_local 0x2cf (i64.load offset=0x2cf align=1 (i32.const 0))) + (set_local 0x2d0 (i64.load offset=0x2d0 align=1 (i32.const 0))) + (set_local 0x2d1 (i64.load offset=0x2d1 align=1 (i32.const 0))) + (set_local 0x2d2 (i64.load offset=0x2d2 align=1 (i32.const 0))) + (set_local 0x2d3 (i64.load offset=0x2d3 align=1 (i32.const 0))) + (set_local 0x2d4 (i64.load offset=0x2d4 align=1 (i32.const 0))) + (set_local 0x2d5 (i64.load offset=0x2d5 align=1 (i32.const 0))) + (set_local 0x2d6 (i64.load offset=0x2d6 align=1 (i32.const 0))) + (set_local 0x2d7 (i64.load offset=0x2d7 align=1 (i32.const 0))) + (set_local 0x2d8 (i64.load offset=0x2d8 align=1 (i32.const 0))) + (set_local 0x2d9 (i64.load offset=0x2d9 align=1 (i32.const 0))) + (set_local 0x2da (i64.load offset=0x2da align=1 (i32.const 0))) + (set_local 0x2db (i64.load offset=0x2db align=1 (i32.const 0))) + (set_local 0x2dc (i64.load offset=0x2dc align=1 (i32.const 0))) + (set_local 0x2dd (i64.load offset=0x2dd align=1 (i32.const 0))) + (set_local 0x2de (i64.load offset=0x2de align=1 (i32.const 0))) + (set_local 0x2df (i64.load offset=0x2df align=1 (i32.const 0))) + (set_local 0x2e0 (i64.load offset=0x2e0 align=1 (i32.const 0))) + (set_local 0x2e1 (i64.load offset=0x2e1 align=1 (i32.const 0))) + (set_local 0x2e2 (i64.load offset=0x2e2 align=1 (i32.const 0))) + (set_local 0x2e3 (i64.load offset=0x2e3 align=1 (i32.const 0))) + (set_local 0x2e4 (i64.load offset=0x2e4 align=1 (i32.const 0))) + (set_local 0x2e5 (i64.load offset=0x2e5 align=1 (i32.const 0))) + (set_local 0x2e6 (i64.load offset=0x2e6 align=1 (i32.const 0))) + (set_local 0x2e7 (i64.load offset=0x2e7 align=1 (i32.const 0))) + (set_local 0x2e8 (i64.load offset=0x2e8 align=1 (i32.const 0))) + (set_local 0x2e9 (i64.load offset=0x2e9 align=1 (i32.const 0))) + (set_local 0x2ea (i64.load offset=0x2ea align=1 (i32.const 0))) + (set_local 0x2eb (i64.load offset=0x2eb align=1 (i32.const 0))) + (set_local 0x2ec (i64.load offset=0x2ec align=1 (i32.const 0))) + (set_local 0x2ed (i64.load offset=0x2ed align=1 (i32.const 0))) + (set_local 0x2ee (i64.load offset=0x2ee align=1 (i32.const 0))) + (set_local 0x2ef (i64.load offset=0x2ef align=1 (i32.const 0))) + (set_local 0x2f0 (i64.load offset=0x2f0 align=1 (i32.const 0))) + (set_local 0x2f1 (i64.load offset=0x2f1 align=1 (i32.const 0))) + (set_local 0x2f2 (i64.load offset=0x2f2 align=1 (i32.const 0))) + (set_local 0x2f3 (i64.load offset=0x2f3 align=1 (i32.const 0))) + (set_local 0x2f4 (i64.load offset=0x2f4 align=1 (i32.const 0))) + (set_local 0x2f5 (i64.load offset=0x2f5 align=1 (i32.const 0))) + (set_local 0x2f6 (i64.load offset=0x2f6 align=1 (i32.const 0))) + (set_local 0x2f7 (i64.load offset=0x2f7 align=1 (i32.const 0))) + (set_local 0x2f8 (i64.load offset=0x2f8 align=1 (i32.const 0))) + (set_local 0x2f9 (i64.load offset=0x2f9 align=1 (i32.const 0))) + (set_local 0x2fa (i64.load offset=0x2fa align=1 (i32.const 0))) + (set_local 0x2fb (i64.load offset=0x2fb align=1 (i32.const 0))) + (set_local 0x2fc (i64.load offset=0x2fc align=1 (i32.const 0))) + (set_local 0x2fd (i64.load offset=0x2fd align=1 (i32.const 0))) + (set_local 0x2fe (i64.load offset=0x2fe align=1 (i32.const 0))) + (set_local 0x2ff (i64.load offset=0x2ff align=1 (i32.const 0))) + (set_local 0x300 (i64.load offset=0x300 align=1 (i32.const 0))) + (set_local 0x301 (i64.load offset=0x301 align=1 (i32.const 0))) + (set_local 0x302 (i64.load offset=0x302 align=1 (i32.const 0))) + (set_local 0x303 (i64.load offset=0x303 align=1 (i32.const 0))) + (set_local 0x304 (i64.load offset=0x304 align=1 (i32.const 0))) + (set_local 0x305 (i64.load offset=0x305 align=1 (i32.const 0))) + (set_local 0x306 (i64.load offset=0x306 align=1 (i32.const 0))) + (set_local 0x307 (i64.load offset=0x307 align=1 (i32.const 0))) + (set_local 0x308 (i64.load offset=0x308 align=1 (i32.const 0))) + (set_local 0x309 (i64.load offset=0x309 align=1 (i32.const 0))) + (set_local 0x30a (i64.load offset=0x30a align=1 (i32.const 0))) + (set_local 0x30b (i64.load offset=0x30b align=1 (i32.const 0))) + (set_local 0x30c (i64.load offset=0x30c align=1 (i32.const 0))) + (set_local 0x30d (i64.load offset=0x30d align=1 (i32.const 0))) + (set_local 0x30e (i64.load offset=0x30e align=1 (i32.const 0))) + (set_local 0x30f (i64.load offset=0x30f align=1 (i32.const 0))) + (set_local 0x310 (i64.load offset=0x310 align=1 (i32.const 0))) + (set_local 0x311 (i64.load offset=0x311 align=1 (i32.const 0))) + (set_local 0x312 (i64.load offset=0x312 align=1 (i32.const 0))) + (set_local 0x313 (i64.load offset=0x313 align=1 (i32.const 0))) + (set_local 0x314 (i64.load offset=0x314 align=1 (i32.const 0))) + (set_local 0x315 (i64.load offset=0x315 align=1 (i32.const 0))) + (set_local 0x316 (i64.load offset=0x316 align=1 (i32.const 0))) + (set_local 0x317 (i64.load offset=0x317 align=1 (i32.const 0))) + (set_local 0x318 (i64.load offset=0x318 align=1 (i32.const 0))) + (set_local 0x319 (i64.load offset=0x319 align=1 (i32.const 0))) + (set_local 0x31a (i64.load offset=0x31a align=1 (i32.const 0))) + (set_local 0x31b (i64.load offset=0x31b align=1 (i32.const 0))) + (set_local 0x31c (i64.load offset=0x31c align=1 (i32.const 0))) + (set_local 0x31d (i64.load offset=0x31d align=1 (i32.const 0))) + (set_local 0x31e (i64.load offset=0x31e align=1 (i32.const 0))) + (set_local 0x31f (i64.load offset=0x31f align=1 (i32.const 0))) + (set_local 0x320 (i64.load offset=0x320 align=1 (i32.const 0))) + (set_local 0x321 (i64.load offset=0x321 align=1 (i32.const 0))) + (set_local 0x322 (i64.load offset=0x322 align=1 (i32.const 0))) + (set_local 0x323 (i64.load offset=0x323 align=1 (i32.const 0))) + (set_local 0x324 (i64.load offset=0x324 align=1 (i32.const 0))) + (set_local 0x325 (i64.load offset=0x325 align=1 (i32.const 0))) + (set_local 0x326 (i64.load offset=0x326 align=1 (i32.const 0))) + (set_local 0x327 (i64.load offset=0x327 align=1 (i32.const 0))) + (set_local 0x328 (i64.load offset=0x328 align=1 (i32.const 0))) + (set_local 0x329 (i64.load offset=0x329 align=1 (i32.const 0))) + (set_local 0x32a (i64.load offset=0x32a align=1 (i32.const 0))) + (set_local 0x32b (i64.load offset=0x32b align=1 (i32.const 0))) + (set_local 0x32c (i64.load offset=0x32c align=1 (i32.const 0))) + (set_local 0x32d (i64.load offset=0x32d align=1 (i32.const 0))) + (set_local 0x32e (i64.load offset=0x32e align=1 (i32.const 0))) + (set_local 0x32f (i64.load offset=0x32f align=1 (i32.const 0))) + (set_local 0x330 (i64.load offset=0x330 align=1 (i32.const 0))) + (set_local 0x331 (i64.load offset=0x331 align=1 (i32.const 0))) + (set_local 0x332 (i64.load offset=0x332 align=1 (i32.const 0))) + (set_local 0x333 (i64.load offset=0x333 align=1 (i32.const 0))) + (set_local 0x334 (i64.load offset=0x334 align=1 (i32.const 0))) + (set_local 0x335 (i64.load offset=0x335 align=1 (i32.const 0))) + (set_local 0x336 (i64.load offset=0x336 align=1 (i32.const 0))) + (set_local 0x337 (i64.load offset=0x337 align=1 (i32.const 0))) + (set_local 0x338 (i64.load offset=0x338 align=1 (i32.const 0))) + (set_local 0x339 (i64.load offset=0x339 align=1 (i32.const 0))) + (set_local 0x33a (i64.load offset=0x33a align=1 (i32.const 0))) + (set_local 0x33b (i64.load offset=0x33b align=1 (i32.const 0))) + (set_local 0x33c (i64.load offset=0x33c align=1 (i32.const 0))) + (set_local 0x33d (i64.load offset=0x33d align=1 (i32.const 0))) + (set_local 0x33e (i64.load offset=0x33e align=1 (i32.const 0))) + (set_local 0x33f (i64.load offset=0x33f align=1 (i32.const 0))) + (set_local 0x340 (i64.load offset=0x340 align=1 (i32.const 0))) + (set_local 0x341 (i64.load offset=0x341 align=1 (i32.const 0))) + (set_local 0x342 (i64.load offset=0x342 align=1 (i32.const 0))) + (set_local 0x343 (i64.load offset=0x343 align=1 (i32.const 0))) + (set_local 0x344 (i64.load offset=0x344 align=1 (i32.const 0))) + (set_local 0x345 (i64.load offset=0x345 align=1 (i32.const 0))) + (set_local 0x346 (i64.load offset=0x346 align=1 (i32.const 0))) + (set_local 0x347 (i64.load offset=0x347 align=1 (i32.const 0))) + (set_local 0x348 (i64.load offset=0x348 align=1 (i32.const 0))) + (set_local 0x349 (i64.load offset=0x349 align=1 (i32.const 0))) + (set_local 0x34a (i64.load offset=0x34a align=1 (i32.const 0))) + (set_local 0x34b (i64.load offset=0x34b align=1 (i32.const 0))) + (set_local 0x34c (i64.load offset=0x34c align=1 (i32.const 0))) + (set_local 0x34d (i64.load offset=0x34d align=1 (i32.const 0))) + (set_local 0x34e (i64.load offset=0x34e align=1 (i32.const 0))) + (set_local 0x34f (i64.load offset=0x34f align=1 (i32.const 0))) + (set_local 0x350 (i64.load offset=0x350 align=1 (i32.const 0))) + (set_local 0x351 (i64.load offset=0x351 align=1 (i32.const 0))) + (set_local 0x352 (i64.load offset=0x352 align=1 (i32.const 0))) + (set_local 0x353 (i64.load offset=0x353 align=1 (i32.const 0))) + (set_local 0x354 (i64.load offset=0x354 align=1 (i32.const 0))) + (set_local 0x355 (i64.load offset=0x355 align=1 (i32.const 0))) + (set_local 0x356 (i64.load offset=0x356 align=1 (i32.const 0))) + (set_local 0x357 (i64.load offset=0x357 align=1 (i32.const 0))) + (set_local 0x358 (i64.load offset=0x358 align=1 (i32.const 0))) + (set_local 0x359 (i64.load offset=0x359 align=1 (i32.const 0))) + (set_local 0x35a (i64.load offset=0x35a align=1 (i32.const 0))) + (set_local 0x35b (i64.load offset=0x35b align=1 (i32.const 0))) + (set_local 0x35c (i64.load offset=0x35c align=1 (i32.const 0))) + (set_local 0x35d (i64.load offset=0x35d align=1 (i32.const 0))) + (set_local 0x35e (i64.load offset=0x35e align=1 (i32.const 0))) + (set_local 0x35f (i64.load offset=0x35f align=1 (i32.const 0))) + (set_local 0x360 (i64.load offset=0x360 align=1 (i32.const 0))) + (set_local 0x361 (i64.load offset=0x361 align=1 (i32.const 0))) + (set_local 0x362 (i64.load offset=0x362 align=1 (i32.const 0))) + (set_local 0x363 (i64.load offset=0x363 align=1 (i32.const 0))) + (set_local 0x364 (i64.load offset=0x364 align=1 (i32.const 0))) + (set_local 0x365 (i64.load offset=0x365 align=1 (i32.const 0))) + (set_local 0x366 (i64.load offset=0x366 align=1 (i32.const 0))) + (set_local 0x367 (i64.load offset=0x367 align=1 (i32.const 0))) + (set_local 0x368 (i64.load offset=0x368 align=1 (i32.const 0))) + (set_local 0x369 (i64.load offset=0x369 align=1 (i32.const 0))) + (set_local 0x36a (i64.load offset=0x36a align=1 (i32.const 0))) + (set_local 0x36b (i64.load offset=0x36b align=1 (i32.const 0))) + (set_local 0x36c (i64.load offset=0x36c align=1 (i32.const 0))) + (set_local 0x36d (i64.load offset=0x36d align=1 (i32.const 0))) + (set_local 0x36e (i64.load offset=0x36e align=1 (i32.const 0))) + (set_local 0x36f (i64.load offset=0x36f align=1 (i32.const 0))) + (set_local 0x370 (i64.load offset=0x370 align=1 (i32.const 0))) + (set_local 0x371 (i64.load offset=0x371 align=1 (i32.const 0))) + (set_local 0x372 (i64.load offset=0x372 align=1 (i32.const 0))) + (set_local 0x373 (i64.load offset=0x373 align=1 (i32.const 0))) + (set_local 0x374 (i64.load offset=0x374 align=1 (i32.const 0))) + (set_local 0x375 (i64.load offset=0x375 align=1 (i32.const 0))) + (set_local 0x376 (i64.load offset=0x376 align=1 (i32.const 0))) + (set_local 0x377 (i64.load offset=0x377 align=1 (i32.const 0))) + (set_local 0x378 (i64.load offset=0x378 align=1 (i32.const 0))) + (set_local 0x379 (i64.load offset=0x379 align=1 (i32.const 0))) + (set_local 0x37a (i64.load offset=0x37a align=1 (i32.const 0))) + (set_local 0x37b (i64.load offset=0x37b align=1 (i32.const 0))) + (set_local 0x37c (i64.load offset=0x37c align=1 (i32.const 0))) + (set_local 0x37d (i64.load offset=0x37d align=1 (i32.const 0))) + (set_local 0x37e (i64.load offset=0x37e align=1 (i32.const 0))) + (set_local 0x37f (i64.load offset=0x37f align=1 (i32.const 0))) + (set_local 0x380 (i64.load offset=0x380 align=1 (i32.const 0))) + (set_local 0x381 (i64.load offset=0x381 align=1 (i32.const 0))) + (set_local 0x382 (i64.load offset=0x382 align=1 (i32.const 0))) + (set_local 0x383 (i64.load offset=0x383 align=1 (i32.const 0))) + (set_local 0x384 (i64.load offset=0x384 align=1 (i32.const 0))) + (set_local 0x385 (i64.load offset=0x385 align=1 (i32.const 0))) + (set_local 0x386 (i64.load offset=0x386 align=1 (i32.const 0))) + (set_local 0x387 (i64.load offset=0x387 align=1 (i32.const 0))) + (set_local 0x388 (i64.load offset=0x388 align=1 (i32.const 0))) + (set_local 0x389 (i64.load offset=0x389 align=1 (i32.const 0))) + (set_local 0x38a (i64.load offset=0x38a align=1 (i32.const 0))) + (set_local 0x38b (i64.load offset=0x38b align=1 (i32.const 0))) + (set_local 0x38c (i64.load offset=0x38c align=1 (i32.const 0))) + (set_local 0x38d (i64.load offset=0x38d align=1 (i32.const 0))) + (set_local 0x38e (i64.load offset=0x38e align=1 (i32.const 0))) + (set_local 0x38f (i64.load offset=0x38f align=1 (i32.const 0))) + (set_local 0x390 (i64.load offset=0x390 align=1 (i32.const 0))) + (set_local 0x391 (i64.load offset=0x391 align=1 (i32.const 0))) + (set_local 0x392 (i64.load offset=0x392 align=1 (i32.const 0))) + (set_local 0x393 (i64.load offset=0x393 align=1 (i32.const 0))) + (set_local 0x394 (i64.load offset=0x394 align=1 (i32.const 0))) + (set_local 0x395 (i64.load offset=0x395 align=1 (i32.const 0))) + (set_local 0x396 (i64.load offset=0x396 align=1 (i32.const 0))) + (set_local 0x397 (i64.load offset=0x397 align=1 (i32.const 0))) + (set_local 0x398 (i64.load offset=0x398 align=1 (i32.const 0))) + (set_local 0x399 (i64.load offset=0x399 align=1 (i32.const 0))) + (set_local 0x39a (i64.load offset=0x39a align=1 (i32.const 0))) + (set_local 0x39b (i64.load offset=0x39b align=1 (i32.const 0))) + (set_local 0x39c (i64.load offset=0x39c align=1 (i32.const 0))) + (set_local 0x39d (i64.load offset=0x39d align=1 (i32.const 0))) + (set_local 0x39e (i64.load offset=0x39e align=1 (i32.const 0))) + (set_local 0x39f (i64.load offset=0x39f align=1 (i32.const 0))) + (set_local 0x3a0 (i64.load offset=0x3a0 align=1 (i32.const 0))) + (set_local 0x3a1 (i64.load offset=0x3a1 align=1 (i32.const 0))) + (set_local 0x3a2 (i64.load offset=0x3a2 align=1 (i32.const 0))) + (set_local 0x3a3 (i64.load offset=0x3a3 align=1 (i32.const 0))) + (set_local 0x3a4 (i64.load offset=0x3a4 align=1 (i32.const 0))) + (set_local 0x3a5 (i64.load offset=0x3a5 align=1 (i32.const 0))) + (set_local 0x3a6 (i64.load offset=0x3a6 align=1 (i32.const 0))) + (set_local 0x3a7 (i64.load offset=0x3a7 align=1 (i32.const 0))) + (set_local 0x3a8 (i64.load offset=0x3a8 align=1 (i32.const 0))) + (set_local 0x3a9 (i64.load offset=0x3a9 align=1 (i32.const 0))) + (set_local 0x3aa (i64.load offset=0x3aa align=1 (i32.const 0))) + (set_local 0x3ab (i64.load offset=0x3ab align=1 (i32.const 0))) + (set_local 0x3ac (i64.load offset=0x3ac align=1 (i32.const 0))) + (set_local 0x3ad (i64.load offset=0x3ad align=1 (i32.const 0))) + (set_local 0x3ae (i64.load offset=0x3ae align=1 (i32.const 0))) + (set_local 0x3af (i64.load offset=0x3af align=1 (i32.const 0))) + (set_local 0x3b0 (i64.load offset=0x3b0 align=1 (i32.const 0))) + (set_local 0x3b1 (i64.load offset=0x3b1 align=1 (i32.const 0))) + (set_local 0x3b2 (i64.load offset=0x3b2 align=1 (i32.const 0))) + (set_local 0x3b3 (i64.load offset=0x3b3 align=1 (i32.const 0))) + (set_local 0x3b4 (i64.load offset=0x3b4 align=1 (i32.const 0))) + (set_local 0x3b5 (i64.load offset=0x3b5 align=1 (i32.const 0))) + (set_local 0x3b6 (i64.load offset=0x3b6 align=1 (i32.const 0))) + (set_local 0x3b7 (i64.load offset=0x3b7 align=1 (i32.const 0))) + (set_local 0x3b8 (i64.load offset=0x3b8 align=1 (i32.const 0))) + (set_local 0x3b9 (i64.load offset=0x3b9 align=1 (i32.const 0))) + (set_local 0x3ba (i64.load offset=0x3ba align=1 (i32.const 0))) + (set_local 0x3bb (i64.load offset=0x3bb align=1 (i32.const 0))) + (set_local 0x3bc (i64.load offset=0x3bc align=1 (i32.const 0))) + (set_local 0x3bd (i64.load offset=0x3bd align=1 (i32.const 0))) + (set_local 0x3be (i64.load offset=0x3be align=1 (i32.const 0))) + (set_local 0x3bf (i64.load offset=0x3bf align=1 (i32.const 0))) + (set_local 0x3c0 (i64.load offset=0x3c0 align=1 (i32.const 0))) + (set_local 0x3c1 (i64.load offset=0x3c1 align=1 (i32.const 0))) + (set_local 0x3c2 (i64.load offset=0x3c2 align=1 (i32.const 0))) + (set_local 0x3c3 (i64.load offset=0x3c3 align=1 (i32.const 0))) + (set_local 0x3c4 (i64.load offset=0x3c4 align=1 (i32.const 0))) + (set_local 0x3c5 (i64.load offset=0x3c5 align=1 (i32.const 0))) + (set_local 0x3c6 (i64.load offset=0x3c6 align=1 (i32.const 0))) + (set_local 0x3c7 (i64.load offset=0x3c7 align=1 (i32.const 0))) + (set_local 0x3c8 (i64.load offset=0x3c8 align=1 (i32.const 0))) + (set_local 0x3c9 (i64.load offset=0x3c9 align=1 (i32.const 0))) + (set_local 0x3ca (i64.load offset=0x3ca align=1 (i32.const 0))) + (set_local 0x3cb (i64.load offset=0x3cb align=1 (i32.const 0))) + (set_local 0x3cc (i64.load offset=0x3cc align=1 (i32.const 0))) + (set_local 0x3cd (i64.load offset=0x3cd align=1 (i32.const 0))) + (set_local 0x3ce (i64.load offset=0x3ce align=1 (i32.const 0))) + (set_local 0x3cf (i64.load offset=0x3cf align=1 (i32.const 0))) + (set_local 0x3d0 (i64.load offset=0x3d0 align=1 (i32.const 0))) + (set_local 0x3d1 (i64.load offset=0x3d1 align=1 (i32.const 0))) + (set_local 0x3d2 (i64.load offset=0x3d2 align=1 (i32.const 0))) + (set_local 0x3d3 (i64.load offset=0x3d3 align=1 (i32.const 0))) + (set_local 0x3d4 (i64.load offset=0x3d4 align=1 (i32.const 0))) + (set_local 0x3d5 (i64.load offset=0x3d5 align=1 (i32.const 0))) + (set_local 0x3d6 (i64.load offset=0x3d6 align=1 (i32.const 0))) + (set_local 0x3d7 (i64.load offset=0x3d7 align=1 (i32.const 0))) + (set_local 0x3d8 (i64.load offset=0x3d8 align=1 (i32.const 0))) + (set_local 0x3d9 (i64.load offset=0x3d9 align=1 (i32.const 0))) + (set_local 0x3da (i64.load offset=0x3da align=1 (i32.const 0))) + (set_local 0x3db (i64.load offset=0x3db align=1 (i32.const 0))) + (set_local 0x3dc (i64.load offset=0x3dc align=1 (i32.const 0))) + (set_local 0x3dd (i64.load offset=0x3dd align=1 (i32.const 0))) + (set_local 0x3de (i64.load offset=0x3de align=1 (i32.const 0))) + (set_local 0x3df (i64.load offset=0x3df align=1 (i32.const 0))) + (set_local 0x3e0 (i64.load offset=0x3e0 align=1 (i32.const 0))) + (set_local 0x3e1 (i64.load offset=0x3e1 align=1 (i32.const 0))) + (set_local 0x3e2 (i64.load offset=0x3e2 align=1 (i32.const 0))) + (set_local 0x3e3 (i64.load offset=0x3e3 align=1 (i32.const 0))) + (set_local 0x3e4 (i64.load offset=0x3e4 align=1 (i32.const 0))) + (set_local 0x3e5 (i64.load offset=0x3e5 align=1 (i32.const 0))) + (set_local 0x3e6 (i64.load offset=0x3e6 align=1 (i32.const 0))) + (set_local 0x3e7 (i64.load offset=0x3e7 align=1 (i32.const 0))) + (set_local 0x3e8 (i64.load offset=0x3e8 align=1 (i32.const 0))) + (set_local 0x3e9 (i64.load offset=0x3e9 align=1 (i32.const 0))) + (set_local 0x3ea (i64.load offset=0x3ea align=1 (i32.const 0))) + (set_local 0x3eb (i64.load offset=0x3eb align=1 (i32.const 0))) + (set_local 0x3ec (i64.load offset=0x3ec align=1 (i32.const 0))) + (set_local 0x3ed (i64.load offset=0x3ed align=1 (i32.const 0))) + (set_local 0x3ee (i64.load offset=0x3ee align=1 (i32.const 0))) + (set_local 0x3ef (i64.load offset=0x3ef align=1 (i32.const 0))) + (set_local 0x3f0 (i64.load offset=0x3f0 align=1 (i32.const 0))) + (set_local 0x3f1 (i64.load offset=0x3f1 align=1 (i32.const 0))) + (set_local 0x3f2 (i64.load offset=0x3f2 align=1 (i32.const 0))) + (set_local 0x3f3 (i64.load offset=0x3f3 align=1 (i32.const 0))) + (set_local 0x3f4 (i64.load offset=0x3f4 align=1 (i32.const 0))) + (set_local 0x3f5 (i64.load offset=0x3f5 align=1 (i32.const 0))) + (set_local 0x3f6 (i64.load offset=0x3f6 align=1 (i32.const 0))) + (set_local 0x3f7 (i64.load offset=0x3f7 align=1 (i32.const 0))) + (set_local 0x3f8 (i64.load offset=0x3f8 align=1 (i32.const 0))) + (set_local 0x3f9 (i64.load offset=0x3f9 align=1 (i32.const 0))) + (set_local 0x3fa (i64.load offset=0x3fa align=1 (i32.const 0))) + (set_local 0x3fb (i64.load offset=0x3fb align=1 (i32.const 0))) + (set_local 0x3fc (i64.load offset=0x3fc align=1 (i32.const 0))) + (set_local 0x3fd (i64.load offset=0x3fd align=1 (i32.const 0))) + (set_local 0x3fe (i64.load offset=0x3fe align=1 (i32.const 0))) + (set_local 0x3ff (i64.load offset=0x3ff align=1 (i32.const 0))) + (set_local 0x400 (i64.load offset=0x400 align=1 (i32.const 0))) + (set_local 0x401 (i64.load offset=0x401 align=1 (i32.const 0))) + (set_local 0x402 (i64.load offset=0x402 align=1 (i32.const 0))) + (set_local 0x403 (i64.load offset=0x403 align=1 (i32.const 0))) + (set_local 0x404 (i64.load offset=0x404 align=1 (i32.const 0))) + (set_local 0x405 (i64.load offset=0x405 align=1 (i32.const 0))) + (set_local 0x406 (i64.load offset=0x406 align=1 (i32.const 0))) + (set_local 0x407 (i64.load offset=0x407 align=1 (i32.const 0))) + (set_local 0x408 (i64.load offset=0x408 align=1 (i32.const 0))) + (set_local 0x409 (i64.load offset=0x409 align=1 (i32.const 0))) + (set_local 0x40a (i64.load offset=0x40a align=1 (i32.const 0))) + (set_local 0x40b (i64.load offset=0x40b align=1 (i32.const 0))) + (set_local 0x40c (i64.load offset=0x40c align=1 (i32.const 0))) + (set_local 0x40d (i64.load offset=0x40d align=1 (i32.const 0))) + (set_local 0x40e (i64.load offset=0x40e align=1 (i32.const 0))) + (set_local 0x40f (i64.load offset=0x40f align=1 (i32.const 0))) + (set_local 0x410 (i64.load offset=0x410 align=1 (i32.const 0))) + (set_local 0x411 (i64.load offset=0x411 align=1 (i32.const 0))) + (set_local 0x412 (i64.load offset=0x412 align=1 (i32.const 0))) + (set_local 0x413 (i64.load offset=0x413 align=1 (i32.const 0))) + (set_local 0x414 (i64.load offset=0x414 align=1 (i32.const 0))) + (set_local 0x415 (i64.load offset=0x415 align=1 (i32.const 0))) + (set_local 0x416 (i64.load offset=0x416 align=1 (i32.const 0))) + (set_local 0x417 (i64.load offset=0x417 align=1 (i32.const 0))) + (set_local 0x418 (i64.load offset=0x418 align=1 (i32.const 0))) + (set_local 0x419 (i64.load offset=0x419 align=1 (i32.const 0))) + (set_local 0x41a (i64.load offset=0x41a align=1 (i32.const 0))) + (set_local 0x41b (i64.load offset=0x41b align=1 (i32.const 0))) + (set_local 0x41c (i64.load offset=0x41c align=1 (i32.const 0))) + (set_local 0x41d (i64.load offset=0x41d align=1 (i32.const 0))) + (set_local 0x41e (i64.load offset=0x41e align=1 (i32.const 0))) + (set_local 0x41f (i64.load offset=0x41f align=1 (i32.const 0))) + + ;; store the locals back to memory + (i64.store offset=0x000 align=1 (i32.const 0) (get_local 0x000)) + (i64.store offset=0x001 align=1 (i32.const 0) (get_local 0x001)) + (i64.store offset=0x002 align=1 (i32.const 0) (get_local 0x002)) + (i64.store offset=0x003 align=1 (i32.const 0) (get_local 0x003)) + (i64.store offset=0x004 align=1 (i32.const 0) (get_local 0x004)) + (i64.store offset=0x005 align=1 (i32.const 0) (get_local 0x005)) + (i64.store offset=0x006 align=1 (i32.const 0) (get_local 0x006)) + (i64.store offset=0x007 align=1 (i32.const 0) (get_local 0x007)) + (i64.store offset=0x008 align=1 (i32.const 0) (get_local 0x008)) + (i64.store offset=0x009 align=1 (i32.const 0) (get_local 0x009)) + (i64.store offset=0x00a align=1 (i32.const 0) (get_local 0x00a)) + (i64.store offset=0x00b align=1 (i32.const 0) (get_local 0x00b)) + (i64.store offset=0x00c align=1 (i32.const 0) (get_local 0x00c)) + (i64.store offset=0x00d align=1 (i32.const 0) (get_local 0x00d)) + (i64.store offset=0x00e align=1 (i32.const 0) (get_local 0x00e)) + (i64.store offset=0x00f align=1 (i32.const 0) (get_local 0x00f)) + (i64.store offset=0x010 align=1 (i32.const 0) (get_local 0x010)) + (i64.store offset=0x011 align=1 (i32.const 0) (get_local 0x011)) + (i64.store offset=0x012 align=1 (i32.const 0) (get_local 0x012)) + (i64.store offset=0x013 align=1 (i32.const 0) (get_local 0x013)) + (i64.store offset=0x014 align=1 (i32.const 0) (get_local 0x014)) + (i64.store offset=0x015 align=1 (i32.const 0) (get_local 0x015)) + (i64.store offset=0x016 align=1 (i32.const 0) (get_local 0x016)) + (i64.store offset=0x017 align=1 (i32.const 0) (get_local 0x017)) + (i64.store offset=0x018 align=1 (i32.const 0) (get_local 0x018)) + (i64.store offset=0x019 align=1 (i32.const 0) (get_local 0x019)) + (i64.store offset=0x01a align=1 (i32.const 0) (get_local 0x01a)) + (i64.store offset=0x01b align=1 (i32.const 0) (get_local 0x01b)) + (i64.store offset=0x01c align=1 (i32.const 0) (get_local 0x01c)) + (i64.store offset=0x01d align=1 (i32.const 0) (get_local 0x01d)) + (i64.store offset=0x01e align=1 (i32.const 0) (get_local 0x01e)) + (i64.store offset=0x01f align=1 (i32.const 0) (get_local 0x01f)) + (i64.store offset=0x020 align=1 (i32.const 0) (get_local 0x020)) + (i64.store offset=0x021 align=1 (i32.const 0) (get_local 0x021)) + (i64.store offset=0x022 align=1 (i32.const 0) (get_local 0x022)) + (i64.store offset=0x023 align=1 (i32.const 0) (get_local 0x023)) + (i64.store offset=0x024 align=1 (i32.const 0) (get_local 0x024)) + (i64.store offset=0x025 align=1 (i32.const 0) (get_local 0x025)) + (i64.store offset=0x026 align=1 (i32.const 0) (get_local 0x026)) + (i64.store offset=0x027 align=1 (i32.const 0) (get_local 0x027)) + (i64.store offset=0x028 align=1 (i32.const 0) (get_local 0x028)) + (i64.store offset=0x029 align=1 (i32.const 0) (get_local 0x029)) + (i64.store offset=0x02a align=1 (i32.const 0) (get_local 0x02a)) + (i64.store offset=0x02b align=1 (i32.const 0) (get_local 0x02b)) + (i64.store offset=0x02c align=1 (i32.const 0) (get_local 0x02c)) + (i64.store offset=0x02d align=1 (i32.const 0) (get_local 0x02d)) + (i64.store offset=0x02e align=1 (i32.const 0) (get_local 0x02e)) + (i64.store offset=0x02f align=1 (i32.const 0) (get_local 0x02f)) + (i64.store offset=0x030 align=1 (i32.const 0) (get_local 0x030)) + (i64.store offset=0x031 align=1 (i32.const 0) (get_local 0x031)) + (i64.store offset=0x032 align=1 (i32.const 0) (get_local 0x032)) + (i64.store offset=0x033 align=1 (i32.const 0) (get_local 0x033)) + (i64.store offset=0x034 align=1 (i32.const 0) (get_local 0x034)) + (i64.store offset=0x035 align=1 (i32.const 0) (get_local 0x035)) + (i64.store offset=0x036 align=1 (i32.const 0) (get_local 0x036)) + (i64.store offset=0x037 align=1 (i32.const 0) (get_local 0x037)) + (i64.store offset=0x038 align=1 (i32.const 0) (get_local 0x038)) + (i64.store offset=0x039 align=1 (i32.const 0) (get_local 0x039)) + (i64.store offset=0x03a align=1 (i32.const 0) (get_local 0x03a)) + (i64.store offset=0x03b align=1 (i32.const 0) (get_local 0x03b)) + (i64.store offset=0x03c align=1 (i32.const 0) (get_local 0x03c)) + (i64.store offset=0x03d align=1 (i32.const 0) (get_local 0x03d)) + (i64.store offset=0x03e align=1 (i32.const 0) (get_local 0x03e)) + (i64.store offset=0x03f align=1 (i32.const 0) (get_local 0x03f)) + (i64.store offset=0x040 align=1 (i32.const 0) (get_local 0x040)) + (i64.store offset=0x041 align=1 (i32.const 0) (get_local 0x041)) + (i64.store offset=0x042 align=1 (i32.const 0) (get_local 0x042)) + (i64.store offset=0x043 align=1 (i32.const 0) (get_local 0x043)) + (i64.store offset=0x044 align=1 (i32.const 0) (get_local 0x044)) + (i64.store offset=0x045 align=1 (i32.const 0) (get_local 0x045)) + (i64.store offset=0x046 align=1 (i32.const 0) (get_local 0x046)) + (i64.store offset=0x047 align=1 (i32.const 0) (get_local 0x047)) + (i64.store offset=0x048 align=1 (i32.const 0) (get_local 0x048)) + (i64.store offset=0x049 align=1 (i32.const 0) (get_local 0x049)) + (i64.store offset=0x04a align=1 (i32.const 0) (get_local 0x04a)) + (i64.store offset=0x04b align=1 (i32.const 0) (get_local 0x04b)) + (i64.store offset=0x04c align=1 (i32.const 0) (get_local 0x04c)) + (i64.store offset=0x04d align=1 (i32.const 0) (get_local 0x04d)) + (i64.store offset=0x04e align=1 (i32.const 0) (get_local 0x04e)) + (i64.store offset=0x04f align=1 (i32.const 0) (get_local 0x04f)) + (i64.store offset=0x050 align=1 (i32.const 0) (get_local 0x050)) + (i64.store offset=0x051 align=1 (i32.const 0) (get_local 0x051)) + (i64.store offset=0x052 align=1 (i32.const 0) (get_local 0x052)) + (i64.store offset=0x053 align=1 (i32.const 0) (get_local 0x053)) + (i64.store offset=0x054 align=1 (i32.const 0) (get_local 0x054)) + (i64.store offset=0x055 align=1 (i32.const 0) (get_local 0x055)) + (i64.store offset=0x056 align=1 (i32.const 0) (get_local 0x056)) + (i64.store offset=0x057 align=1 (i32.const 0) (get_local 0x057)) + (i64.store offset=0x058 align=1 (i32.const 0) (get_local 0x058)) + (i64.store offset=0x059 align=1 (i32.const 0) (get_local 0x059)) + (i64.store offset=0x05a align=1 (i32.const 0) (get_local 0x05a)) + (i64.store offset=0x05b align=1 (i32.const 0) (get_local 0x05b)) + (i64.store offset=0x05c align=1 (i32.const 0) (get_local 0x05c)) + (i64.store offset=0x05d align=1 (i32.const 0) (get_local 0x05d)) + (i64.store offset=0x05e align=1 (i32.const 0) (get_local 0x05e)) + (i64.store offset=0x05f align=1 (i32.const 0) (get_local 0x05f)) + (i64.store offset=0x060 align=1 (i32.const 0) (get_local 0x060)) + (i64.store offset=0x061 align=1 (i32.const 0) (get_local 0x061)) + (i64.store offset=0x062 align=1 (i32.const 0) (get_local 0x062)) + (i64.store offset=0x063 align=1 (i32.const 0) (get_local 0x063)) + (i64.store offset=0x064 align=1 (i32.const 0) (get_local 0x064)) + (i64.store offset=0x065 align=1 (i32.const 0) (get_local 0x065)) + (i64.store offset=0x066 align=1 (i32.const 0) (get_local 0x066)) + (i64.store offset=0x067 align=1 (i32.const 0) (get_local 0x067)) + (i64.store offset=0x068 align=1 (i32.const 0) (get_local 0x068)) + (i64.store offset=0x069 align=1 (i32.const 0) (get_local 0x069)) + (i64.store offset=0x06a align=1 (i32.const 0) (get_local 0x06a)) + (i64.store offset=0x06b align=1 (i32.const 0) (get_local 0x06b)) + (i64.store offset=0x06c align=1 (i32.const 0) (get_local 0x06c)) + (i64.store offset=0x06d align=1 (i32.const 0) (get_local 0x06d)) + (i64.store offset=0x06e align=1 (i32.const 0) (get_local 0x06e)) + (i64.store offset=0x06f align=1 (i32.const 0) (get_local 0x06f)) + (i64.store offset=0x070 align=1 (i32.const 0) (get_local 0x070)) + (i64.store offset=0x071 align=1 (i32.const 0) (get_local 0x071)) + (i64.store offset=0x072 align=1 (i32.const 0) (get_local 0x072)) + (i64.store offset=0x073 align=1 (i32.const 0) (get_local 0x073)) + (i64.store offset=0x074 align=1 (i32.const 0) (get_local 0x074)) + (i64.store offset=0x075 align=1 (i32.const 0) (get_local 0x075)) + (i64.store offset=0x076 align=1 (i32.const 0) (get_local 0x076)) + (i64.store offset=0x077 align=1 (i32.const 0) (get_local 0x077)) + (i64.store offset=0x078 align=1 (i32.const 0) (get_local 0x078)) + (i64.store offset=0x079 align=1 (i32.const 0) (get_local 0x079)) + (i64.store offset=0x07a align=1 (i32.const 0) (get_local 0x07a)) + (i64.store offset=0x07b align=1 (i32.const 0) (get_local 0x07b)) + (i64.store offset=0x07c align=1 (i32.const 0) (get_local 0x07c)) + (i64.store offset=0x07d align=1 (i32.const 0) (get_local 0x07d)) + (i64.store offset=0x07e align=1 (i32.const 0) (get_local 0x07e)) + (i64.store offset=0x07f align=1 (i32.const 0) (get_local 0x07f)) + (i64.store offset=0x080 align=1 (i32.const 0) (get_local 0x080)) + (i64.store offset=0x081 align=1 (i32.const 0) (get_local 0x081)) + (i64.store offset=0x082 align=1 (i32.const 0) (get_local 0x082)) + (i64.store offset=0x083 align=1 (i32.const 0) (get_local 0x083)) + (i64.store offset=0x084 align=1 (i32.const 0) (get_local 0x084)) + (i64.store offset=0x085 align=1 (i32.const 0) (get_local 0x085)) + (i64.store offset=0x086 align=1 (i32.const 0) (get_local 0x086)) + (i64.store offset=0x087 align=1 (i32.const 0) (get_local 0x087)) + (i64.store offset=0x088 align=1 (i32.const 0) (get_local 0x088)) + (i64.store offset=0x089 align=1 (i32.const 0) (get_local 0x089)) + (i64.store offset=0x08a align=1 (i32.const 0) (get_local 0x08a)) + (i64.store offset=0x08b align=1 (i32.const 0) (get_local 0x08b)) + (i64.store offset=0x08c align=1 (i32.const 0) (get_local 0x08c)) + (i64.store offset=0x08d align=1 (i32.const 0) (get_local 0x08d)) + (i64.store offset=0x08e align=1 (i32.const 0) (get_local 0x08e)) + (i64.store offset=0x08f align=1 (i32.const 0) (get_local 0x08f)) + (i64.store offset=0x090 align=1 (i32.const 0) (get_local 0x090)) + (i64.store offset=0x091 align=1 (i32.const 0) (get_local 0x091)) + (i64.store offset=0x092 align=1 (i32.const 0) (get_local 0x092)) + (i64.store offset=0x093 align=1 (i32.const 0) (get_local 0x093)) + (i64.store offset=0x094 align=1 (i32.const 0) (get_local 0x094)) + (i64.store offset=0x095 align=1 (i32.const 0) (get_local 0x095)) + (i64.store offset=0x096 align=1 (i32.const 0) (get_local 0x096)) + (i64.store offset=0x097 align=1 (i32.const 0) (get_local 0x097)) + (i64.store offset=0x098 align=1 (i32.const 0) (get_local 0x098)) + (i64.store offset=0x099 align=1 (i32.const 0) (get_local 0x099)) + (i64.store offset=0x09a align=1 (i32.const 0) (get_local 0x09a)) + (i64.store offset=0x09b align=1 (i32.const 0) (get_local 0x09b)) + (i64.store offset=0x09c align=1 (i32.const 0) (get_local 0x09c)) + (i64.store offset=0x09d align=1 (i32.const 0) (get_local 0x09d)) + (i64.store offset=0x09e align=1 (i32.const 0) (get_local 0x09e)) + (i64.store offset=0x09f align=1 (i32.const 0) (get_local 0x09f)) + (i64.store offset=0x0a0 align=1 (i32.const 0) (get_local 0x0a0)) + (i64.store offset=0x0a1 align=1 (i32.const 0) (get_local 0x0a1)) + (i64.store offset=0x0a2 align=1 (i32.const 0) (get_local 0x0a2)) + (i64.store offset=0x0a3 align=1 (i32.const 0) (get_local 0x0a3)) + (i64.store offset=0x0a4 align=1 (i32.const 0) (get_local 0x0a4)) + (i64.store offset=0x0a5 align=1 (i32.const 0) (get_local 0x0a5)) + (i64.store offset=0x0a6 align=1 (i32.const 0) (get_local 0x0a6)) + (i64.store offset=0x0a7 align=1 (i32.const 0) (get_local 0x0a7)) + (i64.store offset=0x0a8 align=1 (i32.const 0) (get_local 0x0a8)) + (i64.store offset=0x0a9 align=1 (i32.const 0) (get_local 0x0a9)) + (i64.store offset=0x0aa align=1 (i32.const 0) (get_local 0x0aa)) + (i64.store offset=0x0ab align=1 (i32.const 0) (get_local 0x0ab)) + (i64.store offset=0x0ac align=1 (i32.const 0) (get_local 0x0ac)) + (i64.store offset=0x0ad align=1 (i32.const 0) (get_local 0x0ad)) + (i64.store offset=0x0ae align=1 (i32.const 0) (get_local 0x0ae)) + (i64.store offset=0x0af align=1 (i32.const 0) (get_local 0x0af)) + (i64.store offset=0x0b0 align=1 (i32.const 0) (get_local 0x0b0)) + (i64.store offset=0x0b1 align=1 (i32.const 0) (get_local 0x0b1)) + (i64.store offset=0x0b2 align=1 (i32.const 0) (get_local 0x0b2)) + (i64.store offset=0x0b3 align=1 (i32.const 0) (get_local 0x0b3)) + (i64.store offset=0x0b4 align=1 (i32.const 0) (get_local 0x0b4)) + (i64.store offset=0x0b5 align=1 (i32.const 0) (get_local 0x0b5)) + (i64.store offset=0x0b6 align=1 (i32.const 0) (get_local 0x0b6)) + (i64.store offset=0x0b7 align=1 (i32.const 0) (get_local 0x0b7)) + (i64.store offset=0x0b8 align=1 (i32.const 0) (get_local 0x0b8)) + (i64.store offset=0x0b9 align=1 (i32.const 0) (get_local 0x0b9)) + (i64.store offset=0x0ba align=1 (i32.const 0) (get_local 0x0ba)) + (i64.store offset=0x0bb align=1 (i32.const 0) (get_local 0x0bb)) + (i64.store offset=0x0bc align=1 (i32.const 0) (get_local 0x0bc)) + (i64.store offset=0x0bd align=1 (i32.const 0) (get_local 0x0bd)) + (i64.store offset=0x0be align=1 (i32.const 0) (get_local 0x0be)) + (i64.store offset=0x0bf align=1 (i32.const 0) (get_local 0x0bf)) + (i64.store offset=0x0c0 align=1 (i32.const 0) (get_local 0x0c0)) + (i64.store offset=0x0c1 align=1 (i32.const 0) (get_local 0x0c1)) + (i64.store offset=0x0c2 align=1 (i32.const 0) (get_local 0x0c2)) + (i64.store offset=0x0c3 align=1 (i32.const 0) (get_local 0x0c3)) + (i64.store offset=0x0c4 align=1 (i32.const 0) (get_local 0x0c4)) + (i64.store offset=0x0c5 align=1 (i32.const 0) (get_local 0x0c5)) + (i64.store offset=0x0c6 align=1 (i32.const 0) (get_local 0x0c6)) + (i64.store offset=0x0c7 align=1 (i32.const 0) (get_local 0x0c7)) + (i64.store offset=0x0c8 align=1 (i32.const 0) (get_local 0x0c8)) + (i64.store offset=0x0c9 align=1 (i32.const 0) (get_local 0x0c9)) + (i64.store offset=0x0ca align=1 (i32.const 0) (get_local 0x0ca)) + (i64.store offset=0x0cb align=1 (i32.const 0) (get_local 0x0cb)) + (i64.store offset=0x0cc align=1 (i32.const 0) (get_local 0x0cc)) + (i64.store offset=0x0cd align=1 (i32.const 0) (get_local 0x0cd)) + (i64.store offset=0x0ce align=1 (i32.const 0) (get_local 0x0ce)) + (i64.store offset=0x0cf align=1 (i32.const 0) (get_local 0x0cf)) + (i64.store offset=0x0d0 align=1 (i32.const 0) (get_local 0x0d0)) + (i64.store offset=0x0d1 align=1 (i32.const 0) (get_local 0x0d1)) + (i64.store offset=0x0d2 align=1 (i32.const 0) (get_local 0x0d2)) + (i64.store offset=0x0d3 align=1 (i32.const 0) (get_local 0x0d3)) + (i64.store offset=0x0d4 align=1 (i32.const 0) (get_local 0x0d4)) + (i64.store offset=0x0d5 align=1 (i32.const 0) (get_local 0x0d5)) + (i64.store offset=0x0d6 align=1 (i32.const 0) (get_local 0x0d6)) + (i64.store offset=0x0d7 align=1 (i32.const 0) (get_local 0x0d7)) + (i64.store offset=0x0d8 align=1 (i32.const 0) (get_local 0x0d8)) + (i64.store offset=0x0d9 align=1 (i32.const 0) (get_local 0x0d9)) + (i64.store offset=0x0da align=1 (i32.const 0) (get_local 0x0da)) + (i64.store offset=0x0db align=1 (i32.const 0) (get_local 0x0db)) + (i64.store offset=0x0dc align=1 (i32.const 0) (get_local 0x0dc)) + (i64.store offset=0x0dd align=1 (i32.const 0) (get_local 0x0dd)) + (i64.store offset=0x0de align=1 (i32.const 0) (get_local 0x0de)) + (i64.store offset=0x0df align=1 (i32.const 0) (get_local 0x0df)) + (i64.store offset=0x0e0 align=1 (i32.const 0) (get_local 0x0e0)) + (i64.store offset=0x0e1 align=1 (i32.const 0) (get_local 0x0e1)) + (i64.store offset=0x0e2 align=1 (i32.const 0) (get_local 0x0e2)) + (i64.store offset=0x0e3 align=1 (i32.const 0) (get_local 0x0e3)) + (i64.store offset=0x0e4 align=1 (i32.const 0) (get_local 0x0e4)) + (i64.store offset=0x0e5 align=1 (i32.const 0) (get_local 0x0e5)) + (i64.store offset=0x0e6 align=1 (i32.const 0) (get_local 0x0e6)) + (i64.store offset=0x0e7 align=1 (i32.const 0) (get_local 0x0e7)) + (i64.store offset=0x0e8 align=1 (i32.const 0) (get_local 0x0e8)) + (i64.store offset=0x0e9 align=1 (i32.const 0) (get_local 0x0e9)) + (i64.store offset=0x0ea align=1 (i32.const 0) (get_local 0x0ea)) + (i64.store offset=0x0eb align=1 (i32.const 0) (get_local 0x0eb)) + (i64.store offset=0x0ec align=1 (i32.const 0) (get_local 0x0ec)) + (i64.store offset=0x0ed align=1 (i32.const 0) (get_local 0x0ed)) + (i64.store offset=0x0ee align=1 (i32.const 0) (get_local 0x0ee)) + (i64.store offset=0x0ef align=1 (i32.const 0) (get_local 0x0ef)) + (i64.store offset=0x0f0 align=1 (i32.const 0) (get_local 0x0f0)) + (i64.store offset=0x0f1 align=1 (i32.const 0) (get_local 0x0f1)) + (i64.store offset=0x0f2 align=1 (i32.const 0) (get_local 0x0f2)) + (i64.store offset=0x0f3 align=1 (i32.const 0) (get_local 0x0f3)) + (i64.store offset=0x0f4 align=1 (i32.const 0) (get_local 0x0f4)) + (i64.store offset=0x0f5 align=1 (i32.const 0) (get_local 0x0f5)) + (i64.store offset=0x0f6 align=1 (i32.const 0) (get_local 0x0f6)) + (i64.store offset=0x0f7 align=1 (i32.const 0) (get_local 0x0f7)) + (i64.store offset=0x0f8 align=1 (i32.const 0) (get_local 0x0f8)) + (i64.store offset=0x0f9 align=1 (i32.const 0) (get_local 0x0f9)) + (i64.store offset=0x0fa align=1 (i32.const 0) (get_local 0x0fa)) + (i64.store offset=0x0fb align=1 (i32.const 0) (get_local 0x0fb)) + (i64.store offset=0x0fc align=1 (i32.const 0) (get_local 0x0fc)) + (i64.store offset=0x0fd align=1 (i32.const 0) (get_local 0x0fd)) + (i64.store offset=0x0fe align=1 (i32.const 0) (get_local 0x0fe)) + (i64.store offset=0x0ff align=1 (i32.const 0) (get_local 0x0ff)) + (i64.store offset=0x100 align=1 (i32.const 0) (get_local 0x100)) + (i64.store offset=0x101 align=1 (i32.const 0) (get_local 0x101)) + (i64.store offset=0x102 align=1 (i32.const 0) (get_local 0x102)) + (i64.store offset=0x103 align=1 (i32.const 0) (get_local 0x103)) + (i64.store offset=0x104 align=1 (i32.const 0) (get_local 0x104)) + (i64.store offset=0x105 align=1 (i32.const 0) (get_local 0x105)) + (i64.store offset=0x106 align=1 (i32.const 0) (get_local 0x106)) + (i64.store offset=0x107 align=1 (i32.const 0) (get_local 0x107)) + (i64.store offset=0x108 align=1 (i32.const 0) (get_local 0x108)) + (i64.store offset=0x109 align=1 (i32.const 0) (get_local 0x109)) + (i64.store offset=0x10a align=1 (i32.const 0) (get_local 0x10a)) + (i64.store offset=0x10b align=1 (i32.const 0) (get_local 0x10b)) + (i64.store offset=0x10c align=1 (i32.const 0) (get_local 0x10c)) + (i64.store offset=0x10d align=1 (i32.const 0) (get_local 0x10d)) + (i64.store offset=0x10e align=1 (i32.const 0) (get_local 0x10e)) + (i64.store offset=0x10f align=1 (i32.const 0) (get_local 0x10f)) + (i64.store offset=0x110 align=1 (i32.const 0) (get_local 0x110)) + (i64.store offset=0x111 align=1 (i32.const 0) (get_local 0x111)) + (i64.store offset=0x112 align=1 (i32.const 0) (get_local 0x112)) + (i64.store offset=0x113 align=1 (i32.const 0) (get_local 0x113)) + (i64.store offset=0x114 align=1 (i32.const 0) (get_local 0x114)) + (i64.store offset=0x115 align=1 (i32.const 0) (get_local 0x115)) + (i64.store offset=0x116 align=1 (i32.const 0) (get_local 0x116)) + (i64.store offset=0x117 align=1 (i32.const 0) (get_local 0x117)) + (i64.store offset=0x118 align=1 (i32.const 0) (get_local 0x118)) + (i64.store offset=0x119 align=1 (i32.const 0) (get_local 0x119)) + (i64.store offset=0x11a align=1 (i32.const 0) (get_local 0x11a)) + (i64.store offset=0x11b align=1 (i32.const 0) (get_local 0x11b)) + (i64.store offset=0x11c align=1 (i32.const 0) (get_local 0x11c)) + (i64.store offset=0x11d align=1 (i32.const 0) (get_local 0x11d)) + (i64.store offset=0x11e align=1 (i32.const 0) (get_local 0x11e)) + (i64.store offset=0x11f align=1 (i32.const 0) (get_local 0x11f)) + (i64.store offset=0x120 align=1 (i32.const 0) (get_local 0x120)) + (i64.store offset=0x121 align=1 (i32.const 0) (get_local 0x121)) + (i64.store offset=0x122 align=1 (i32.const 0) (get_local 0x122)) + (i64.store offset=0x123 align=1 (i32.const 0) (get_local 0x123)) + (i64.store offset=0x124 align=1 (i32.const 0) (get_local 0x124)) + (i64.store offset=0x125 align=1 (i32.const 0) (get_local 0x125)) + (i64.store offset=0x126 align=1 (i32.const 0) (get_local 0x126)) + (i64.store offset=0x127 align=1 (i32.const 0) (get_local 0x127)) + (i64.store offset=0x128 align=1 (i32.const 0) (get_local 0x128)) + (i64.store offset=0x129 align=1 (i32.const 0) (get_local 0x129)) + (i64.store offset=0x12a align=1 (i32.const 0) (get_local 0x12a)) + (i64.store offset=0x12b align=1 (i32.const 0) (get_local 0x12b)) + (i64.store offset=0x12c align=1 (i32.const 0) (get_local 0x12c)) + (i64.store offset=0x12d align=1 (i32.const 0) (get_local 0x12d)) + (i64.store offset=0x12e align=1 (i32.const 0) (get_local 0x12e)) + (i64.store offset=0x12f align=1 (i32.const 0) (get_local 0x12f)) + (i64.store offset=0x130 align=1 (i32.const 0) (get_local 0x130)) + (i64.store offset=0x131 align=1 (i32.const 0) (get_local 0x131)) + (i64.store offset=0x132 align=1 (i32.const 0) (get_local 0x132)) + (i64.store offset=0x133 align=1 (i32.const 0) (get_local 0x133)) + (i64.store offset=0x134 align=1 (i32.const 0) (get_local 0x134)) + (i64.store offset=0x135 align=1 (i32.const 0) (get_local 0x135)) + (i64.store offset=0x136 align=1 (i32.const 0) (get_local 0x136)) + (i64.store offset=0x137 align=1 (i32.const 0) (get_local 0x137)) + (i64.store offset=0x138 align=1 (i32.const 0) (get_local 0x138)) + (i64.store offset=0x139 align=1 (i32.const 0) (get_local 0x139)) + (i64.store offset=0x13a align=1 (i32.const 0) (get_local 0x13a)) + (i64.store offset=0x13b align=1 (i32.const 0) (get_local 0x13b)) + (i64.store offset=0x13c align=1 (i32.const 0) (get_local 0x13c)) + (i64.store offset=0x13d align=1 (i32.const 0) (get_local 0x13d)) + (i64.store offset=0x13e align=1 (i32.const 0) (get_local 0x13e)) + (i64.store offset=0x13f align=1 (i32.const 0) (get_local 0x13f)) + (i64.store offset=0x140 align=1 (i32.const 0) (get_local 0x140)) + (i64.store offset=0x141 align=1 (i32.const 0) (get_local 0x141)) + (i64.store offset=0x142 align=1 (i32.const 0) (get_local 0x142)) + (i64.store offset=0x143 align=1 (i32.const 0) (get_local 0x143)) + (i64.store offset=0x144 align=1 (i32.const 0) (get_local 0x144)) + (i64.store offset=0x145 align=1 (i32.const 0) (get_local 0x145)) + (i64.store offset=0x146 align=1 (i32.const 0) (get_local 0x146)) + (i64.store offset=0x147 align=1 (i32.const 0) (get_local 0x147)) + (i64.store offset=0x148 align=1 (i32.const 0) (get_local 0x148)) + (i64.store offset=0x149 align=1 (i32.const 0) (get_local 0x149)) + (i64.store offset=0x14a align=1 (i32.const 0) (get_local 0x14a)) + (i64.store offset=0x14b align=1 (i32.const 0) (get_local 0x14b)) + (i64.store offset=0x14c align=1 (i32.const 0) (get_local 0x14c)) + (i64.store offset=0x14d align=1 (i32.const 0) (get_local 0x14d)) + (i64.store offset=0x14e align=1 (i32.const 0) (get_local 0x14e)) + (i64.store offset=0x14f align=1 (i32.const 0) (get_local 0x14f)) + (i64.store offset=0x150 align=1 (i32.const 0) (get_local 0x150)) + (i64.store offset=0x151 align=1 (i32.const 0) (get_local 0x151)) + (i64.store offset=0x152 align=1 (i32.const 0) (get_local 0x152)) + (i64.store offset=0x153 align=1 (i32.const 0) (get_local 0x153)) + (i64.store offset=0x154 align=1 (i32.const 0) (get_local 0x154)) + (i64.store offset=0x155 align=1 (i32.const 0) (get_local 0x155)) + (i64.store offset=0x156 align=1 (i32.const 0) (get_local 0x156)) + (i64.store offset=0x157 align=1 (i32.const 0) (get_local 0x157)) + (i64.store offset=0x158 align=1 (i32.const 0) (get_local 0x158)) + (i64.store offset=0x159 align=1 (i32.const 0) (get_local 0x159)) + (i64.store offset=0x15a align=1 (i32.const 0) (get_local 0x15a)) + (i64.store offset=0x15b align=1 (i32.const 0) (get_local 0x15b)) + (i64.store offset=0x15c align=1 (i32.const 0) (get_local 0x15c)) + (i64.store offset=0x15d align=1 (i32.const 0) (get_local 0x15d)) + (i64.store offset=0x15e align=1 (i32.const 0) (get_local 0x15e)) + (i64.store offset=0x15f align=1 (i32.const 0) (get_local 0x15f)) + (i64.store offset=0x160 align=1 (i32.const 0) (get_local 0x160)) + (i64.store offset=0x161 align=1 (i32.const 0) (get_local 0x161)) + (i64.store offset=0x162 align=1 (i32.const 0) (get_local 0x162)) + (i64.store offset=0x163 align=1 (i32.const 0) (get_local 0x163)) + (i64.store offset=0x164 align=1 (i32.const 0) (get_local 0x164)) + (i64.store offset=0x165 align=1 (i32.const 0) (get_local 0x165)) + (i64.store offset=0x166 align=1 (i32.const 0) (get_local 0x166)) + (i64.store offset=0x167 align=1 (i32.const 0) (get_local 0x167)) + (i64.store offset=0x168 align=1 (i32.const 0) (get_local 0x168)) + (i64.store offset=0x169 align=1 (i32.const 0) (get_local 0x169)) + (i64.store offset=0x16a align=1 (i32.const 0) (get_local 0x16a)) + (i64.store offset=0x16b align=1 (i32.const 0) (get_local 0x16b)) + (i64.store offset=0x16c align=1 (i32.const 0) (get_local 0x16c)) + (i64.store offset=0x16d align=1 (i32.const 0) (get_local 0x16d)) + (i64.store offset=0x16e align=1 (i32.const 0) (get_local 0x16e)) + (i64.store offset=0x16f align=1 (i32.const 0) (get_local 0x16f)) + (i64.store offset=0x170 align=1 (i32.const 0) (get_local 0x170)) + (i64.store offset=0x171 align=1 (i32.const 0) (get_local 0x171)) + (i64.store offset=0x172 align=1 (i32.const 0) (get_local 0x172)) + (i64.store offset=0x173 align=1 (i32.const 0) (get_local 0x173)) + (i64.store offset=0x174 align=1 (i32.const 0) (get_local 0x174)) + (i64.store offset=0x175 align=1 (i32.const 0) (get_local 0x175)) + (i64.store offset=0x176 align=1 (i32.const 0) (get_local 0x176)) + (i64.store offset=0x177 align=1 (i32.const 0) (get_local 0x177)) + (i64.store offset=0x178 align=1 (i32.const 0) (get_local 0x178)) + (i64.store offset=0x179 align=1 (i32.const 0) (get_local 0x179)) + (i64.store offset=0x17a align=1 (i32.const 0) (get_local 0x17a)) + (i64.store offset=0x17b align=1 (i32.const 0) (get_local 0x17b)) + (i64.store offset=0x17c align=1 (i32.const 0) (get_local 0x17c)) + (i64.store offset=0x17d align=1 (i32.const 0) (get_local 0x17d)) + (i64.store offset=0x17e align=1 (i32.const 0) (get_local 0x17e)) + (i64.store offset=0x17f align=1 (i32.const 0) (get_local 0x17f)) + (i64.store offset=0x180 align=1 (i32.const 0) (get_local 0x180)) + (i64.store offset=0x181 align=1 (i32.const 0) (get_local 0x181)) + (i64.store offset=0x182 align=1 (i32.const 0) (get_local 0x182)) + (i64.store offset=0x183 align=1 (i32.const 0) (get_local 0x183)) + (i64.store offset=0x184 align=1 (i32.const 0) (get_local 0x184)) + (i64.store offset=0x185 align=1 (i32.const 0) (get_local 0x185)) + (i64.store offset=0x186 align=1 (i32.const 0) (get_local 0x186)) + (i64.store offset=0x187 align=1 (i32.const 0) (get_local 0x187)) + (i64.store offset=0x188 align=1 (i32.const 0) (get_local 0x188)) + (i64.store offset=0x189 align=1 (i32.const 0) (get_local 0x189)) + (i64.store offset=0x18a align=1 (i32.const 0) (get_local 0x18a)) + (i64.store offset=0x18b align=1 (i32.const 0) (get_local 0x18b)) + (i64.store offset=0x18c align=1 (i32.const 0) (get_local 0x18c)) + (i64.store offset=0x18d align=1 (i32.const 0) (get_local 0x18d)) + (i64.store offset=0x18e align=1 (i32.const 0) (get_local 0x18e)) + (i64.store offset=0x18f align=1 (i32.const 0) (get_local 0x18f)) + (i64.store offset=0x190 align=1 (i32.const 0) (get_local 0x190)) + (i64.store offset=0x191 align=1 (i32.const 0) (get_local 0x191)) + (i64.store offset=0x192 align=1 (i32.const 0) (get_local 0x192)) + (i64.store offset=0x193 align=1 (i32.const 0) (get_local 0x193)) + (i64.store offset=0x194 align=1 (i32.const 0) (get_local 0x194)) + (i64.store offset=0x195 align=1 (i32.const 0) (get_local 0x195)) + (i64.store offset=0x196 align=1 (i32.const 0) (get_local 0x196)) + (i64.store offset=0x197 align=1 (i32.const 0) (get_local 0x197)) + (i64.store offset=0x198 align=1 (i32.const 0) (get_local 0x198)) + (i64.store offset=0x199 align=1 (i32.const 0) (get_local 0x199)) + (i64.store offset=0x19a align=1 (i32.const 0) (get_local 0x19a)) + (i64.store offset=0x19b align=1 (i32.const 0) (get_local 0x19b)) + (i64.store offset=0x19c align=1 (i32.const 0) (get_local 0x19c)) + (i64.store offset=0x19d align=1 (i32.const 0) (get_local 0x19d)) + (i64.store offset=0x19e align=1 (i32.const 0) (get_local 0x19e)) + (i64.store offset=0x19f align=1 (i32.const 0) (get_local 0x19f)) + (i64.store offset=0x1a0 align=1 (i32.const 0) (get_local 0x1a0)) + (i64.store offset=0x1a1 align=1 (i32.const 0) (get_local 0x1a1)) + (i64.store offset=0x1a2 align=1 (i32.const 0) (get_local 0x1a2)) + (i64.store offset=0x1a3 align=1 (i32.const 0) (get_local 0x1a3)) + (i64.store offset=0x1a4 align=1 (i32.const 0) (get_local 0x1a4)) + (i64.store offset=0x1a5 align=1 (i32.const 0) (get_local 0x1a5)) + (i64.store offset=0x1a6 align=1 (i32.const 0) (get_local 0x1a6)) + (i64.store offset=0x1a7 align=1 (i32.const 0) (get_local 0x1a7)) + (i64.store offset=0x1a8 align=1 (i32.const 0) (get_local 0x1a8)) + (i64.store offset=0x1a9 align=1 (i32.const 0) (get_local 0x1a9)) + (i64.store offset=0x1aa align=1 (i32.const 0) (get_local 0x1aa)) + (i64.store offset=0x1ab align=1 (i32.const 0) (get_local 0x1ab)) + (i64.store offset=0x1ac align=1 (i32.const 0) (get_local 0x1ac)) + (i64.store offset=0x1ad align=1 (i32.const 0) (get_local 0x1ad)) + (i64.store offset=0x1ae align=1 (i32.const 0) (get_local 0x1ae)) + (i64.store offset=0x1af align=1 (i32.const 0) (get_local 0x1af)) + (i64.store offset=0x1b0 align=1 (i32.const 0) (get_local 0x1b0)) + (i64.store offset=0x1b1 align=1 (i32.const 0) (get_local 0x1b1)) + (i64.store offset=0x1b2 align=1 (i32.const 0) (get_local 0x1b2)) + (i64.store offset=0x1b3 align=1 (i32.const 0) (get_local 0x1b3)) + (i64.store offset=0x1b4 align=1 (i32.const 0) (get_local 0x1b4)) + (i64.store offset=0x1b5 align=1 (i32.const 0) (get_local 0x1b5)) + (i64.store offset=0x1b6 align=1 (i32.const 0) (get_local 0x1b6)) + (i64.store offset=0x1b7 align=1 (i32.const 0) (get_local 0x1b7)) + (i64.store offset=0x1b8 align=1 (i32.const 0) (get_local 0x1b8)) + (i64.store offset=0x1b9 align=1 (i32.const 0) (get_local 0x1b9)) + (i64.store offset=0x1ba align=1 (i32.const 0) (get_local 0x1ba)) + (i64.store offset=0x1bb align=1 (i32.const 0) (get_local 0x1bb)) + (i64.store offset=0x1bc align=1 (i32.const 0) (get_local 0x1bc)) + (i64.store offset=0x1bd align=1 (i32.const 0) (get_local 0x1bd)) + (i64.store offset=0x1be align=1 (i32.const 0) (get_local 0x1be)) + (i64.store offset=0x1bf align=1 (i32.const 0) (get_local 0x1bf)) + (i64.store offset=0x1c0 align=1 (i32.const 0) (get_local 0x1c0)) + (i64.store offset=0x1c1 align=1 (i32.const 0) (get_local 0x1c1)) + (i64.store offset=0x1c2 align=1 (i32.const 0) (get_local 0x1c2)) + (i64.store offset=0x1c3 align=1 (i32.const 0) (get_local 0x1c3)) + (i64.store offset=0x1c4 align=1 (i32.const 0) (get_local 0x1c4)) + (i64.store offset=0x1c5 align=1 (i32.const 0) (get_local 0x1c5)) + (i64.store offset=0x1c6 align=1 (i32.const 0) (get_local 0x1c6)) + (i64.store offset=0x1c7 align=1 (i32.const 0) (get_local 0x1c7)) + (i64.store offset=0x1c8 align=1 (i32.const 0) (get_local 0x1c8)) + (i64.store offset=0x1c9 align=1 (i32.const 0) (get_local 0x1c9)) + (i64.store offset=0x1ca align=1 (i32.const 0) (get_local 0x1ca)) + (i64.store offset=0x1cb align=1 (i32.const 0) (get_local 0x1cb)) + (i64.store offset=0x1cc align=1 (i32.const 0) (get_local 0x1cc)) + (i64.store offset=0x1cd align=1 (i32.const 0) (get_local 0x1cd)) + (i64.store offset=0x1ce align=1 (i32.const 0) (get_local 0x1ce)) + (i64.store offset=0x1cf align=1 (i32.const 0) (get_local 0x1cf)) + (i64.store offset=0x1d0 align=1 (i32.const 0) (get_local 0x1d0)) + (i64.store offset=0x1d1 align=1 (i32.const 0) (get_local 0x1d1)) + (i64.store offset=0x1d2 align=1 (i32.const 0) (get_local 0x1d2)) + (i64.store offset=0x1d3 align=1 (i32.const 0) (get_local 0x1d3)) + (i64.store offset=0x1d4 align=1 (i32.const 0) (get_local 0x1d4)) + (i64.store offset=0x1d5 align=1 (i32.const 0) (get_local 0x1d5)) + (i64.store offset=0x1d6 align=1 (i32.const 0) (get_local 0x1d6)) + (i64.store offset=0x1d7 align=1 (i32.const 0) (get_local 0x1d7)) + (i64.store offset=0x1d8 align=1 (i32.const 0) (get_local 0x1d8)) + (i64.store offset=0x1d9 align=1 (i32.const 0) (get_local 0x1d9)) + (i64.store offset=0x1da align=1 (i32.const 0) (get_local 0x1da)) + (i64.store offset=0x1db align=1 (i32.const 0) (get_local 0x1db)) + (i64.store offset=0x1dc align=1 (i32.const 0) (get_local 0x1dc)) + (i64.store offset=0x1dd align=1 (i32.const 0) (get_local 0x1dd)) + (i64.store offset=0x1de align=1 (i32.const 0) (get_local 0x1de)) + (i64.store offset=0x1df align=1 (i32.const 0) (get_local 0x1df)) + (i64.store offset=0x1e0 align=1 (i32.const 0) (get_local 0x1e0)) + (i64.store offset=0x1e1 align=1 (i32.const 0) (get_local 0x1e1)) + (i64.store offset=0x1e2 align=1 (i32.const 0) (get_local 0x1e2)) + (i64.store offset=0x1e3 align=1 (i32.const 0) (get_local 0x1e3)) + (i64.store offset=0x1e4 align=1 (i32.const 0) (get_local 0x1e4)) + (i64.store offset=0x1e5 align=1 (i32.const 0) (get_local 0x1e5)) + (i64.store offset=0x1e6 align=1 (i32.const 0) (get_local 0x1e6)) + (i64.store offset=0x1e7 align=1 (i32.const 0) (get_local 0x1e7)) + (i64.store offset=0x1e8 align=1 (i32.const 0) (get_local 0x1e8)) + (i64.store offset=0x1e9 align=1 (i32.const 0) (get_local 0x1e9)) + (i64.store offset=0x1ea align=1 (i32.const 0) (get_local 0x1ea)) + (i64.store offset=0x1eb align=1 (i32.const 0) (get_local 0x1eb)) + (i64.store offset=0x1ec align=1 (i32.const 0) (get_local 0x1ec)) + (i64.store offset=0x1ed align=1 (i32.const 0) (get_local 0x1ed)) + (i64.store offset=0x1ee align=1 (i32.const 0) (get_local 0x1ee)) + (i64.store offset=0x1ef align=1 (i32.const 0) (get_local 0x1ef)) + (i64.store offset=0x1f0 align=1 (i32.const 0) (get_local 0x1f0)) + (i64.store offset=0x1f1 align=1 (i32.const 0) (get_local 0x1f1)) + (i64.store offset=0x1f2 align=1 (i32.const 0) (get_local 0x1f2)) + (i64.store offset=0x1f3 align=1 (i32.const 0) (get_local 0x1f3)) + (i64.store offset=0x1f4 align=1 (i32.const 0) (get_local 0x1f4)) + (i64.store offset=0x1f5 align=1 (i32.const 0) (get_local 0x1f5)) + (i64.store offset=0x1f6 align=1 (i32.const 0) (get_local 0x1f6)) + (i64.store offset=0x1f7 align=1 (i32.const 0) (get_local 0x1f7)) + (i64.store offset=0x1f8 align=1 (i32.const 0) (get_local 0x1f8)) + (i64.store offset=0x1f9 align=1 (i32.const 0) (get_local 0x1f9)) + (i64.store offset=0x1fa align=1 (i32.const 0) (get_local 0x1fa)) + (i64.store offset=0x1fb align=1 (i32.const 0) (get_local 0x1fb)) + (i64.store offset=0x1fc align=1 (i32.const 0) (get_local 0x1fc)) + (i64.store offset=0x1fd align=1 (i32.const 0) (get_local 0x1fd)) + (i64.store offset=0x1fe align=1 (i32.const 0) (get_local 0x1fe)) + (i64.store offset=0x1ff align=1 (i32.const 0) (get_local 0x1ff)) + (i64.store offset=0x200 align=1 (i32.const 0) (get_local 0x200)) + (i64.store offset=0x201 align=1 (i32.const 0) (get_local 0x201)) + (i64.store offset=0x202 align=1 (i32.const 0) (get_local 0x202)) + (i64.store offset=0x203 align=1 (i32.const 0) (get_local 0x203)) + (i64.store offset=0x204 align=1 (i32.const 0) (get_local 0x204)) + (i64.store offset=0x205 align=1 (i32.const 0) (get_local 0x205)) + (i64.store offset=0x206 align=1 (i32.const 0) (get_local 0x206)) + (i64.store offset=0x207 align=1 (i32.const 0) (get_local 0x207)) + (i64.store offset=0x208 align=1 (i32.const 0) (get_local 0x208)) + (i64.store offset=0x209 align=1 (i32.const 0) (get_local 0x209)) + (i64.store offset=0x20a align=1 (i32.const 0) (get_local 0x20a)) + (i64.store offset=0x20b align=1 (i32.const 0) (get_local 0x20b)) + (i64.store offset=0x20c align=1 (i32.const 0) (get_local 0x20c)) + (i64.store offset=0x20d align=1 (i32.const 0) (get_local 0x20d)) + (i64.store offset=0x20e align=1 (i32.const 0) (get_local 0x20e)) + (i64.store offset=0x20f align=1 (i32.const 0) (get_local 0x20f)) + (i64.store offset=0x210 align=1 (i32.const 0) (get_local 0x210)) + (i64.store offset=0x211 align=1 (i32.const 0) (get_local 0x211)) + (i64.store offset=0x212 align=1 (i32.const 0) (get_local 0x212)) + (i64.store offset=0x213 align=1 (i32.const 0) (get_local 0x213)) + (i64.store offset=0x214 align=1 (i32.const 0) (get_local 0x214)) + (i64.store offset=0x215 align=1 (i32.const 0) (get_local 0x215)) + (i64.store offset=0x216 align=1 (i32.const 0) (get_local 0x216)) + (i64.store offset=0x217 align=1 (i32.const 0) (get_local 0x217)) + (i64.store offset=0x218 align=1 (i32.const 0) (get_local 0x218)) + (i64.store offset=0x219 align=1 (i32.const 0) (get_local 0x219)) + (i64.store offset=0x21a align=1 (i32.const 0) (get_local 0x21a)) + (i64.store offset=0x21b align=1 (i32.const 0) (get_local 0x21b)) + (i64.store offset=0x21c align=1 (i32.const 0) (get_local 0x21c)) + (i64.store offset=0x21d align=1 (i32.const 0) (get_local 0x21d)) + (i64.store offset=0x21e align=1 (i32.const 0) (get_local 0x21e)) + (i64.store offset=0x21f align=1 (i32.const 0) (get_local 0x21f)) + (i64.store offset=0x220 align=1 (i32.const 0) (get_local 0x220)) + (i64.store offset=0x221 align=1 (i32.const 0) (get_local 0x221)) + (i64.store offset=0x222 align=1 (i32.const 0) (get_local 0x222)) + (i64.store offset=0x223 align=1 (i32.const 0) (get_local 0x223)) + (i64.store offset=0x224 align=1 (i32.const 0) (get_local 0x224)) + (i64.store offset=0x225 align=1 (i32.const 0) (get_local 0x225)) + (i64.store offset=0x226 align=1 (i32.const 0) (get_local 0x226)) + (i64.store offset=0x227 align=1 (i32.const 0) (get_local 0x227)) + (i64.store offset=0x228 align=1 (i32.const 0) (get_local 0x228)) + (i64.store offset=0x229 align=1 (i32.const 0) (get_local 0x229)) + (i64.store offset=0x22a align=1 (i32.const 0) (get_local 0x22a)) + (i64.store offset=0x22b align=1 (i32.const 0) (get_local 0x22b)) + (i64.store offset=0x22c align=1 (i32.const 0) (get_local 0x22c)) + (i64.store offset=0x22d align=1 (i32.const 0) (get_local 0x22d)) + (i64.store offset=0x22e align=1 (i32.const 0) (get_local 0x22e)) + (i64.store offset=0x22f align=1 (i32.const 0) (get_local 0x22f)) + (i64.store offset=0x230 align=1 (i32.const 0) (get_local 0x230)) + (i64.store offset=0x231 align=1 (i32.const 0) (get_local 0x231)) + (i64.store offset=0x232 align=1 (i32.const 0) (get_local 0x232)) + (i64.store offset=0x233 align=1 (i32.const 0) (get_local 0x233)) + (i64.store offset=0x234 align=1 (i32.const 0) (get_local 0x234)) + (i64.store offset=0x235 align=1 (i32.const 0) (get_local 0x235)) + (i64.store offset=0x236 align=1 (i32.const 0) (get_local 0x236)) + (i64.store offset=0x237 align=1 (i32.const 0) (get_local 0x237)) + (i64.store offset=0x238 align=1 (i32.const 0) (get_local 0x238)) + (i64.store offset=0x239 align=1 (i32.const 0) (get_local 0x239)) + (i64.store offset=0x23a align=1 (i32.const 0) (get_local 0x23a)) + (i64.store offset=0x23b align=1 (i32.const 0) (get_local 0x23b)) + (i64.store offset=0x23c align=1 (i32.const 0) (get_local 0x23c)) + (i64.store offset=0x23d align=1 (i32.const 0) (get_local 0x23d)) + (i64.store offset=0x23e align=1 (i32.const 0) (get_local 0x23e)) + (i64.store offset=0x23f align=1 (i32.const 0) (get_local 0x23f)) + (i64.store offset=0x240 align=1 (i32.const 0) (get_local 0x240)) + (i64.store offset=0x241 align=1 (i32.const 0) (get_local 0x241)) + (i64.store offset=0x242 align=1 (i32.const 0) (get_local 0x242)) + (i64.store offset=0x243 align=1 (i32.const 0) (get_local 0x243)) + (i64.store offset=0x244 align=1 (i32.const 0) (get_local 0x244)) + (i64.store offset=0x245 align=1 (i32.const 0) (get_local 0x245)) + (i64.store offset=0x246 align=1 (i32.const 0) (get_local 0x246)) + (i64.store offset=0x247 align=1 (i32.const 0) (get_local 0x247)) + (i64.store offset=0x248 align=1 (i32.const 0) (get_local 0x248)) + (i64.store offset=0x249 align=1 (i32.const 0) (get_local 0x249)) + (i64.store offset=0x24a align=1 (i32.const 0) (get_local 0x24a)) + (i64.store offset=0x24b align=1 (i32.const 0) (get_local 0x24b)) + (i64.store offset=0x24c align=1 (i32.const 0) (get_local 0x24c)) + (i64.store offset=0x24d align=1 (i32.const 0) (get_local 0x24d)) + (i64.store offset=0x24e align=1 (i32.const 0) (get_local 0x24e)) + (i64.store offset=0x24f align=1 (i32.const 0) (get_local 0x24f)) + (i64.store offset=0x250 align=1 (i32.const 0) (get_local 0x250)) + (i64.store offset=0x251 align=1 (i32.const 0) (get_local 0x251)) + (i64.store offset=0x252 align=1 (i32.const 0) (get_local 0x252)) + (i64.store offset=0x253 align=1 (i32.const 0) (get_local 0x253)) + (i64.store offset=0x254 align=1 (i32.const 0) (get_local 0x254)) + (i64.store offset=0x255 align=1 (i32.const 0) (get_local 0x255)) + (i64.store offset=0x256 align=1 (i32.const 0) (get_local 0x256)) + (i64.store offset=0x257 align=1 (i32.const 0) (get_local 0x257)) + (i64.store offset=0x258 align=1 (i32.const 0) (get_local 0x258)) + (i64.store offset=0x259 align=1 (i32.const 0) (get_local 0x259)) + (i64.store offset=0x25a align=1 (i32.const 0) (get_local 0x25a)) + (i64.store offset=0x25b align=1 (i32.const 0) (get_local 0x25b)) + (i64.store offset=0x25c align=1 (i32.const 0) (get_local 0x25c)) + (i64.store offset=0x25d align=1 (i32.const 0) (get_local 0x25d)) + (i64.store offset=0x25e align=1 (i32.const 0) (get_local 0x25e)) + (i64.store offset=0x25f align=1 (i32.const 0) (get_local 0x25f)) + (i64.store offset=0x260 align=1 (i32.const 0) (get_local 0x260)) + (i64.store offset=0x261 align=1 (i32.const 0) (get_local 0x261)) + (i64.store offset=0x262 align=1 (i32.const 0) (get_local 0x262)) + (i64.store offset=0x263 align=1 (i32.const 0) (get_local 0x263)) + (i64.store offset=0x264 align=1 (i32.const 0) (get_local 0x264)) + (i64.store offset=0x265 align=1 (i32.const 0) (get_local 0x265)) + (i64.store offset=0x266 align=1 (i32.const 0) (get_local 0x266)) + (i64.store offset=0x267 align=1 (i32.const 0) (get_local 0x267)) + (i64.store offset=0x268 align=1 (i32.const 0) (get_local 0x268)) + (i64.store offset=0x269 align=1 (i32.const 0) (get_local 0x269)) + (i64.store offset=0x26a align=1 (i32.const 0) (get_local 0x26a)) + (i64.store offset=0x26b align=1 (i32.const 0) (get_local 0x26b)) + (i64.store offset=0x26c align=1 (i32.const 0) (get_local 0x26c)) + (i64.store offset=0x26d align=1 (i32.const 0) (get_local 0x26d)) + (i64.store offset=0x26e align=1 (i32.const 0) (get_local 0x26e)) + (i64.store offset=0x26f align=1 (i32.const 0) (get_local 0x26f)) + (i64.store offset=0x270 align=1 (i32.const 0) (get_local 0x270)) + (i64.store offset=0x271 align=1 (i32.const 0) (get_local 0x271)) + (i64.store offset=0x272 align=1 (i32.const 0) (get_local 0x272)) + (i64.store offset=0x273 align=1 (i32.const 0) (get_local 0x273)) + (i64.store offset=0x274 align=1 (i32.const 0) (get_local 0x274)) + (i64.store offset=0x275 align=1 (i32.const 0) (get_local 0x275)) + (i64.store offset=0x276 align=1 (i32.const 0) (get_local 0x276)) + (i64.store offset=0x277 align=1 (i32.const 0) (get_local 0x277)) + (i64.store offset=0x278 align=1 (i32.const 0) (get_local 0x278)) + (i64.store offset=0x279 align=1 (i32.const 0) (get_local 0x279)) + (i64.store offset=0x27a align=1 (i32.const 0) (get_local 0x27a)) + (i64.store offset=0x27b align=1 (i32.const 0) (get_local 0x27b)) + (i64.store offset=0x27c align=1 (i32.const 0) (get_local 0x27c)) + (i64.store offset=0x27d align=1 (i32.const 0) (get_local 0x27d)) + (i64.store offset=0x27e align=1 (i32.const 0) (get_local 0x27e)) + (i64.store offset=0x27f align=1 (i32.const 0) (get_local 0x27f)) + (i64.store offset=0x280 align=1 (i32.const 0) (get_local 0x280)) + (i64.store offset=0x281 align=1 (i32.const 0) (get_local 0x281)) + (i64.store offset=0x282 align=1 (i32.const 0) (get_local 0x282)) + (i64.store offset=0x283 align=1 (i32.const 0) (get_local 0x283)) + (i64.store offset=0x284 align=1 (i32.const 0) (get_local 0x284)) + (i64.store offset=0x285 align=1 (i32.const 0) (get_local 0x285)) + (i64.store offset=0x286 align=1 (i32.const 0) (get_local 0x286)) + (i64.store offset=0x287 align=1 (i32.const 0) (get_local 0x287)) + (i64.store offset=0x288 align=1 (i32.const 0) (get_local 0x288)) + (i64.store offset=0x289 align=1 (i32.const 0) (get_local 0x289)) + (i64.store offset=0x28a align=1 (i32.const 0) (get_local 0x28a)) + (i64.store offset=0x28b align=1 (i32.const 0) (get_local 0x28b)) + (i64.store offset=0x28c align=1 (i32.const 0) (get_local 0x28c)) + (i64.store offset=0x28d align=1 (i32.const 0) (get_local 0x28d)) + (i64.store offset=0x28e align=1 (i32.const 0) (get_local 0x28e)) + (i64.store offset=0x28f align=1 (i32.const 0) (get_local 0x28f)) + (i64.store offset=0x290 align=1 (i32.const 0) (get_local 0x290)) + (i64.store offset=0x291 align=1 (i32.const 0) (get_local 0x291)) + (i64.store offset=0x292 align=1 (i32.const 0) (get_local 0x292)) + (i64.store offset=0x293 align=1 (i32.const 0) (get_local 0x293)) + (i64.store offset=0x294 align=1 (i32.const 0) (get_local 0x294)) + (i64.store offset=0x295 align=1 (i32.const 0) (get_local 0x295)) + (i64.store offset=0x296 align=1 (i32.const 0) (get_local 0x296)) + (i64.store offset=0x297 align=1 (i32.const 0) (get_local 0x297)) + (i64.store offset=0x298 align=1 (i32.const 0) (get_local 0x298)) + (i64.store offset=0x299 align=1 (i32.const 0) (get_local 0x299)) + (i64.store offset=0x29a align=1 (i32.const 0) (get_local 0x29a)) + (i64.store offset=0x29b align=1 (i32.const 0) (get_local 0x29b)) + (i64.store offset=0x29c align=1 (i32.const 0) (get_local 0x29c)) + (i64.store offset=0x29d align=1 (i32.const 0) (get_local 0x29d)) + (i64.store offset=0x29e align=1 (i32.const 0) (get_local 0x29e)) + (i64.store offset=0x29f align=1 (i32.const 0) (get_local 0x29f)) + (i64.store offset=0x2a0 align=1 (i32.const 0) (get_local 0x2a0)) + (i64.store offset=0x2a1 align=1 (i32.const 0) (get_local 0x2a1)) + (i64.store offset=0x2a2 align=1 (i32.const 0) (get_local 0x2a2)) + (i64.store offset=0x2a3 align=1 (i32.const 0) (get_local 0x2a3)) + (i64.store offset=0x2a4 align=1 (i32.const 0) (get_local 0x2a4)) + (i64.store offset=0x2a5 align=1 (i32.const 0) (get_local 0x2a5)) + (i64.store offset=0x2a6 align=1 (i32.const 0) (get_local 0x2a6)) + (i64.store offset=0x2a7 align=1 (i32.const 0) (get_local 0x2a7)) + (i64.store offset=0x2a8 align=1 (i32.const 0) (get_local 0x2a8)) + (i64.store offset=0x2a9 align=1 (i32.const 0) (get_local 0x2a9)) + (i64.store offset=0x2aa align=1 (i32.const 0) (get_local 0x2aa)) + (i64.store offset=0x2ab align=1 (i32.const 0) (get_local 0x2ab)) + (i64.store offset=0x2ac align=1 (i32.const 0) (get_local 0x2ac)) + (i64.store offset=0x2ad align=1 (i32.const 0) (get_local 0x2ad)) + (i64.store offset=0x2ae align=1 (i32.const 0) (get_local 0x2ae)) + (i64.store offset=0x2af align=1 (i32.const 0) (get_local 0x2af)) + (i64.store offset=0x2b0 align=1 (i32.const 0) (get_local 0x2b0)) + (i64.store offset=0x2b1 align=1 (i32.const 0) (get_local 0x2b1)) + (i64.store offset=0x2b2 align=1 (i32.const 0) (get_local 0x2b2)) + (i64.store offset=0x2b3 align=1 (i32.const 0) (get_local 0x2b3)) + (i64.store offset=0x2b4 align=1 (i32.const 0) (get_local 0x2b4)) + (i64.store offset=0x2b5 align=1 (i32.const 0) (get_local 0x2b5)) + (i64.store offset=0x2b6 align=1 (i32.const 0) (get_local 0x2b6)) + (i64.store offset=0x2b7 align=1 (i32.const 0) (get_local 0x2b7)) + (i64.store offset=0x2b8 align=1 (i32.const 0) (get_local 0x2b8)) + (i64.store offset=0x2b9 align=1 (i32.const 0) (get_local 0x2b9)) + (i64.store offset=0x2ba align=1 (i32.const 0) (get_local 0x2ba)) + (i64.store offset=0x2bb align=1 (i32.const 0) (get_local 0x2bb)) + (i64.store offset=0x2bc align=1 (i32.const 0) (get_local 0x2bc)) + (i64.store offset=0x2bd align=1 (i32.const 0) (get_local 0x2bd)) + (i64.store offset=0x2be align=1 (i32.const 0) (get_local 0x2be)) + (i64.store offset=0x2bf align=1 (i32.const 0) (get_local 0x2bf)) + (i64.store offset=0x2c0 align=1 (i32.const 0) (get_local 0x2c0)) + (i64.store offset=0x2c1 align=1 (i32.const 0) (get_local 0x2c1)) + (i64.store offset=0x2c2 align=1 (i32.const 0) (get_local 0x2c2)) + (i64.store offset=0x2c3 align=1 (i32.const 0) (get_local 0x2c3)) + (i64.store offset=0x2c4 align=1 (i32.const 0) (get_local 0x2c4)) + (i64.store offset=0x2c5 align=1 (i32.const 0) (get_local 0x2c5)) + (i64.store offset=0x2c6 align=1 (i32.const 0) (get_local 0x2c6)) + (i64.store offset=0x2c7 align=1 (i32.const 0) (get_local 0x2c7)) + (i64.store offset=0x2c8 align=1 (i32.const 0) (get_local 0x2c8)) + (i64.store offset=0x2c9 align=1 (i32.const 0) (get_local 0x2c9)) + (i64.store offset=0x2ca align=1 (i32.const 0) (get_local 0x2ca)) + (i64.store offset=0x2cb align=1 (i32.const 0) (get_local 0x2cb)) + (i64.store offset=0x2cc align=1 (i32.const 0) (get_local 0x2cc)) + (i64.store offset=0x2cd align=1 (i32.const 0) (get_local 0x2cd)) + (i64.store offset=0x2ce align=1 (i32.const 0) (get_local 0x2ce)) + (i64.store offset=0x2cf align=1 (i32.const 0) (get_local 0x2cf)) + (i64.store offset=0x2d0 align=1 (i32.const 0) (get_local 0x2d0)) + (i64.store offset=0x2d1 align=1 (i32.const 0) (get_local 0x2d1)) + (i64.store offset=0x2d2 align=1 (i32.const 0) (get_local 0x2d2)) + (i64.store offset=0x2d3 align=1 (i32.const 0) (get_local 0x2d3)) + (i64.store offset=0x2d4 align=1 (i32.const 0) (get_local 0x2d4)) + (i64.store offset=0x2d5 align=1 (i32.const 0) (get_local 0x2d5)) + (i64.store offset=0x2d6 align=1 (i32.const 0) (get_local 0x2d6)) + (i64.store offset=0x2d7 align=1 (i32.const 0) (get_local 0x2d7)) + (i64.store offset=0x2d8 align=1 (i32.const 0) (get_local 0x2d8)) + (i64.store offset=0x2d9 align=1 (i32.const 0) (get_local 0x2d9)) + (i64.store offset=0x2da align=1 (i32.const 0) (get_local 0x2da)) + (i64.store offset=0x2db align=1 (i32.const 0) (get_local 0x2db)) + (i64.store offset=0x2dc align=1 (i32.const 0) (get_local 0x2dc)) + (i64.store offset=0x2dd align=1 (i32.const 0) (get_local 0x2dd)) + (i64.store offset=0x2de align=1 (i32.const 0) (get_local 0x2de)) + (i64.store offset=0x2df align=1 (i32.const 0) (get_local 0x2df)) + (i64.store offset=0x2e0 align=1 (i32.const 0) (get_local 0x2e0)) + (i64.store offset=0x2e1 align=1 (i32.const 0) (get_local 0x2e1)) + (i64.store offset=0x2e2 align=1 (i32.const 0) (get_local 0x2e2)) + (i64.store offset=0x2e3 align=1 (i32.const 0) (get_local 0x2e3)) + (i64.store offset=0x2e4 align=1 (i32.const 0) (get_local 0x2e4)) + (i64.store offset=0x2e5 align=1 (i32.const 0) (get_local 0x2e5)) + (i64.store offset=0x2e6 align=1 (i32.const 0) (get_local 0x2e6)) + (i64.store offset=0x2e7 align=1 (i32.const 0) (get_local 0x2e7)) + (i64.store offset=0x2e8 align=1 (i32.const 0) (get_local 0x2e8)) + (i64.store offset=0x2e9 align=1 (i32.const 0) (get_local 0x2e9)) + (i64.store offset=0x2ea align=1 (i32.const 0) (get_local 0x2ea)) + (i64.store offset=0x2eb align=1 (i32.const 0) (get_local 0x2eb)) + (i64.store offset=0x2ec align=1 (i32.const 0) (get_local 0x2ec)) + (i64.store offset=0x2ed align=1 (i32.const 0) (get_local 0x2ed)) + (i64.store offset=0x2ee align=1 (i32.const 0) (get_local 0x2ee)) + (i64.store offset=0x2ef align=1 (i32.const 0) (get_local 0x2ef)) + (i64.store offset=0x2f0 align=1 (i32.const 0) (get_local 0x2f0)) + (i64.store offset=0x2f1 align=1 (i32.const 0) (get_local 0x2f1)) + (i64.store offset=0x2f2 align=1 (i32.const 0) (get_local 0x2f2)) + (i64.store offset=0x2f3 align=1 (i32.const 0) (get_local 0x2f3)) + (i64.store offset=0x2f4 align=1 (i32.const 0) (get_local 0x2f4)) + (i64.store offset=0x2f5 align=1 (i32.const 0) (get_local 0x2f5)) + (i64.store offset=0x2f6 align=1 (i32.const 0) (get_local 0x2f6)) + (i64.store offset=0x2f7 align=1 (i32.const 0) (get_local 0x2f7)) + (i64.store offset=0x2f8 align=1 (i32.const 0) (get_local 0x2f8)) + (i64.store offset=0x2f9 align=1 (i32.const 0) (get_local 0x2f9)) + (i64.store offset=0x2fa align=1 (i32.const 0) (get_local 0x2fa)) + (i64.store offset=0x2fb align=1 (i32.const 0) (get_local 0x2fb)) + (i64.store offset=0x2fc align=1 (i32.const 0) (get_local 0x2fc)) + (i64.store offset=0x2fd align=1 (i32.const 0) (get_local 0x2fd)) + (i64.store offset=0x2fe align=1 (i32.const 0) (get_local 0x2fe)) + (i64.store offset=0x2ff align=1 (i32.const 0) (get_local 0x2ff)) + (i64.store offset=0x300 align=1 (i32.const 0) (get_local 0x300)) + (i64.store offset=0x301 align=1 (i32.const 0) (get_local 0x301)) + (i64.store offset=0x302 align=1 (i32.const 0) (get_local 0x302)) + (i64.store offset=0x303 align=1 (i32.const 0) (get_local 0x303)) + (i64.store offset=0x304 align=1 (i32.const 0) (get_local 0x304)) + (i64.store offset=0x305 align=1 (i32.const 0) (get_local 0x305)) + (i64.store offset=0x306 align=1 (i32.const 0) (get_local 0x306)) + (i64.store offset=0x307 align=1 (i32.const 0) (get_local 0x307)) + (i64.store offset=0x308 align=1 (i32.const 0) (get_local 0x308)) + (i64.store offset=0x309 align=1 (i32.const 0) (get_local 0x309)) + (i64.store offset=0x30a align=1 (i32.const 0) (get_local 0x30a)) + (i64.store offset=0x30b align=1 (i32.const 0) (get_local 0x30b)) + (i64.store offset=0x30c align=1 (i32.const 0) (get_local 0x30c)) + (i64.store offset=0x30d align=1 (i32.const 0) (get_local 0x30d)) + (i64.store offset=0x30e align=1 (i32.const 0) (get_local 0x30e)) + (i64.store offset=0x30f align=1 (i32.const 0) (get_local 0x30f)) + (i64.store offset=0x310 align=1 (i32.const 0) (get_local 0x310)) + (i64.store offset=0x311 align=1 (i32.const 0) (get_local 0x311)) + (i64.store offset=0x312 align=1 (i32.const 0) (get_local 0x312)) + (i64.store offset=0x313 align=1 (i32.const 0) (get_local 0x313)) + (i64.store offset=0x314 align=1 (i32.const 0) (get_local 0x314)) + (i64.store offset=0x315 align=1 (i32.const 0) (get_local 0x315)) + (i64.store offset=0x316 align=1 (i32.const 0) (get_local 0x316)) + (i64.store offset=0x317 align=1 (i32.const 0) (get_local 0x317)) + (i64.store offset=0x318 align=1 (i32.const 0) (get_local 0x318)) + (i64.store offset=0x319 align=1 (i32.const 0) (get_local 0x319)) + (i64.store offset=0x31a align=1 (i32.const 0) (get_local 0x31a)) + (i64.store offset=0x31b align=1 (i32.const 0) (get_local 0x31b)) + (i64.store offset=0x31c align=1 (i32.const 0) (get_local 0x31c)) + (i64.store offset=0x31d align=1 (i32.const 0) (get_local 0x31d)) + (i64.store offset=0x31e align=1 (i32.const 0) (get_local 0x31e)) + (i64.store offset=0x31f align=1 (i32.const 0) (get_local 0x31f)) + (i64.store offset=0x320 align=1 (i32.const 0) (get_local 0x320)) + (i64.store offset=0x321 align=1 (i32.const 0) (get_local 0x321)) + (i64.store offset=0x322 align=1 (i32.const 0) (get_local 0x322)) + (i64.store offset=0x323 align=1 (i32.const 0) (get_local 0x323)) + (i64.store offset=0x324 align=1 (i32.const 0) (get_local 0x324)) + (i64.store offset=0x325 align=1 (i32.const 0) (get_local 0x325)) + (i64.store offset=0x326 align=1 (i32.const 0) (get_local 0x326)) + (i64.store offset=0x327 align=1 (i32.const 0) (get_local 0x327)) + (i64.store offset=0x328 align=1 (i32.const 0) (get_local 0x328)) + (i64.store offset=0x329 align=1 (i32.const 0) (get_local 0x329)) + (i64.store offset=0x32a align=1 (i32.const 0) (get_local 0x32a)) + (i64.store offset=0x32b align=1 (i32.const 0) (get_local 0x32b)) + (i64.store offset=0x32c align=1 (i32.const 0) (get_local 0x32c)) + (i64.store offset=0x32d align=1 (i32.const 0) (get_local 0x32d)) + (i64.store offset=0x32e align=1 (i32.const 0) (get_local 0x32e)) + (i64.store offset=0x32f align=1 (i32.const 0) (get_local 0x32f)) + (i64.store offset=0x330 align=1 (i32.const 0) (get_local 0x330)) + (i64.store offset=0x331 align=1 (i32.const 0) (get_local 0x331)) + (i64.store offset=0x332 align=1 (i32.const 0) (get_local 0x332)) + (i64.store offset=0x333 align=1 (i32.const 0) (get_local 0x333)) + (i64.store offset=0x334 align=1 (i32.const 0) (get_local 0x334)) + (i64.store offset=0x335 align=1 (i32.const 0) (get_local 0x335)) + (i64.store offset=0x336 align=1 (i32.const 0) (get_local 0x336)) + (i64.store offset=0x337 align=1 (i32.const 0) (get_local 0x337)) + (i64.store offset=0x338 align=1 (i32.const 0) (get_local 0x338)) + (i64.store offset=0x339 align=1 (i32.const 0) (get_local 0x339)) + (i64.store offset=0x33a align=1 (i32.const 0) (get_local 0x33a)) + (i64.store offset=0x33b align=1 (i32.const 0) (get_local 0x33b)) + (i64.store offset=0x33c align=1 (i32.const 0) (get_local 0x33c)) + (i64.store offset=0x33d align=1 (i32.const 0) (get_local 0x33d)) + (i64.store offset=0x33e align=1 (i32.const 0) (get_local 0x33e)) + (i64.store offset=0x33f align=1 (i32.const 0) (get_local 0x33f)) + (i64.store offset=0x340 align=1 (i32.const 0) (get_local 0x340)) + (i64.store offset=0x341 align=1 (i32.const 0) (get_local 0x341)) + (i64.store offset=0x342 align=1 (i32.const 0) (get_local 0x342)) + (i64.store offset=0x343 align=1 (i32.const 0) (get_local 0x343)) + (i64.store offset=0x344 align=1 (i32.const 0) (get_local 0x344)) + (i64.store offset=0x345 align=1 (i32.const 0) (get_local 0x345)) + (i64.store offset=0x346 align=1 (i32.const 0) (get_local 0x346)) + (i64.store offset=0x347 align=1 (i32.const 0) (get_local 0x347)) + (i64.store offset=0x348 align=1 (i32.const 0) (get_local 0x348)) + (i64.store offset=0x349 align=1 (i32.const 0) (get_local 0x349)) + (i64.store offset=0x34a align=1 (i32.const 0) (get_local 0x34a)) + (i64.store offset=0x34b align=1 (i32.const 0) (get_local 0x34b)) + (i64.store offset=0x34c align=1 (i32.const 0) (get_local 0x34c)) + (i64.store offset=0x34d align=1 (i32.const 0) (get_local 0x34d)) + (i64.store offset=0x34e align=1 (i32.const 0) (get_local 0x34e)) + (i64.store offset=0x34f align=1 (i32.const 0) (get_local 0x34f)) + (i64.store offset=0x350 align=1 (i32.const 0) (get_local 0x350)) + (i64.store offset=0x351 align=1 (i32.const 0) (get_local 0x351)) + (i64.store offset=0x352 align=1 (i32.const 0) (get_local 0x352)) + (i64.store offset=0x353 align=1 (i32.const 0) (get_local 0x353)) + (i64.store offset=0x354 align=1 (i32.const 0) (get_local 0x354)) + (i64.store offset=0x355 align=1 (i32.const 0) (get_local 0x355)) + (i64.store offset=0x356 align=1 (i32.const 0) (get_local 0x356)) + (i64.store offset=0x357 align=1 (i32.const 0) (get_local 0x357)) + (i64.store offset=0x358 align=1 (i32.const 0) (get_local 0x358)) + (i64.store offset=0x359 align=1 (i32.const 0) (get_local 0x359)) + (i64.store offset=0x35a align=1 (i32.const 0) (get_local 0x35a)) + (i64.store offset=0x35b align=1 (i32.const 0) (get_local 0x35b)) + (i64.store offset=0x35c align=1 (i32.const 0) (get_local 0x35c)) + (i64.store offset=0x35d align=1 (i32.const 0) (get_local 0x35d)) + (i64.store offset=0x35e align=1 (i32.const 0) (get_local 0x35e)) + (i64.store offset=0x35f align=1 (i32.const 0) (get_local 0x35f)) + (i64.store offset=0x360 align=1 (i32.const 0) (get_local 0x360)) + (i64.store offset=0x361 align=1 (i32.const 0) (get_local 0x361)) + (i64.store offset=0x362 align=1 (i32.const 0) (get_local 0x362)) + (i64.store offset=0x363 align=1 (i32.const 0) (get_local 0x363)) + (i64.store offset=0x364 align=1 (i32.const 0) (get_local 0x364)) + (i64.store offset=0x365 align=1 (i32.const 0) (get_local 0x365)) + (i64.store offset=0x366 align=1 (i32.const 0) (get_local 0x366)) + (i64.store offset=0x367 align=1 (i32.const 0) (get_local 0x367)) + (i64.store offset=0x368 align=1 (i32.const 0) (get_local 0x368)) + (i64.store offset=0x369 align=1 (i32.const 0) (get_local 0x369)) + (i64.store offset=0x36a align=1 (i32.const 0) (get_local 0x36a)) + (i64.store offset=0x36b align=1 (i32.const 0) (get_local 0x36b)) + (i64.store offset=0x36c align=1 (i32.const 0) (get_local 0x36c)) + (i64.store offset=0x36d align=1 (i32.const 0) (get_local 0x36d)) + (i64.store offset=0x36e align=1 (i32.const 0) (get_local 0x36e)) + (i64.store offset=0x36f align=1 (i32.const 0) (get_local 0x36f)) + (i64.store offset=0x370 align=1 (i32.const 0) (get_local 0x370)) + (i64.store offset=0x371 align=1 (i32.const 0) (get_local 0x371)) + (i64.store offset=0x372 align=1 (i32.const 0) (get_local 0x372)) + (i64.store offset=0x373 align=1 (i32.const 0) (get_local 0x373)) + (i64.store offset=0x374 align=1 (i32.const 0) (get_local 0x374)) + (i64.store offset=0x375 align=1 (i32.const 0) (get_local 0x375)) + (i64.store offset=0x376 align=1 (i32.const 0) (get_local 0x376)) + (i64.store offset=0x377 align=1 (i32.const 0) (get_local 0x377)) + (i64.store offset=0x378 align=1 (i32.const 0) (get_local 0x378)) + (i64.store offset=0x379 align=1 (i32.const 0) (get_local 0x379)) + (i64.store offset=0x37a align=1 (i32.const 0) (get_local 0x37a)) + (i64.store offset=0x37b align=1 (i32.const 0) (get_local 0x37b)) + (i64.store offset=0x37c align=1 (i32.const 0) (get_local 0x37c)) + (i64.store offset=0x37d align=1 (i32.const 0) (get_local 0x37d)) + (i64.store offset=0x37e align=1 (i32.const 0) (get_local 0x37e)) + (i64.store offset=0x37f align=1 (i32.const 0) (get_local 0x37f)) + (i64.store offset=0x380 align=1 (i32.const 0) (get_local 0x380)) + (i64.store offset=0x381 align=1 (i32.const 0) (get_local 0x381)) + (i64.store offset=0x382 align=1 (i32.const 0) (get_local 0x382)) + (i64.store offset=0x383 align=1 (i32.const 0) (get_local 0x383)) + (i64.store offset=0x384 align=1 (i32.const 0) (get_local 0x384)) + (i64.store offset=0x385 align=1 (i32.const 0) (get_local 0x385)) + (i64.store offset=0x386 align=1 (i32.const 0) (get_local 0x386)) + (i64.store offset=0x387 align=1 (i32.const 0) (get_local 0x387)) + (i64.store offset=0x388 align=1 (i32.const 0) (get_local 0x388)) + (i64.store offset=0x389 align=1 (i32.const 0) (get_local 0x389)) + (i64.store offset=0x38a align=1 (i32.const 0) (get_local 0x38a)) + (i64.store offset=0x38b align=1 (i32.const 0) (get_local 0x38b)) + (i64.store offset=0x38c align=1 (i32.const 0) (get_local 0x38c)) + (i64.store offset=0x38d align=1 (i32.const 0) (get_local 0x38d)) + (i64.store offset=0x38e align=1 (i32.const 0) (get_local 0x38e)) + (i64.store offset=0x38f align=1 (i32.const 0) (get_local 0x38f)) + (i64.store offset=0x390 align=1 (i32.const 0) (get_local 0x390)) + (i64.store offset=0x391 align=1 (i32.const 0) (get_local 0x391)) + (i64.store offset=0x392 align=1 (i32.const 0) (get_local 0x392)) + (i64.store offset=0x393 align=1 (i32.const 0) (get_local 0x393)) + (i64.store offset=0x394 align=1 (i32.const 0) (get_local 0x394)) + (i64.store offset=0x395 align=1 (i32.const 0) (get_local 0x395)) + (i64.store offset=0x396 align=1 (i32.const 0) (get_local 0x396)) + (i64.store offset=0x397 align=1 (i32.const 0) (get_local 0x397)) + (i64.store offset=0x398 align=1 (i32.const 0) (get_local 0x398)) + (i64.store offset=0x399 align=1 (i32.const 0) (get_local 0x399)) + (i64.store offset=0x39a align=1 (i32.const 0) (get_local 0x39a)) + (i64.store offset=0x39b align=1 (i32.const 0) (get_local 0x39b)) + (i64.store offset=0x39c align=1 (i32.const 0) (get_local 0x39c)) + (i64.store offset=0x39d align=1 (i32.const 0) (get_local 0x39d)) + (i64.store offset=0x39e align=1 (i32.const 0) (get_local 0x39e)) + (i64.store offset=0x39f align=1 (i32.const 0) (get_local 0x39f)) + (i64.store offset=0x3a0 align=1 (i32.const 0) (get_local 0x3a0)) + (i64.store offset=0x3a1 align=1 (i32.const 0) (get_local 0x3a1)) + (i64.store offset=0x3a2 align=1 (i32.const 0) (get_local 0x3a2)) + (i64.store offset=0x3a3 align=1 (i32.const 0) (get_local 0x3a3)) + (i64.store offset=0x3a4 align=1 (i32.const 0) (get_local 0x3a4)) + (i64.store offset=0x3a5 align=1 (i32.const 0) (get_local 0x3a5)) + (i64.store offset=0x3a6 align=1 (i32.const 0) (get_local 0x3a6)) + (i64.store offset=0x3a7 align=1 (i32.const 0) (get_local 0x3a7)) + (i64.store offset=0x3a8 align=1 (i32.const 0) (get_local 0x3a8)) + (i64.store offset=0x3a9 align=1 (i32.const 0) (get_local 0x3a9)) + (i64.store offset=0x3aa align=1 (i32.const 0) (get_local 0x3aa)) + (i64.store offset=0x3ab align=1 (i32.const 0) (get_local 0x3ab)) + (i64.store offset=0x3ac align=1 (i32.const 0) (get_local 0x3ac)) + (i64.store offset=0x3ad align=1 (i32.const 0) (get_local 0x3ad)) + (i64.store offset=0x3ae align=1 (i32.const 0) (get_local 0x3ae)) + (i64.store offset=0x3af align=1 (i32.const 0) (get_local 0x3af)) + (i64.store offset=0x3b0 align=1 (i32.const 0) (get_local 0x3b0)) + (i64.store offset=0x3b1 align=1 (i32.const 0) (get_local 0x3b1)) + (i64.store offset=0x3b2 align=1 (i32.const 0) (get_local 0x3b2)) + (i64.store offset=0x3b3 align=1 (i32.const 0) (get_local 0x3b3)) + (i64.store offset=0x3b4 align=1 (i32.const 0) (get_local 0x3b4)) + (i64.store offset=0x3b5 align=1 (i32.const 0) (get_local 0x3b5)) + (i64.store offset=0x3b6 align=1 (i32.const 0) (get_local 0x3b6)) + (i64.store offset=0x3b7 align=1 (i32.const 0) (get_local 0x3b7)) + (i64.store offset=0x3b8 align=1 (i32.const 0) (get_local 0x3b8)) + (i64.store offset=0x3b9 align=1 (i32.const 0) (get_local 0x3b9)) + (i64.store offset=0x3ba align=1 (i32.const 0) (get_local 0x3ba)) + (i64.store offset=0x3bb align=1 (i32.const 0) (get_local 0x3bb)) + (i64.store offset=0x3bc align=1 (i32.const 0) (get_local 0x3bc)) + (i64.store offset=0x3bd align=1 (i32.const 0) (get_local 0x3bd)) + (i64.store offset=0x3be align=1 (i32.const 0) (get_local 0x3be)) + (i64.store offset=0x3bf align=1 (i32.const 0) (get_local 0x3bf)) + (i64.store offset=0x3c0 align=1 (i32.const 0) (get_local 0x3c0)) + (i64.store offset=0x3c1 align=1 (i32.const 0) (get_local 0x3c1)) + (i64.store offset=0x3c2 align=1 (i32.const 0) (get_local 0x3c2)) + (i64.store offset=0x3c3 align=1 (i32.const 0) (get_local 0x3c3)) + (i64.store offset=0x3c4 align=1 (i32.const 0) (get_local 0x3c4)) + (i64.store offset=0x3c5 align=1 (i32.const 0) (get_local 0x3c5)) + (i64.store offset=0x3c6 align=1 (i32.const 0) (get_local 0x3c6)) + (i64.store offset=0x3c7 align=1 (i32.const 0) (get_local 0x3c7)) + (i64.store offset=0x3c8 align=1 (i32.const 0) (get_local 0x3c8)) + (i64.store offset=0x3c9 align=1 (i32.const 0) (get_local 0x3c9)) + (i64.store offset=0x3ca align=1 (i32.const 0) (get_local 0x3ca)) + (i64.store offset=0x3cb align=1 (i32.const 0) (get_local 0x3cb)) + (i64.store offset=0x3cc align=1 (i32.const 0) (get_local 0x3cc)) + (i64.store offset=0x3cd align=1 (i32.const 0) (get_local 0x3cd)) + (i64.store offset=0x3ce align=1 (i32.const 0) (get_local 0x3ce)) + (i64.store offset=0x3cf align=1 (i32.const 0) (get_local 0x3cf)) + (i64.store offset=0x3d0 align=1 (i32.const 0) (get_local 0x3d0)) + (i64.store offset=0x3d1 align=1 (i32.const 0) (get_local 0x3d1)) + (i64.store offset=0x3d2 align=1 (i32.const 0) (get_local 0x3d2)) + (i64.store offset=0x3d3 align=1 (i32.const 0) (get_local 0x3d3)) + (i64.store offset=0x3d4 align=1 (i32.const 0) (get_local 0x3d4)) + (i64.store offset=0x3d5 align=1 (i32.const 0) (get_local 0x3d5)) + (i64.store offset=0x3d6 align=1 (i32.const 0) (get_local 0x3d6)) + (i64.store offset=0x3d7 align=1 (i32.const 0) (get_local 0x3d7)) + (i64.store offset=0x3d8 align=1 (i32.const 0) (get_local 0x3d8)) + (i64.store offset=0x3d9 align=1 (i32.const 0) (get_local 0x3d9)) + (i64.store offset=0x3da align=1 (i32.const 0) (get_local 0x3da)) + (i64.store offset=0x3db align=1 (i32.const 0) (get_local 0x3db)) + (i64.store offset=0x3dc align=1 (i32.const 0) (get_local 0x3dc)) + (i64.store offset=0x3dd align=1 (i32.const 0) (get_local 0x3dd)) + (i64.store offset=0x3de align=1 (i32.const 0) (get_local 0x3de)) + (i64.store offset=0x3df align=1 (i32.const 0) (get_local 0x3df)) + (i64.store offset=0x3e0 align=1 (i32.const 0) (get_local 0x3e0)) + (i64.store offset=0x3e1 align=1 (i32.const 0) (get_local 0x3e1)) + (i64.store offset=0x3e2 align=1 (i32.const 0) (get_local 0x3e2)) + (i64.store offset=0x3e3 align=1 (i32.const 0) (get_local 0x3e3)) + (i64.store offset=0x3e4 align=1 (i32.const 0) (get_local 0x3e4)) + (i64.store offset=0x3e5 align=1 (i32.const 0) (get_local 0x3e5)) + (i64.store offset=0x3e6 align=1 (i32.const 0) (get_local 0x3e6)) + (i64.store offset=0x3e7 align=1 (i32.const 0) (get_local 0x3e7)) + (i64.store offset=0x3e8 align=1 (i32.const 0) (get_local 0x3e8)) + (i64.store offset=0x3e9 align=1 (i32.const 0) (get_local 0x3e9)) + (i64.store offset=0x3ea align=1 (i32.const 0) (get_local 0x3ea)) + (i64.store offset=0x3eb align=1 (i32.const 0) (get_local 0x3eb)) + (i64.store offset=0x3ec align=1 (i32.const 0) (get_local 0x3ec)) + (i64.store offset=0x3ed align=1 (i32.const 0) (get_local 0x3ed)) + (i64.store offset=0x3ee align=1 (i32.const 0) (get_local 0x3ee)) + (i64.store offset=0x3ef align=1 (i32.const 0) (get_local 0x3ef)) + (i64.store offset=0x3f0 align=1 (i32.const 0) (get_local 0x3f0)) + (i64.store offset=0x3f1 align=1 (i32.const 0) (get_local 0x3f1)) + (i64.store offset=0x3f2 align=1 (i32.const 0) (get_local 0x3f2)) + (i64.store offset=0x3f3 align=1 (i32.const 0) (get_local 0x3f3)) + (i64.store offset=0x3f4 align=1 (i32.const 0) (get_local 0x3f4)) + (i64.store offset=0x3f5 align=1 (i32.const 0) (get_local 0x3f5)) + (i64.store offset=0x3f6 align=1 (i32.const 0) (get_local 0x3f6)) + (i64.store offset=0x3f7 align=1 (i32.const 0) (get_local 0x3f7)) + (i64.store offset=0x3f8 align=1 (i32.const 0) (get_local 0x3f8)) + (i64.store offset=0x3f9 align=1 (i32.const 0) (get_local 0x3f9)) + (i64.store offset=0x3fa align=1 (i32.const 0) (get_local 0x3fa)) + (i64.store offset=0x3fb align=1 (i32.const 0) (get_local 0x3fb)) + (i64.store offset=0x3fc align=1 (i32.const 0) (get_local 0x3fc)) + (i64.store offset=0x3fd align=1 (i32.const 0) (get_local 0x3fd)) + (i64.store offset=0x3fe align=1 (i32.const 0) (get_local 0x3fe)) + (i64.store offset=0x3ff align=1 (i32.const 0) (get_local 0x3ff)) + (i64.store offset=0x400 align=1 (i32.const 0) (get_local 0x400)) + (i64.store offset=0x401 align=1 (i32.const 0) (get_local 0x401)) + (i64.store offset=0x402 align=1 (i32.const 0) (get_local 0x402)) + (i64.store offset=0x403 align=1 (i32.const 0) (get_local 0x403)) + (i64.store offset=0x404 align=1 (i32.const 0) (get_local 0x404)) + (i64.store offset=0x405 align=1 (i32.const 0) (get_local 0x405)) + (i64.store offset=0x406 align=1 (i32.const 0) (get_local 0x406)) + (i64.store offset=0x407 align=1 (i32.const 0) (get_local 0x407)) + (i64.store offset=0x408 align=1 (i32.const 0) (get_local 0x408)) + (i64.store offset=0x409 align=1 (i32.const 0) (get_local 0x409)) + (i64.store offset=0x40a align=1 (i32.const 0) (get_local 0x40a)) + (i64.store offset=0x40b align=1 (i32.const 0) (get_local 0x40b)) + (i64.store offset=0x40c align=1 (i32.const 0) (get_local 0x40c)) + (i64.store offset=0x40d align=1 (i32.const 0) (get_local 0x40d)) + (i64.store offset=0x40e align=1 (i32.const 0) (get_local 0x40e)) + (i64.store offset=0x40f align=1 (i32.const 0) (get_local 0x40f)) + (i64.store offset=0x410 align=1 (i32.const 0) (get_local 0x410)) + (i64.store offset=0x411 align=1 (i32.const 0) (get_local 0x411)) + (i64.store offset=0x412 align=1 (i32.const 0) (get_local 0x412)) + (i64.store offset=0x413 align=1 (i32.const 0) (get_local 0x413)) + (i64.store offset=0x414 align=1 (i32.const 0) (get_local 0x414)) + (i64.store offset=0x415 align=1 (i32.const 0) (get_local 0x415)) + (i64.store offset=0x416 align=1 (i32.const 0) (get_local 0x416)) + (i64.store offset=0x417 align=1 (i32.const 0) (get_local 0x417)) + (i64.store offset=0x418 align=1 (i32.const 0) (get_local 0x418)) + (i64.store offset=0x419 align=1 (i32.const 0) (get_local 0x419)) + (i64.store offset=0x41a align=1 (i32.const 0) (get_local 0x41a)) + (i64.store offset=0x41b align=1 (i32.const 0) (get_local 0x41b)) + (i64.store offset=0x41c align=1 (i32.const 0) (get_local 0x41c)) + (i64.store offset=0x41d align=1 (i32.const 0) (get_local 0x41d)) + (i64.store offset=0x41e align=1 (i32.const 0) (get_local 0x41e)) + (i64.store offset=0x41f align=1 (i32.const 0) (get_local 0x41f)) + ) +) + +(assert_trap (invoke "test-guard-page-skip" (i32.const 0)) "call stack exhausted") +(assert_trap (invoke "test-guard-page-skip" (i32.const 100)) "call stack exhausted") +(assert_trap (invoke "test-guard-page-skip" (i32.const 200)) "call stack exhausted") +(assert_trap (invoke "test-guard-page-skip" (i32.const 300)) "call stack exhausted") +(assert_trap (invoke "test-guard-page-skip" (i32.const 400)) "call stack exhausted") +(assert_trap (invoke "test-guard-page-skip" (i32.const 500)) "call stack exhausted") +(assert_trap (invoke "test-guard-page-skip" (i32.const 600)) "call stack exhausted") +(assert_trap (invoke "test-guard-page-skip" (i32.const 700)) "call stack exhausted") +(assert_trap (invoke "test-guard-page-skip" (i32.const 800)) "call stack exhausted") +(assert_trap (invoke "test-guard-page-skip" (i32.const 900)) "call stack exhausted")
\ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/skip-stack-guard-page.wast.js b/js/src/jit-test/tests/wasm/spec/skip-stack-guard-page.wast.js new file mode 100644 index 000000000..e80fc288c --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/skip-stack-guard-page.wast.js @@ -0,0 +1 @@ +var importedArgs = ['skip-stack-guard-page.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/soft-fail.wast b/js/src/jit-test/tests/wasm/spec/soft-fail.wast new file mode 100644 index 000000000..13c965382 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/soft-fail.wast @@ -0,0 +1,577 @@ +;; Test soft failures +;; These are invalid Wasm, but the failure is in dead code, which +;; implementations are not required to validate. If they do, they shall +;; diagnose the correct error. + +(assert_soft_invalid + (module (func $type-num-vs-num + (unreachable) (drop (i64.eqz (i32.const 0)))) + ) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-poly-num-vs-num (result i32) + (unreachable) (i64.const 0) (i32.const 0) (select) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-poly-transitive-num-vs-num (result i32) + (unreachable) + (i64.const 0) (i32.const 0) (select) + (i32.const 0) (i32.const 0) (select) + )) + "type mismatch" +) + +(assert_soft_invalid + (module (func $type-unconsumed-const (unreachable) (i32.const 0))) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-unconsumed-result (unreachable) (i32.eqz))) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-unconsumed-result2 + (unreachable) (i32.const 0) (i32.add) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-unconsumed-poly0 (unreachable) (select))) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-unconsumed-poly1 (unreachable) (i32.const 0) (select))) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-unconsumed-poly2 + (unreachable) (i32.const 0) (i32.const 0) (select) + )) + "type mismatch" +) + +(assert_soft_invalid + (module (func $type-unary-num-vs-void-after-break + (block (br 0) (block (drop (i32.eqz (nop))))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-unary-num-vs-num-after-break + (block (br 0) (drop (i32.eqz (f32.const 1)))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-binary-num-vs-void-after-break + (block (br 0) (block (drop (f32.eq (i32.const 1))))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-binary-num-vs-num-after-break + (block (br 0) (drop (f32.eq (i32.const 1) (f32.const 0)))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-num-vs-void-after-break + (block (br 0) (i32.const 1)) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-num-vs-num-after-break (result i32) + (block i32 (i32.const 1) (br 0) (f32.const 0)) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-loop-value-num-vs-void-after-break + (block (loop (br 1) (i32.const 1))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-loop-value-num-vs-num-after-break (result i32) + (loop i32 (br 1 (i32.const 1)) (f32.const 0)) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-func-value-num-vs-void-after-break + (br 0) (i32.const 1) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-func-value-num-vs-num-after-break (result i32) + (br 0 (i32.const 1)) (f32.const 0) + )) + "type mismatch" +) + +(assert_soft_invalid + (module (func $type-unary-num-vs-void-after-return + (return) (block (drop (i32.eqz (nop)))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-unary-num-vs-num-after-return + (return) (drop (i32.eqz (f32.const 1))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-binary-num-vs-void-after-return + (return) (block (drop (f32.eq (i32.const 1)))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-binary-num-vs-num-after-return + (return) (drop (f32.eq (i32.const 1) (f32.const 0))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-num-vs-void-after-return + (block (return) (i32.const 1)) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-num-vs-num-after-return (result i32) + (block i32 (i32.const 1) (return (i32.const 0)) (f32.const 0)) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-loop-value-num-vs-void-after-return + (block (loop (return) (i32.const 1))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-loop-value-num-vs-num-after-return (result i32) + (loop i32 (return (i32.const 1)) (f32.const 0)) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-func-value-num-vs-void-after-return + (return) (i32.const 1) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-func-value-num-vs-num-after-return (result i32) + (return (i32.const 1)) (f32.const 0) + )) + "type mismatch" +) + +(assert_soft_invalid + (module (func $type-unary-num-vs-void-after-unreachable + (unreachable) (block (drop (i32.eqz (nop)))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-unary-num-vs-num-after-unreachable + (unreachable) (drop (i32.eqz (f32.const 1))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-binary-num-vs-void-after-unreachable + (unreachable) (block (drop (f32.eq (i32.const 1)))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-binary-num-vs-num-after-unreachable + (unreachable) (drop (f32.eq (i32.const 1) (f32.const 0))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-num-vs-void-after-unreachable + (block (unreachable) (i32.const 1)) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-num-vs-num-after-unreachable (result i32) + (block i32 (i32.const 1) (unreachable) (f32.const 0)) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-loop-value-num-vs-void-after-unreachable + (block (loop (unreachable) (i32.const 1))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-loop-value-num-vs-num-after-unreachable (result i32) + (loop i32 (unreachable) (f32.const 0)) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-func-value-num-vs-void-after-unreachable + (unreachable) (i32.const 1) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-func-value-num-vs-num-after-unreachable (result i32) + (unreachable) (f32.const 0) + )) + "type mismatch" +) + +(assert_soft_invalid + (module (func $type-unary-num-vs-void-after-nested-unreachable + (block (unreachable)) (block (drop (i32.eqz (nop)))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-unary-num-vs-num-after-nested-unreachable + (block (unreachable)) (drop (i32.eqz (f32.const 1))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-binary-num-vs-void-after-nested-unreachable + (block (unreachable)) (block (drop (f32.eq (i32.const 1)))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-binary-num-vs-num-after-nested-unreachable + (block (unreachable)) (drop (f32.eq (i32.const 1) (f32.const 0))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-num-vs-void-after-nested-unreachable + (block (block (unreachable)) (i32.const 1)) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-num-vs-num-after-nested-unreachable + (result i32) + (block i32 (i32.const 1) (block (unreachable)) (f32.const 0)) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-loop-value-num-vs-void-after-nested-unreachable + (block (loop (block (unreachable)) (i32.const 1))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-loop-value-num-vs-num-after-nested-unreachable + (result i32) + (loop i32 (block (unreachable)) (f32.const 0)) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-func-value-num-vs-void-after-nested-unreachable + (block (unreachable)) (i32.const 1) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-func-value-num-vs-num-after-nested-unreachable + (result i32) + (block (unreachable)) (f32.const 0) + )) + "type mismatch" +) + +(assert_soft_invalid + (module (func $type-unary-num-vs-void-after-infinite-loop + (loop (br 0)) (block (drop (i32.eqz (nop)))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-unary-num-vs-num-after-infinite-loop + (loop (br 0)) (drop (i32.eqz (f32.const 1))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-binary-num-vs-void-after-infinite-loop + (loop (br 0)) (block (drop (f32.eq (i32.const 1)))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-binary-num-vs-num-after-infinite-loop + (loop (br 0)) (drop (f32.eq (i32.const 1) (f32.const 0))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-num-vs-void-after-infinite-loop + (block (loop (br 0)) (i32.const 1)) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-num-vs-num-after-infinite-loop (result i32) + (block i32 (i32.const 1) (loop (br 0)) (f32.const 0)) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-loop-value-num-vs-void-after-infinite-loop + (block (loop (loop (br 0)) (i32.const 1))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-loop-value-num-vs-num-after-infinite-loop (result i32) + (loop i32 (loop (br 0)) (f32.const 0)) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-func-value-num-vs-void-after-infinite-loop + (loop (br 0)) (i32.const 1) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-func-value-num-vs-num-after-infinite-loop (result i32) + (loop (br 0)) (f32.const 0) + )) + "type mismatch" +) + +(assert_soft_invalid + (module (func $type-unary-num-vs-void-in-dead-body + (if (i32.const 0) (then (drop (i32.eqz (nop))))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-unary-num-vs-num-in-dead-body + (if (i32.const 0) (then (drop (i32.eqz (f32.const 1))))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-binary-num-vs-void-in-dead-body + (if (i32.const 0) (then (drop (f32.eq (i32.const 1))))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-binary-num-vs-num-in-dead-body + (if (i32.const 0) (then (drop (f32.eq (i32.const 1) (f32.const 0))))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-if-value-num-vs-void-in-dead-body + (if (i32.const 0) (then (i32.const 1))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-if-value-num-vs-num-in-dead-body (result i32) + (if i32 (i32.const 0) (then (f32.const 0))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-num-vs-void-in-dead-body + (if (i32.const 0) (then (block (i32.const 1)))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-num-vs-num-in-dead-body (result i32) + (if i32 (i32.const 0) (then (block i32 (f32.const 0)))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-num-vs-void-in-dead-body + (if (i32.const 0) (then (loop (i32.const 1)))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-num-vs-num-in-dead-body (result i32) + (if i32 (i32.const 0) (then (loop i32 (f32.const 0)))) + )) + "type mismatch" +) + +(assert_soft_invalid + (module (func $type-return-second-num-vs-num (result i32) + (return (i32.const 1)) (return (f64.const 1)) + )) + "type mismatch" +) + +(assert_soft_invalid + (module (func $type-br-second-num-vs-num (result i32) + (block i32 (br 0 (i32.const 1)) (br 0 (f64.const 1))) + )) + "type mismatch" +) + +(assert_soft_invalid + (module (func $type-br_if-cond-num-vs-num-after-unreachable + (block (br_if 0 (unreachable) (f32.const 0))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-br_table-num-vs-num-after-unreachable + (block (br_table 0 (unreachable) (f32.const 1))) + )) + "type mismatch" +) + +(assert_soft_invalid + (module (func $type-block-value-nested-unreachable-num-vs-void + (block (i32.const 3) (block (unreachable))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-nested-unreachable-void-vs-num (result i32) + (block (block (unreachable))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-nested-unreachable-num-vs-num (result i32) + (block i64 (i64.const 0) (block (unreachable))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-nested-unreachable-num2-vs-void (result i32) + (block (i32.const 3) (block (i64.const 1) (unreachable))) (i32.const 9) + )) + "type mismatch" +) + +(assert_soft_invalid + (module (func $type-block-value-nested-br-num-vs-void + (block (i32.const 3) (block (br 1))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-nested-br-void-vs-num (result i32) + (block i32 (block (br 1 (i32.const 0)))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-nested-br-num-vs-num (result i32) + (block i32 (i64.const 0) (block (br 1 (i32.const 0)))) + )) + "type mismatch" +) + +(assert_soft_invalid + (module (func $type-block-value-nested2-br-num-vs-void + (block (block (i32.const 3) (block (br 2)))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-nested2-br-void-vs-num (result i32) + (block i32 (block (block (br 2 (i32.const 0))))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-nested2-br-num-vs-num (result i32) + (block i32 (block i64 (i64.const 0) (block (br 2 (i32.const 0))))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-nested2-br-num2-vs-void (result i32) + (block (i32.const 3) (block (i64.const 1) (br 1))) (i32.const 9) + )) + "type mismatch" +) + +(assert_soft_invalid + (module (func $type-block-value-nested-return-num-vs-void + (block (i32.const 3) (block (return))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-nested-return-void-vs-num (result i32) + (block (block (return (i32.const 0)))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-nested-return-num-vs-num (result i32) + (block i64 (i64.const 0) (block (return (i32.const 0)))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-block-value-nested-return-num2-vs-void (result i32) + (block (i32.const 3) (block (i64.const 1) (return (i32.const 0)))) + (i32.const 9) + )) + "type mismatch" +) + +(assert_soft_invalid + (module (func $type-loop-value-nested-unreachable-num-vs-void + (loop (i32.const 3) (block (unreachable))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-loop-value-nested-unreachable-void-vs-num (result i32) + (loop (block (unreachable))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-loop-value-nested-unreachable-num-vs-num (result i32) + (loop i64 (i64.const 0) (block (unreachable))) + )) + "type mismatch" +) + +(assert_soft_invalid + (module (func $type-cont-last-void-vs-empty (result i32) + (loop (br 0 (nop))) + )) + "type mismatch" +) +(assert_soft_invalid + (module (func $type-cont-last-num-vs-empty (result i32) + (loop (br 0 (i32.const 0))) + )) + "type mismatch" +) diff --git a/js/src/jit-test/tests/wasm/spec/soft-fail.wast.js b/js/src/jit-test/tests/wasm/spec/soft-fail.wast.js new file mode 100644 index 000000000..ff50b8a36 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/soft-fail.wast.js @@ -0,0 +1 @@ +var importedArgs = ['soft-fail.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/stack.wast b/js/src/jit-test/tests/wasm/spec/stack.wast new file mode 100644 index 000000000..e6492679e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/stack.wast @@ -0,0 +1,132 @@ +(module + (func (export "fac-expr") (param $n i64) (result i64) + (local $i i64) + (local $res i64) + (set_local $i (get_local $n)) + (set_local $res (i64.const 1)) + (block $done + (loop $loop + (if + (i64.eq (get_local $i) (i64.const 0)) + (br $done) + (block + (set_local $res (i64.mul (get_local $i) (get_local $res))) + (set_local $i (i64.sub (get_local $i) (i64.const 1))) + ) + ) + (br $loop) + ) + ) + (get_local $res) + ) + + (func (export "fac-stack") (param $n i64) (result i64) + (local $i i64) + (local $res i64) + (get_local $n) + (set_local $i) + (i64.const 1) + (set_local $res) + (block $done + (loop $loop + (get_local $i) + (i64.const 0) + (i64.eq) + (if + (then (br $done)) + (else + (get_local $i) + (get_local $res) + (i64.mul) + (set_local $res) + (get_local $i) + (i64.const 1) + (i64.sub) + (set_local $i) + ) + ) + (br $loop) + ) + ) + (get_local $res) + ) + + (func (export "fac-stack-raw") (param $n i64) (result i64) + (local $i i64) + (local $res i64) + get_local $n + set_local $i + i64.const 1 + set_local $res + block $done + loop $loop + get_local $i + i64.const 0 + i64.eq + if + br $done + else + get_local $i + get_local $res + i64.mul + set_local $res + get_local $i + i64.const 1 + i64.sub + set_local $i + end + br $loop + end + end + get_local $res + ) + + (func (export "fac-mixed") (param $n i64) (result i64) + (local $i i64) + (local $res i64) + (set_local $i (get_local $n)) + (set_local $res (i64.const 1)) + (block $done + (loop $loop + (i64.eq (get_local $i) (i64.const 0)) + (if + (then (br $done)) + (else + (i64.mul (get_local $i) (get_local $res)) + (set_local $res) + (i64.sub (get_local $i) (i64.const 1)) + (set_local $i) + ) + ) + (br $loop) + ) + ) + (get_local $res) + ) + + (func (export "fac-mixed-raw") (param $n i64) (result i64) + (local $i i64) + (local $res i64) + (set_local $i (get_local $n)) + (set_local $res (i64.const 1)) + block $done + loop $loop + (i64.eq (get_local $i) (i64.const 0)) + if + br $done + else + (i64.mul (get_local $i) (get_local $res)) + set_local $res + (i64.sub (get_local $i) (i64.const 1)) + set_local $i + end + br $loop + end + end + get_local $res + ) +) + +(assert_return (invoke "fac-expr" (i64.const 25)) (i64.const 7034535277573963776)) +(assert_return (invoke "fac-stack" (i64.const 25)) (i64.const 7034535277573963776)) +(assert_return (invoke "fac-mixed" (i64.const 25)) (i64.const 7034535277573963776)) diff --git a/js/src/jit-test/tests/wasm/spec/stack.wast.js b/js/src/jit-test/tests/wasm/spec/stack.wast.js new file mode 100644 index 000000000..70f151229 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/stack.wast.js @@ -0,0 +1 @@ +var importedArgs = ['stack.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/start.wast b/js/src/jit-test/tests/wasm/spec/start.wast new file mode 100644 index 000000000..513f7b9ba --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/start.wast @@ -0,0 +1,93 @@ +(assert_invalid + (module (func) (start 1)) + "unknown function" +) +(assert_invalid + (module + (func $main (result i32) (return (i32.const 0))) + (start $main) + ) + "start function" +) +(assert_invalid + (module + (func $main (param $a i32)) + (start $main) + ) + "start function" +) +(module + (memory (data "A")) + (func $inc + (i32.store8 + (i32.const 0) + (i32.add + (i32.load8_u (i32.const 0)) + (i32.const 1) + ) + ) + ) + (func $get (result i32) + (return (i32.load8_u (i32.const 0))) + ) + (func $main + (call $inc) + (call $inc) + (call $inc) + ) + + (start $main) + (export "inc" (func $inc)) + (export "get" (func $get)) +) +(assert_return (invoke "get") (i32.const 68)) +(invoke "inc") +(assert_return (invoke "get") (i32.const 69)) +(invoke "inc") +(assert_return (invoke "get") (i32.const 70)) + +(module + (memory (data "A")) + (func $inc + (i32.store8 + (i32.const 0) + (i32.add + (i32.load8_u (i32.const 0)) + (i32.const 1) + ) + ) + ) + (func $get (result i32) + (return (i32.load8_u (i32.const 0))) + ) + (func $main + (call $inc) + (call $inc) + (call $inc) + ) + (start 2) + (export "inc" (func $inc)) + (export "get" (func $get)) +) +(assert_return (invoke "get") (i32.const 68)) +(invoke "inc") +(assert_return (invoke "get") (i32.const 69)) +(invoke "inc") +(assert_return (invoke "get") (i32.const 70)) + +(module + (func $print_i32 (import "spectest" "print") (param i32)) + (func $main (call $print_i32 (i32.const 1))) + (start 1) +) + +(module + (func $print_i32 (import "spectest" "print") (param i32)) + (func $main (call $print_i32 (i32.const 2))) + (start $main) +) + +(assert_trap + (module (func $main (unreachable)) (start $main)) + "unreachable" +) diff --git a/js/src/jit-test/tests/wasm/spec/start.wast.js b/js/src/jit-test/tests/wasm/spec/start.wast.js new file mode 100644 index 000000000..6b3cc49d6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/start.wast.js @@ -0,0 +1 @@ +var importedArgs = ['start.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/store_retval.wast b/js/src/jit-test/tests/wasm/spec/store_retval.wast new file mode 100644 index 000000000..a4d03582f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/store_retval.wast @@ -0,0 +1,55 @@ +(assert_invalid + (module (func (param i32) (result i32) (set_local 0 (i32.const 1)))) + "type mismatch" +) +(assert_invalid + (module (func (param i64) (result i64) (set_local 0 (i64.const 1)))) + "type mismatch" +) +(assert_invalid + (module (func (param f32) (result f32) (set_local 0 (f32.const 1)))) + "type mismatch" +) +(assert_invalid + (module (func (param f64) (result f64) (set_local 0 (f64.const 1)))) + "type mismatch" +) + +(assert_invalid + (module (memory 1) (func (param i32) (result i32) (i32.store (i32.const 0) (i32.const 1)))) + "type mismatch" +) +(assert_invalid + (module (memory 1) (func (param i64) (result i64) (i64.store (i32.const 0) (i64.const 1)))) + "type mismatch" +) +(assert_invalid + (module (memory 1) (func (param f32) (result f32) (f32.store (i32.const 0) (f32.const 1)))) + "type mismatch" +) +(assert_invalid + (module (memory 1) (func (param f64) (result f64) (f64.store (i32.const 0) (f64.const 1)))) + "type mismatch" +) + +(assert_invalid + (module (memory 1) (func (param i32) (result i32) (i32.store8 (i32.const 0) (i32.const 1)))) + "type mismatch" +) +(assert_invalid + (module (memory 1) (func (param i32) (result i32) (i32.store16 (i32.const 0) (i32.const 1)))) + "type mismatch" +) +(assert_invalid + (module (memory 1) (func (param i64) (result i64) (i64.store8 (i32.const 0) (i64.const 1)))) + "type mismatch" +) +(assert_invalid + (module (memory 1) (func (param i64) (result i64) (i64.store16 (i32.const 0) (i64.const 1)))) + "type mismatch" +) +(assert_invalid + (module (memory 1) (func (param i64) (result i64) (i64.store32 (i32.const 0) (i64.const 1)))) + "type mismatch" +) + diff --git a/js/src/jit-test/tests/wasm/spec/store_retval.wast.js b/js/src/jit-test/tests/wasm/spec/store_retval.wast.js new file mode 100644 index 000000000..017a16523 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/store_retval.wast.js @@ -0,0 +1 @@ +var importedArgs = ['store_retval.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/switch.wast b/js/src/jit-test/tests/wasm/spec/switch.wast new file mode 100644 index 000000000..2d4565a5d --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/switch.wast @@ -0,0 +1,150 @@ +(module + ;; Statement switch + (func (export "stmt") (param $i i32) (result i32) + (local $j i32) + (set_local $j (i32.const 100)) + (block $switch + (block $7 + (block $default + (block $6 + (block $5 + (block $4 + (block $3 + (block $2 + (block $1 + (block $0 + (br_table $0 $1 $2 $3 $4 $5 $6 $7 $default + (get_local $i) + ) + ) ;; 0 + (return (get_local $i)) + ) ;; 1 + (nop) + ;; fallthrough + ) ;; 2 + ;; fallthrough + ) ;; 3 + (set_local $j (i32.sub (i32.const 0) (get_local $i))) + (br $switch) + ) ;; 4 + (br $switch) + ) ;; 5 + (set_local $j (i32.const 101)) + (br $switch) + ) ;; 6 + (set_local $j (i32.const 101)) + ;; fallthrough + ) ;; default + (set_local $j (i32.const 102)) + ) ;; 7 + ;; fallthrough + ) + (return (get_local $j)) + ) + + ;; Expression switch + (func (export "expr") (param $i i64) (result i64) + (local $j i64) + (set_local $j (i64.const 100)) + (return + (block $switch i64 + (block $7 + (block $default + (block $4 + (block $5 + (block $6 + (block $3 + (block $2 + (block $1 + (block $0 + (br_table $0 $1 $2 $3 $4 $5 $6 $7 $default + (i32.wrap/i64 (get_local $i)) + ) + ) ;; 0 + (return (get_local $i)) + ) ;; 1 + (nop) + ;; fallthrough + ) ;; 2 + ;; fallthrough + ) ;; 3 + (br $switch (i64.sub (i64.const 0) (get_local $i))) + ) ;; 6 + (set_local $j (i64.const 101)) + ;; fallthrough + ) ;; 4 + ;; fallthrough + ) ;; 5 + ;; fallthrough + ) ;; default + (br $switch (get_local $j)) + ) ;; 7 + (i64.const -5) + ) + ) + ) + + ;; Argument switch + (func (export "arg") (param $i i32) (result i32) + (return + (block $2 i32 + (i32.add (i32.const 10) + (block $1 i32 + (i32.add (i32.const 100) + (block $0 i32 + (i32.add (i32.const 1000) + (block $default i32 + (br_table $0 $1 $2 $default + (i32.mul (i32.const 2) (get_local $i)) + (i32.and (i32.const 3) (get_local $i)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + + ;; Corner cases + (func (export "corner") (result i32) + (block + (br_table 0 (i32.const 0)) + ) + (i32.const 1) + ) +) + +(assert_return (invoke "stmt" (i32.const 0)) (i32.const 0)) +(assert_return (invoke "stmt" (i32.const 1)) (i32.const -1)) +(assert_return (invoke "stmt" (i32.const 2)) (i32.const -2)) +(assert_return (invoke "stmt" (i32.const 3)) (i32.const -3)) +(assert_return (invoke "stmt" (i32.const 4)) (i32.const 100)) +(assert_return (invoke "stmt" (i32.const 5)) (i32.const 101)) +(assert_return (invoke "stmt" (i32.const 6)) (i32.const 102)) +(assert_return (invoke "stmt" (i32.const 7)) (i32.const 100)) +(assert_return (invoke "stmt" (i32.const -10)) (i32.const 102)) + +(assert_return (invoke "expr" (i64.const 0)) (i64.const 0)) +(assert_return (invoke "expr" (i64.const 1)) (i64.const -1)) +(assert_return (invoke "expr" (i64.const 2)) (i64.const -2)) +(assert_return (invoke "expr" (i64.const 3)) (i64.const -3)) +(assert_return (invoke "expr" (i64.const 6)) (i64.const 101)) +(assert_return (invoke "expr" (i64.const 7)) (i64.const -5)) +(assert_return (invoke "expr" (i64.const -10)) (i64.const 100)) + +(assert_return (invoke "arg" (i32.const 0)) (i32.const 110)) +(assert_return (invoke "arg" (i32.const 1)) (i32.const 12)) +(assert_return (invoke "arg" (i32.const 2)) (i32.const 4)) +(assert_return (invoke "arg" (i32.const 3)) (i32.const 1116)) +(assert_return (invoke "arg" (i32.const 4)) (i32.const 118)) +(assert_return (invoke "arg" (i32.const 5)) (i32.const 20)) +(assert_return (invoke "arg" (i32.const 6)) (i32.const 12)) +(assert_return (invoke "arg" (i32.const 7)) (i32.const 1124)) +(assert_return (invoke "arg" (i32.const 8)) (i32.const 126)) + +(assert_return (invoke "corner") (i32.const 1)) + +(assert_invalid (module (func (br_table 3 (i32.const 0)))) "unknown label") diff --git a/js/src/jit-test/tests/wasm/spec/switch.wast.js b/js/src/jit-test/tests/wasm/spec/switch.wast.js new file mode 100644 index 000000000..e7eb37c3e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/switch.wast.js @@ -0,0 +1 @@ +var importedArgs = ['switch.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/tee_local.wast b/js/src/jit-test/tests/wasm/spec/tee_local.wast new file mode 100644 index 000000000..452793e30 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/tee_local.wast @@ -0,0 +1,236 @@ +;; Test `tee_local` operator + +(module + ;; Typing + + (func (export "type-local-i32") (result i32) (local i32) (tee_local 0 (i32.const 0))) + (func (export "type-local-i64") (result i64) (local i64) (tee_local 0 (i64.const 0))) + (func (export "type-local-f32") (result f32) (local f32) (tee_local 0 (f32.const 0))) + (func (export "type-local-f64") (result f64) (local f64) (tee_local 0 (f64.const 0))) + + (func (export "type-param-i32") (param i32) (result i32) (tee_local 0 (i32.const 10))) + (func (export "type-param-i64") (param i64) (result i64) (tee_local 0 (i64.const 11))) + (func (export "type-param-f32") (param f32) (result f32) (tee_local 0 (f32.const 11.1))) + (func (export "type-param-f64") (param f64) (result f64) (tee_local 0 (f64.const 12.2))) + + (func (export "type-mixed") (param i64 f32 f64 i32 i32) (local f32 i64 i64 f64) + (drop (i64.eqz (tee_local 0 (i64.const 0)))) + (drop (f32.neg (tee_local 1 (f32.const 0)))) + (drop (f64.neg (tee_local 2 (f64.const 0)))) + (drop (i32.eqz (tee_local 3 (i32.const 0)))) + (drop (i32.eqz (tee_local 4 (i32.const 0)))) + (drop (f32.neg (tee_local 5 (f32.const 0)))) + (drop (i64.eqz (tee_local 6 (i64.const 0)))) + (drop (i64.eqz (tee_local 7 (i64.const 0)))) + (drop (f64.neg (tee_local 8 (f64.const 0)))) + ) + + ;; Writing + + (func (export "write") (param i64 f32 f64 i32 i32) (result i64) (local f32 i64 i64 f64) + (drop (tee_local 1 (f32.const -0.3))) + (drop (tee_local 3 (i32.const 40))) + (drop (tee_local 4 (i32.const -7))) + (drop (tee_local 5 (f32.const 5.5))) + (drop (tee_local 6 (i64.const 6))) + (drop (tee_local 8 (f64.const 8))) + (i64.trunc_s/f64 + (f64.add + (f64.convert_u/i64 (get_local 0)) + (f64.add + (f64.promote/f32 (get_local 1)) + (f64.add + (get_local 2) + (f64.add + (f64.convert_u/i32 (get_local 3)) + (f64.add + (f64.convert_s/i32 (get_local 4)) + (f64.add + (f64.promote/f32 (get_local 5)) + (f64.add + (f64.convert_u/i64 (get_local 6)) + (f64.add + (f64.convert_u/i64 (get_local 7)) + (get_local 8) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + + ;; Result + + (func (export "result") (param i64 f32 f64 i32 i32) (result f64) + (local f32 i64 i64 f64) + (f64.add + (f64.convert_u/i64 (tee_local 0 (i64.const 1))) + (f64.add + (f64.promote/f32 (tee_local 1 (f32.const 2))) + (f64.add + (tee_local 2 (f64.const 3.3)) + (f64.add + (f64.convert_u/i32 (tee_local 3 (i32.const 4))) + (f64.add + (f64.convert_s/i32 (tee_local 4 (i32.const 5))) + (f64.add + (f64.promote/f32 (tee_local 5 (f32.const 5.5))) + (f64.add + (f64.convert_u/i64 (tee_local 6 (i64.const 6))) + (f64.add + (f64.convert_u/i64 (tee_local 7 (i64.const 0))) + (tee_local 8 (f64.const 8)) + ) + ) + ) + ) + ) + ) + ) + ) + ) +) + +(assert_return (invoke "type-local-i32") (i32.const 0)) +(assert_return (invoke "type-local-i64") (i64.const 0)) +(assert_return (invoke "type-local-f32") (f32.const 0)) +(assert_return (invoke "type-local-f64") (f64.const 0)) + +(assert_return (invoke "type-param-i32" (i32.const 2)) (i32.const 10)) +(assert_return (invoke "type-param-i64" (i64.const 3)) (i64.const 11)) +(assert_return (invoke "type-param-f32" (f32.const 4.4)) (f32.const 11.1)) +(assert_return (invoke "type-param-f64" (f64.const 5.5)) (f64.const 12.2)) + +(assert_return + (invoke "type-mixed" + (i64.const 1) (f32.const 2.2) (f64.const 3.3) (i32.const 4) (i32.const 5) + ) +) + +(assert_return + (invoke "write" + (i64.const 1) (f32.const 2) (f64.const 3.3) (i32.const 4) (i32.const 5) + ) + (i64.const 56) +) + +(assert_return + (invoke "result" + (i64.const -1) (f32.const -2) (f64.const -3.3) (i32.const -4) (i32.const -5) + ) + (f64.const 34.8) +) + + +;; Invalid typing of access to locals + +(assert_invalid + (module (func $type-local-num-vs-num (result i64) (local i32) (tee_local 0 (i32.const 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-local-num-vs-num (local f32) (i32.eqz (tee_local 0 (f32.const 0))))) + "type mismatch" +) +(assert_invalid + (module (func $type-local-num-vs-num (local f64 i64) (f64.neg (tee_local 1 (i64.const 0))))) + "type mismatch" +) + +(assert_invalid + (module (func $type-local-arg-void-vs-num (local i32) (tee_local 0 (nop)))) + "type mismatch" +) +(assert_invalid + (module (func $type-local-arg-num-vs-num (local i32) (tee_local 0 (f32.const 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-local-arg-num-vs-num (local f32) (tee_local 0 (f64.const 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-local-arg-num-vs-num (local f64 i64) (tee_local 1 (f64.const 0)))) + "type mismatch" +) + + +;; Invalid typing of access to parameters + +(assert_invalid + (module (func $type-param-num-vs-num (param i32) (result i64) (get_local 0))) + "type mismatch" +) +(assert_invalid + (module (func $type-param-num-vs-num (param f32) (i32.eqz (get_local 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-param-num-vs-num (param f64 i64) (f64.neg (get_local 1)))) + "type mismatch" +) + +(assert_invalid + (module (func $type-param-arg-void-vs-num (param i32) (tee_local 0 (nop)))) + "type mismatch" +) +(assert_invalid + (module (func $type-param-arg-num-vs-num (param i32) (tee_local 0 (f32.const 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-param-arg-num-vs-num (param f32) (tee_local 0 (f64.const 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-param-arg-num-vs-num (param f64 i64) (tee_local 1 (f64.const 0)))) + "type mismatch" +) + + +;; Invalid local index + +(assert_invalid + (module (func $unbound-local (local i32 i64) (get_local 3))) + "unknown local" +) +(assert_invalid + (module (func $large-local (local i32 i64) (get_local 14324343))) + "unknown local" +) + +(assert_invalid + (module (func $unbound-param (param i32 i64) (get_local 2))) + "unknown local" +) +(assert_invalid + (module (func $large-param (local i32 i64) (get_local 714324343))) + "unknown local" +) + +(assert_invalid + (module (func $unbound-mixed (param i32) (local i32 i64) (get_local 3))) + "unknown local" +) +(assert_invalid + (module (func $large-mixed (param i64) (local i32 i64) (get_local 214324343))) + "unknown local" +) + +(assert_invalid + (module (func $type-mixed-arg-num-vs-num (param f32) (local i32) (tee_local 1 (f32.const 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-mixed-arg-num-vs-num (param i64 i32) (local f32) (tee_local 1 (f32.const 0)))) + "type mismatch" +) +(assert_invalid + (module (func $type-mixed-arg-num-vs-num (param i64) (local f64 i64) (tee_local 1 (i64.const 0)))) + "type mismatch" +) + diff --git a/js/src/jit-test/tests/wasm/spec/tee_local.wast.js b/js/src/jit-test/tests/wasm/spec/tee_local.wast.js new file mode 100644 index 000000000..418406681 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/tee_local.wast.js @@ -0,0 +1 @@ +var importedArgs = ['tee_local.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/traps.wast b/js/src/jit-test/tests/wasm/spec/traps.wast new file mode 100644 index 000000000..a9184b654 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/traps.wast @@ -0,0 +1,69 @@ +;; Test that traps are preserved even in instructions which might otherwise +;; be dead-code-eliminated. These functions all perform an operation and +;; discard its return value. + +(module + (func (export "no_dce.i32.div_s") (param $x i32) (param $y i32) (result i32) + (i32.div_s (get_local $x) (get_local $y))) + (func (export "no_dce.i32.div_u") (param $x i32) (param $y i32) (result i32) + (i32.div_u (get_local $x) (get_local $y))) + (func (export "no_dce.i64.div_s") (param $x i64) (param $y i64) (result i64) + (i64.div_s (get_local $x) (get_local $y))) + (func (export "no_dce.i64.div_u") (param $x i64) (param $y i64) (result i64) + (i64.div_u (get_local $x) (get_local $y))) +) + +(assert_trap (invoke "no_dce.i32.div_s" (i32.const 1) (i32.const 0)) "integer divide by zero") +(assert_trap (invoke "no_dce.i32.div_u" (i32.const 1) (i32.const 0)) "integer divide by zero") +(assert_trap (invoke "no_dce.i64.div_s" (i64.const 1) (i64.const 0)) "integer divide by zero") +(assert_trap (invoke "no_dce.i64.div_u" (i64.const 1) (i64.const 0)) "integer divide by zero") + +(module + (func (export "no_dce.i32.rem_s") (param $x i32) (param $y i32) (result i32) + (i32.rem_s (get_local $x) (get_local $y))) + (func (export "no_dce.i32.rem_u") (param $x i32) (param $y i32) (result i32) + (i32.rem_u (get_local $x) (get_local $y))) + (func (export "no_dce.i64.rem_s") (param $x i64) (param $y i64) (result i64) + (i64.rem_s (get_local $x) (get_local $y))) + (func (export "no_dce.i64.rem_u") (param $x i64) (param $y i64) (result i64) + (i64.rem_u (get_local $x) (get_local $y))) +) + +(assert_trap (invoke "no_dce.i32.rem_s" (i32.const 1) (i32.const 0)) "integer divide by zero") +(assert_trap (invoke "no_dce.i32.rem_u" (i32.const 1) (i32.const 0)) "integer divide by zero") +(assert_trap (invoke "no_dce.i64.rem_s" (i64.const 1) (i64.const 0)) "integer divide by zero") +(assert_trap (invoke "no_dce.i64.rem_u" (i64.const 1) (i64.const 0)) "integer divide by zero") + +(module + (func (export "no_dce.i32.trunc_s_f32") (param $x f32) (result i32) (i32.trunc_s/f32 (get_local $x))) + (func (export "no_dce.i32.trunc_u_f32") (param $x f32) (result i32) (i32.trunc_u/f32 (get_local $x))) + (func (export "no_dce.i32.trunc_s_f64") (param $x f64) (result i32) (i32.trunc_s/f64 (get_local $x))) + (func (export "no_dce.i32.trunc_u_f64") (param $x f64) (result i32) (i32.trunc_u/f64 (get_local $x))) + (func (export "no_dce.i64.trunc_s_f32") (param $x f32) (result i64) (i64.trunc_s/f32 (get_local $x))) + (func (export "no_dce.i64.trunc_u_f32") (param $x f32) (result i64) (i64.trunc_u/f32 (get_local $x))) + (func (export "no_dce.i64.trunc_s_f64") (param $x f64) (result i64) (i64.trunc_s/f64 (get_local $x))) + (func (export "no_dce.i64.trunc_u_f64") (param $x f64) (result i64) (i64.trunc_u/f64 (get_local $x))) +) + +(assert_trap (invoke "no_dce.i32.trunc_s_f32" (f32.const nan)) "invalid conversion to integer") +(assert_trap (invoke "no_dce.i32.trunc_u_f32" (f32.const nan)) "invalid conversion to integer") +(assert_trap (invoke "no_dce.i32.trunc_s_f64" (f64.const nan)) "invalid conversion to integer") +(assert_trap (invoke "no_dce.i32.trunc_u_f64" (f64.const nan)) "invalid conversion to integer") +(assert_trap (invoke "no_dce.i64.trunc_s_f32" (f32.const nan)) "invalid conversion to integer") +(assert_trap (invoke "no_dce.i64.trunc_u_f32" (f32.const nan)) "invalid conversion to integer") +(assert_trap (invoke "no_dce.i64.trunc_s_f64" (f64.const nan)) "invalid conversion to integer") +(assert_trap (invoke "no_dce.i64.trunc_u_f64" (f64.const nan)) "invalid conversion to integer") + +(module + (memory 1) + + (func (export "no_dce.i32.load") (param $i i32) (result i32) (i32.load (get_local $i))) + (func (export "no_dce.i64.load") (param $i i32) (result i64) (i64.load (get_local $i))) + (func (export "no_dce.f32.load") (param $i i32) (result f32) (f32.load (get_local $i))) + (func (export "no_dce.f64.load") (param $i i32) (result f64) (f64.load (get_local $i))) +) + +(assert_trap (invoke "no_dce.i32.load" (i32.const 65536)) "out of bounds memory access") +(assert_trap (invoke "no_dce.i64.load" (i32.const 65536)) "out of bounds memory access") +(assert_trap (invoke "no_dce.f32.load" (i32.const 65536)) "out of bounds memory access") +(assert_trap (invoke "no_dce.f64.load" (i32.const 65536)) "out of bounds memory access") diff --git a/js/src/jit-test/tests/wasm/spec/traps.wast.js b/js/src/jit-test/tests/wasm/spec/traps.wast.js new file mode 100644 index 000000000..2fda59ee2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/traps.wast.js @@ -0,0 +1 @@ +var importedArgs = ['traps.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/typecheck.wast b/js/src/jit-test/tests/wasm/spec/typecheck.wast new file mode 100644 index 000000000..1d15cc567 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/typecheck.wast @@ -0,0 +1,425 @@ +;; TODO: move all tests in this file to appropriate operator-specific files. + +(assert_invalid + (module (func $type-unary-operand-missing + (i32.eqz) (drop) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-unary-operand-missing-in-block + (i32.const 0) + (block (i32.eqz) (drop)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-unary-operand-missing-in-loop + (i32.const 0) + (loop (i32.eqz) (drop)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-unary-operand-missing-in-if + (i32.const 0) (i32.const 0) + (if (then (i32.eqz) (drop))) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-unary-operand-missing-in-else + (i32.const 0) (i32.const 0) + (if i32 (then (i32.const 0)) (else (i32.eqz))) (drop) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-binary-1st-operand-missing + (i32.add) (drop) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-binary-2nd-operand-missing + (i32.const 0) (i32.add) (drop) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-binary-1st-operand-missing-in-block + (i32.const 0) (i32.const 0) + (block (i32.add) (drop)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-binary-2nd-operand-missing-in-block + (i32.const 0) + (block (i32.const 0) (i32.add) (drop)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-binary-1st-operand-missing-in-loop + (i32.const 0) (i32.const 0) + (loop (i32.add) (drop)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-binary-2nd-operand-missing-in-loop + (i32.const 0) + (loop (i32.const 0) (i32.add) (drop)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-binary-1st-operand-missing-in-if + (i32.const 0) (i32.const 0) (i32.const 0) + (if (i32.add) (drop)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-binary-2nd-operand-missing-in-if + (i32.const 0) (i32.const 0) + (if (i32.const 0) (i32.add) (drop)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-binary-1st-operand-missing-in-else + (i32.const 0) (i32.const 0) (i32.const 0) + (if i32 (then (i32.const 0)) (else (i32.add) (i32.const 0))) + (drop) (drop) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-binary-2nd-operand-missing-in-else + (i32.const 0) (i32.const 0) + (if i32 (then (i32.const 0)) (else (i32.add))) + (drop) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-if-operand-missing + (if (then)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-if-operand-missing-in-block + (i32.const 0) + (block (if (then))) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-if-operand-missing-in-loop + (i32.const 0) + (loop (if (then))) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-if-operand-missing-in-if + (i32.const 0) (i32.const 0) + (if (then (if (then)))) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-if-operand-missing-in-else + (i32.const 0) (i32.const 0) + (if i32 (then (i32.const 0)) (else (if (then)) (i32.const 0))) + (drop) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-br-operand-missing + (block i32 (br 0)) + (i32.eqz) (drop) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-br-operand-missing-in-block + (i32.const 0) + (block i32 (br 0)) + (i32.eqz) (drop) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-br-operand-missing-in-if + (block + (i32.const 0) (i32.const 0) + (if i32 (then (br 0))) + ) + (i32.eqz) (drop) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-br-operand-missing-in-else + (block + (i32.const 0) (i32.const 0) + (if i32 (then (i32.const 0)) (else (br 0))) + ) + (i32.eqz) (drop) + )) + "type mismatch" +) + +(assert_invalid + (module (func $type-return-operand-missing (result i32) + (return) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-return-operand-missing-in-block (result i32) + (i32.const 0) + (block (return)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-return-operand-missing-in-loop (result i32) + (i32.const 0) + (loop (return)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-return-operand-missing-in-if (result i32) + (i32.const 0) (i32.const 0) + (if (then (return))) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-return-operand-missing-in-else (result i32) + (i32.const 0) (i32.const 0) + (if i32 (then (i32.const 0)) (else (return))) (drop) + )) + "type mismatch" +) + +;; TODO(stack): more of the above + +;; if condition +(assert_invalid (module (func (if (f32.const 0) (nop) (nop)))) "type mismatch") + +;; br_if condition +(assert_invalid (module (func (block (br_if 0 (f32.const 0))))) "type mismatch") + +;; br_table key +(assert_invalid + (module (func (block (br_table 0 (f32.const 0))))) + "type mismatch") + +;; call params +(assert_invalid (module (func (param i32)) (func (call 0 (f32.const 0)))) "type mismatch") +(assert_invalid + (module + (type (func (param i32))) + (func (type 0)) + (table 0 anyfunc) + (func + (call_indirect 0 (i32.const 0) (f32.const 0)))) + "type mismatch") + +;; call_indirect index +(assert_invalid + (module + (type (func)) + (func (type 0)) + (table 0 anyfunc) + (func (call_indirect 0 (f32.const 0)))) + "type mismatch") + +;; return +(assert_invalid (module (func (result i32) (return (f32.const 0)))) "type mismatch") + +;; set_local +(assert_invalid (module (func (local i32) (set_local 0 (f32.const 0)))) "type mismatch") + +;; load index +(assert_invalid (module (memory 1) (func (i32.load (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i32.load8_s (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i32.load8_u (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i32.load16_s (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i32.load16_u (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i64.load (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i64.load8_s (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i64.load8_u (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i64.load16_s (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i64.load16_u (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i64.load32_s (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i64.load32_u (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (f32.load (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (f64.load (f32.const 0)))) "type mismatch") + +;; store index +(assert_invalid (module (memory 1) (func (i32.store (f32.const 0) (i32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i32.store8 (f32.const 0) (i32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i32.store16 (f32.const 0) (i32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i64.store (f32.const 0) (i32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i64.store8 (f32.const 0) (i64.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i64.store16 (f32.const 0) (i64.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i64.store32 (f32.const 0) (i64.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (f32.store (f32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (f64.store (f32.const 0) (f64.const 0)))) "type mismatch") + +;; store value +(assert_invalid (module (memory 1) (func (i32.store (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i32.store8 (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i32.store16 (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i64.store (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i64.store8 (i32.const 0) (f64.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i64.store16 (i32.const 0) (f64.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (i64.store32 (i32.const 0) (f64.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (f32.store (i32.const 0) (i32.const 0)))) "type mismatch") +(assert_invalid (module (memory 1) (func (f64.store (i32.const 0) (i64.const 0)))) "type mismatch") + +;; binary +(assert_invalid (module (func (i32.add (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.and (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.div_s (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.div_u (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.mul (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.or (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.rem_s (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.rem_u (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.rotl (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.rotr (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.shl (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.shr_s (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.shr_u (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.sub (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.xor (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.add (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.and (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.div_s (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.div_u (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.mul (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.or (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.rem_s (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.rem_u (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.rotl (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.rotr (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.shl (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.shr_s (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.shr_u (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.sub (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.xor (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.add (i64.const 0) (f64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.copysign (i64.const 0) (f64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.div (i64.const 0) (f64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.max (i64.const 0) (f64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.min (i64.const 0) (f64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.mul (i64.const 0) (f64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.sub (i64.const 0) (f64.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.add (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.copysign (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.div (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.max (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.min (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.mul (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.sub (i64.const 0) (f32.const 0)))) "type mismatch") + +;; unary +(assert_invalid (module (func (i32.eqz (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.clz (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.ctz (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.popcnt (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.eqz (i32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.clz (i32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.ctz (i32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.popcnt (i32.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.abs (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.ceil (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.floor (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.nearest (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.neg (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.sqrt (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.trunc (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.abs (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.ceil (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.floor (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.nearest (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.neg (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.sqrt (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.trunc (i64.const 0)))) "type mismatch") + +;; compare +(assert_invalid (module (func (i32.eq (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.ge_s (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.ge_u (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.gt_s (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.gt_u (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.le_s (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.le_u (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.lt_s (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.lt_u (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.ne (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.eq (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.ge_s (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.ge_u (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.gt_s (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.gt_u (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.le_s (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.le_u (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.lt_s (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.lt_u (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.ne (i32.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.eq (i64.const 0) (f64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.ge (i64.const 0) (f64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.gt (i64.const 0) (f64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.le (i64.const 0) (f64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.lt (i64.const 0) (f64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.ne (i64.const 0) (f64.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.eq (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.ge (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.gt (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.le (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.lt (i64.const 0) (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.ne (i64.const 0) (f32.const 0)))) "type mismatch") + +;; convert +(assert_invalid (module (func (i32.wrap/i64 (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.trunc_s/f32 (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.trunc_u/f32 (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.trunc_s/f64 (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.trunc_u/f64 (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (i32.reinterpret/f32 (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.extend_s/i32 (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.extend_u/i32 (f32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.trunc_s/f32 (i32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.trunc_u/f32 (i32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.trunc_s/f64 (i32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.trunc_u/f64 (i32.const 0)))) "type mismatch") +(assert_invalid (module (func (i64.reinterpret/f64 (i32.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.convert_s/i32 (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.convert_u/i32 (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.convert_s/i64 (i32.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.convert_u/i64 (i32.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.demote/f64 (i32.const 0)))) "type mismatch") +(assert_invalid (module (func (f32.reinterpret/i32 (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.convert_s/i32 (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.convert_u/i32 (i64.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.convert_s/i64 (i32.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.convert_u/i64 (i32.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.promote/f32 (i32.const 0)))) "type mismatch") +(assert_invalid (module (func (f64.reinterpret/i64 (i32.const 0)))) "type mismatch") + +;; grow_memory +(assert_invalid (module (memory 1) (func (grow_memory (f32.const 0)))) "type mismatch") diff --git a/js/src/jit-test/tests/wasm/spec/typecheck.wast.js b/js/src/jit-test/tests/wasm/spec/typecheck.wast.js new file mode 100644 index 000000000..5dc46b882 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/typecheck.wast.js @@ -0,0 +1 @@ +var importedArgs = ['typecheck.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/unreachable.wast b/js/src/jit-test/tests/wasm/spec/unreachable.wast new file mode 100644 index 000000000..82efa8fad --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/unreachable.wast @@ -0,0 +1,262 @@ +;; Test `unreachable` operator + +(module + ;; Auxiliary definitions + (func $dummy) + (func $dummy3 (param i32 i32 i32)) + + (func (export "type-i32") (result i32) (unreachable)) + (func (export "type-i64") (result i32) (unreachable)) + (func (export "type-f32") (result f64) (unreachable)) + (func (export "type-f64") (result f64) (unreachable)) + + (func (export "as-func-first") (result i32) + (unreachable) (i32.const -1) + ) + (func (export "as-func-mid") (result i32) + (call $dummy) (unreachable) (i32.const -1) + ) + (func (export "as-func-last") + (call $dummy) (unreachable) + ) + (func (export "as-func-value") (result i32) + (call $dummy) (unreachable) + ) + + (func (export "as-block-first") (result i32) + (block i32 (unreachable) (i32.const 2)) + ) + (func (export "as-block-mid") (result i32) + (block i32 (call $dummy) (unreachable) (i32.const 2)) + ) + (func (export "as-block-last") + (block (nop) (call $dummy) (unreachable)) + ) + (func (export "as-block-value") (result i32) + (block i32 (nop) (call $dummy) (unreachable)) + ) + (func (export "as-block-broke") (result i32) + (block i32 (call $dummy) (br 0 (i32.const 1)) (unreachable)) + ) + + (func (export "as-loop-first") (result i32) + (loop i32 (unreachable) (i32.const 2)) + ) + (func (export "as-loop-mid") (result i32) + (loop i32 (call $dummy) (unreachable) (i32.const 2)) + ) + (func (export "as-loop-last") + (loop (nop) (call $dummy) (unreachable)) + ) + (func (export "as-loop-broke") (result i32) + (block i32 (loop i32 (call $dummy) (br 1 (i32.const 1)) (unreachable))) + ) + + (func (export "as-br-value") (result i32) + (block i32 (br 0 (unreachable))) + ) + + (func (export "as-br_if-cond") + (block (br_if 0 (unreachable))) + ) + (func (export "as-br_if-value") (result i32) + (block i32 (drop (br_if 0 (unreachable) (i32.const 1))) (i32.const 7)) + ) + (func (export "as-br_if-value-cond") (result i32) + (block i32 (drop (br_if 0 (i32.const 6) (unreachable))) (i32.const 7)) + ) + + (func (export "as-br_table-index") + (block (br_table 0 0 0 (unreachable))) + ) + (func (export "as-br_table-value") (result i32) + (block i32 (br_table 0 0 0 (unreachable) (i32.const 1)) (i32.const 7)) + ) + (func (export "as-br_table-value-index") (result i32) + (block i32 (br_table 0 0 (i32.const 6) (unreachable)) (i32.const 7)) + ) + + (func (export "as-return-value") (result i64) + (return (unreachable)) + ) + + (func (export "as-if-cond") (result i32) + (if i32 (unreachable) (i32.const 0) (i32.const 1)) + ) + (func (export "as-if-then") (param i32 i32) (result i32) + (if i32 (get_local 0) (unreachable) (get_local 1)) + ) + (func (export "as-if-else") (param i32 i32) (result i32) + (if i32 (get_local 0) (get_local 1) (unreachable)) + ) + + (func (export "as-select-first") (param i32 i32) (result i32) + (select (unreachable) (get_local 0) (get_local 1)) + ) + (func (export "as-select-second") (param i32 i32) (result i32) + (select (get_local 0) (unreachable) (get_local 1)) + ) + (func (export "as-select-cond") (result i32) + (select (i32.const 0) (i32.const 1) (unreachable)) + ) + + (func (export "as-call-first") + (call $dummy3 (unreachable) (i32.const 2) (i32.const 3)) + ) + (func (export "as-call-mid") + (call $dummy3 (i32.const 1) (unreachable) (i32.const 3)) + ) + (func (export "as-call-last") + (call $dummy3 (i32.const 1) (i32.const 2) (unreachable)) + ) + + (type $sig (func (param i32 i32 i32))) + (table anyfunc (elem $dummy3)) + (func (export "as-call_indirect-func") + (call_indirect $sig (unreachable) (i32.const 1) (i32.const 2) (i32.const 3)) + ) + (func (export "as-call_indirect-first") + (call_indirect $sig (i32.const 0) (unreachable) (i32.const 2) (i32.const 3)) + ) + (func (export "as-call_indirect-mid") + (call_indirect $sig (i32.const 0) (i32.const 1) (unreachable) (i32.const 3)) + ) + (func (export "as-call_indirect-last") + (call_indirect $sig (i32.const 0) (i32.const 1) (i32.const 2) (unreachable)) + ) + + (func (export "as-set_local-value") (local f32) + (set_local 0 (unreachable)) + ) + + (memory 1) + (func (export "as-load-address") (result f32) + (f32.load (unreachable)) + ) + (func (export "as-loadN-address") (result i64) + (i64.load8_s (unreachable)) + ) + + (func (export "as-store-address") + (f64.store (unreachable) (f64.const 7)) + ) + (func (export "as-store-value") + (i64.store (i32.const 2) (unreachable)) + ) + + (func (export "as-storeN-address") + (i32.store8 (unreachable) (i32.const 7)) + ) + (func (export "as-storeN-value") + (i64.store16 (i32.const 2) (unreachable)) + ) + + (func (export "as-unary-operand") (result f32) + (f32.neg (unreachable)) + ) + + (func (export "as-binary-left") (result i32) + (i32.add (unreachable) (i32.const 10)) + ) + (func (export "as-binary-right") (result i64) + (i64.sub (i64.const 10) (unreachable)) + ) + + (func (export "as-test-operand") (result i32) + (i32.eqz (unreachable)) + ) + + (func (export "as-compare-left") (result i32) + (f64.le (unreachable) (f64.const 10)) + ) + (func (export "as-compare-right") (result i32) + (f32.ne (f32.const 10) (unreachable)) + ) + + (func (export "as-convert-operand") (result i32) + (i32.wrap/i64 (unreachable)) + ) + + (func (export "as-grow_memory-size") (result i32) + (grow_memory (unreachable)) + ) +) + +(assert_trap (invoke "type-i32") "unreachable") +(assert_trap (invoke "type-i64") "unreachable") +(assert_trap (invoke "type-f32") "unreachable") +(assert_trap (invoke "type-f64") "unreachable") + +(assert_trap (invoke "as-func-first") "unreachable") +(assert_trap (invoke "as-func-mid") "unreachable") +(assert_trap (invoke "as-func-last") "unreachable") +(assert_trap (invoke "as-func-value") "unreachable") + +(assert_trap (invoke "as-block-first") "unreachable") +(assert_trap (invoke "as-block-mid") "unreachable") +(assert_trap (invoke "as-block-last") "unreachable") +(assert_trap (invoke "as-block-value") "unreachable") +(assert_return (invoke "as-block-broke") (i32.const 1)) + +(assert_trap (invoke "as-loop-first") "unreachable") +(assert_trap (invoke "as-loop-mid") "unreachable") +(assert_trap (invoke "as-loop-last") "unreachable") +(assert_return (invoke "as-loop-broke") (i32.const 1)) + +(assert_trap (invoke "as-br-value") "unreachable") + +(assert_trap (invoke "as-br_if-cond") "unreachable") +(assert_trap (invoke "as-br_if-value") "unreachable") +(assert_trap (invoke "as-br_if-value-cond") "unreachable") + +(assert_trap (invoke "as-br_table-index") "unreachable") +(assert_trap (invoke "as-br_table-value") "unreachable") +(assert_trap (invoke "as-br_table-value-index") "unreachable") + +(assert_trap (invoke "as-return-value") "unreachable") + +(assert_trap (invoke "as-if-cond") "unreachable") +(assert_trap (invoke "as-if-then" (i32.const 1) (i32.const 6)) "unreachable") +(assert_return (invoke "as-if-then" (i32.const 0) (i32.const 6)) (i32.const 6)) +(assert_trap (invoke "as-if-else" (i32.const 0) (i32.const 6)) "unreachable") +(assert_return (invoke "as-if-else" (i32.const 1) (i32.const 6)) (i32.const 6)) + +(assert_trap (invoke "as-select-first" (i32.const 0) (i32.const 6)) "unreachable") +(assert_trap (invoke "as-select-first" (i32.const 1) (i32.const 6)) "unreachable") +(assert_trap (invoke "as-select-second" (i32.const 0) (i32.const 6)) "unreachable") +(assert_trap (invoke "as-select-second" (i32.const 1) (i32.const 6)) "unreachable") +(assert_trap (invoke "as-select-cond") "unreachable") + +(assert_trap (invoke "as-call-first") "unreachable") +(assert_trap (invoke "as-call-mid") "unreachable") +(assert_trap (invoke "as-call-last") "unreachable") + +(assert_trap (invoke "as-call_indirect-func") "unreachable") +(assert_trap (invoke "as-call_indirect-first") "unreachable") +(assert_trap (invoke "as-call_indirect-mid") "unreachable") +(assert_trap (invoke "as-call_indirect-last") "unreachable") + +(assert_trap (invoke "as-set_local-value") "unreachable") + +(assert_trap (invoke "as-load-address") "unreachable") +(assert_trap (invoke "as-loadN-address") "unreachable") + +(assert_trap (invoke "as-store-address") "unreachable") +(assert_trap (invoke "as-store-value") "unreachable") +(assert_trap (invoke "as-storeN-address") "unreachable") +(assert_trap (invoke "as-storeN-value") "unreachable") + +(assert_trap (invoke "as-unary-operand") "unreachable") + +(assert_trap (invoke "as-binary-left") "unreachable") +(assert_trap (invoke "as-binary-right") "unreachable") + +(assert_trap (invoke "as-test-operand") "unreachable") + +(assert_trap (invoke "as-compare-left") "unreachable") +(assert_trap (invoke "as-compare-right") "unreachable") + +(assert_trap (invoke "as-convert-operand") "unreachable") + +(assert_trap (invoke "as-grow_memory-size") "unreachable") + diff --git a/js/src/jit-test/tests/wasm/spec/unreachable.wast.js b/js/src/jit-test/tests/wasm/spec/unreachable.wast.js new file mode 100644 index 000000000..8f8bc0e89 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/unreachable.wast.js @@ -0,0 +1 @@ +var importedArgs = ['unreachable.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/spec/unwind.wast b/js/src/jit-test/tests/wasm/spec/unwind.wast new file mode 100644 index 000000000..b993f2a87 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/unwind.wast @@ -0,0 +1,193 @@ +;; Test that control-flow transfer unwinds stack and it can be anything after. + +(module + (func (export "func-unwind-by-unreachable") + (i32.const 3) (i64.const 1) (unreachable) + ) + (func (export "func-unwind-by-br") + (i32.const 3) (i64.const 1) (br 0) + ) + (func (export "func-unwind-by-br-value") (result i32) + (i32.const 3) (i64.const 1) (br 0 (i32.const 9)) + ) + (func (export "func-unwind-by-br_table") + (i32.const 3) (i64.const 1) (br_table 0 (i32.const 0)) + ) + (func (export "func-unwind-by-br_table-value") (result i32) + (i32.const 3) (i64.const 1) (br_table 0 (i32.const 9) (i32.const 0)) + ) + (func (export "func-unwind-by-return") (result i32) + (i32.const 3) (i64.const 1) (return (i32.const 9)) + ) + + (func (export "block-unwind-by-unreachable") + (block (i32.const 3) (i64.const 1) (unreachable)) + ) + (func (export "block-unwind-by-br") (result i32) + (block (i32.const 3) (i64.const 1) (br 0)) (i32.const 9) + ) + (func (export "block-unwind-by-br-value") (result i32) + (block i32 (i32.const 3) (i64.const 1) (br 0 (i32.const 9))) + ) + (func (export "block-unwind-by-br_table") (result i32) + (block (i32.const 3) (i64.const 1) (br_table 0 (i32.const 0))) (i32.const 9) + ) + (func (export "block-unwind-by-br_table-value") (result i32) + (block i32 + (i32.const 3) (i64.const 1) (br_table 0 (i32.const 9) (i32.const 0)) + ) + ) + (func (export "block-unwind-by-return") (result i32) + (block i32 (i32.const 3) (i64.const 1) (return (i32.const 9))) + ) + + (func (export "block-nested-unwind-by-unreachable") (result i32) + (block i32 (i32.const 3) (block (i64.const 1) (unreachable))) + ) + (func (export "block-nested-unwind-by-br") (result i32) + (block (i32.const 3) (block (i64.const 1) (br 1)) (drop)) (i32.const 9) + ) + (func (export "block-nested-unwind-by-br-value") (result i32) + (block i32 (i32.const 3) (block (i64.const 1) (br 1 (i32.const 9)))) + ) + (func (export "block-nested-unwind-by-br_table") (result i32) + (block + (i32.const 3) (block (i64.const 1) (br_table 1 (i32.const 1))) + (drop) + ) + (i32.const 9) + ) + (func (export "block-nested-unwind-by-br_table-value") (result i32) + (block i32 + (i32.const 3) + (block (i64.const 1) (br_table 1 (i32.const 9) (i32.const 1))) + ) + ) + (func (export "block-nested-unwind-by-return") (result i32) + (block i32 (i32.const 3) (block (i64.const 1) (return (i32.const 9)))) + ) + + (func (export "unary-after-unreachable") (result i32) + (f32.const 0) (unreachable) (i64.eqz) + ) + (func (export "unary-after-br") (result i32) + (block i32 (f32.const 0) (br 0 (i32.const 9)) (i64.eqz)) + ) + (func (export "unary-after-br_table") (result i32) + (block i32 + (f32.const 0) (br_table 0 0 (i32.const 9) (i32.const 0)) (i64.eqz) + ) + ) + (func (export "unary-after-return") (result i32) + (f32.const 0) (return (i32.const 9)) (i64.eqz) + ) + + (func (export "binary-after-unreachable") (result i32) + (f32.const 0) (f64.const 1) (unreachable) (i64.eq) + ) + (func (export "binary-after-br") (result i32) + (block i32 (f32.const 0) (f64.const 1) (br 0 (i32.const 9)) (i64.eq)) + ) + (func (export "binary-after-br_table") (result i32) + (block i32 + (f32.const 0) (f64.const 1) (br_table 0 (i32.const 9) (i32.const 0)) + (i64.eq) + ) + ) + (func (export "binary-after-return") (result i32) + (f32.const 0) (f64.const 1) (return (i32.const 9)) (i64.eq) + ) + + (func (export "select-after-unreachable") (result i32) + (f32.const 0) (f64.const 1) (i64.const 0) (unreachable) (select) + ) + (func (export "select-after-br") (result i32) + (block i32 + (f32.const 0) (f64.const 1) (i64.const 0) (br 0 (i32.const 9)) (select) + ) + ) + (func (export "select-after-br_table") (result i32) + (block i32 + (f32.const 0) (f64.const 1) (i64.const 0) + (br_table 0 (i32.const 9) (i32.const 0)) + (select) + ) + ) + (func (export "select-after-return") (result i32) + (f32.const 0) (f64.const 1) (i64.const 1) (return (i32.const 9)) (select) + ) + + (func (export "block-value-after-unreachable") (result i32) + (block i32 (f32.const 0) (unreachable)) + ) + (func (export "block-value-after-br") (result i32) + (block i32 (f32.const 0) (br 0 (i32.const 9))) + ) + (func (export "block-value-after-br_table") (result i32) + (block i32 (f32.const 0) (br_table 0 0 (i32.const 9) (i32.const 0))) + ) + (func (export "block-value-after-return") (result i32) + (block i32 (f32.const 0) (return (i32.const 9))) + ) + + (func (export "loop-value-after-unreachable") (result i32) + (loop i32 (f32.const 0) (unreachable)) + ) + (func (export "loop-value-after-br") (result i32) + (block i32 (loop i32 (f32.const 0) (br 1 (i32.const 9)))) + ) + (func (export "loop-value-after-br_table") (result i32) + (block i32 + (loop i32 (f32.const 0) (br_table 1 1 (i32.const 9) (i32.const 0))) + ) + ) + (func (export "loop-value-after-return") (result i32) + (loop i32 (f32.const 0) (return (i32.const 9))) + ) +) + +(assert_trap (invoke "func-unwind-by-unreachable") "unreachable") +(assert_return (invoke "func-unwind-by-br")) +(assert_return (invoke "func-unwind-by-br-value") (i32.const 9)) +(assert_return (invoke "func-unwind-by-br_table")) +(assert_return (invoke "func-unwind-by-br_table-value") (i32.const 9)) +(assert_return (invoke "func-unwind-by-return") (i32.const 9)) + +(assert_trap (invoke "block-unwind-by-unreachable") "unreachable") +(assert_return (invoke "block-unwind-by-br") (i32.const 9)) +(assert_return (invoke "block-unwind-by-br-value") (i32.const 9)) +(assert_return (invoke "block-unwind-by-br_table") (i32.const 9)) +(assert_return (invoke "block-unwind-by-br_table-value") (i32.const 9)) +(assert_return (invoke "block-unwind-by-return") (i32.const 9)) + +(assert_trap (invoke "block-nested-unwind-by-unreachable") "unreachable") +(assert_return (invoke "block-nested-unwind-by-br") (i32.const 9)) +(assert_return (invoke "block-nested-unwind-by-br-value") (i32.const 9)) +(assert_return (invoke "block-nested-unwind-by-br_table") (i32.const 9)) +(assert_return (invoke "block-nested-unwind-by-br_table-value") (i32.const 9)) +(assert_return (invoke "block-nested-unwind-by-return") (i32.const 9)) + +(assert_trap (invoke "unary-after-unreachable") "unreachable") +(assert_return (invoke "unary-after-br") (i32.const 9)) +(assert_return (invoke "unary-after-br_table") (i32.const 9)) +(assert_return (invoke "unary-after-return") (i32.const 9)) + +(assert_trap (invoke "binary-after-unreachable") "unreachable") +(assert_return (invoke "binary-after-br") (i32.const 9)) +(assert_return (invoke "binary-after-br_table") (i32.const 9)) +(assert_return (invoke "binary-after-return") (i32.const 9)) + +(assert_trap (invoke "select-after-unreachable") "unreachable") +(assert_return (invoke "select-after-br") (i32.const 9)) +(assert_return (invoke "select-after-br_table") (i32.const 9)) +(assert_return (invoke "select-after-return") (i32.const 9)) + +(assert_trap (invoke "block-value-after-unreachable") "unreachable") +(assert_return (invoke "block-value-after-br") (i32.const 9)) +(assert_return (invoke "block-value-after-br_table") (i32.const 9)) +(assert_return (invoke "block-value-after-return") (i32.const 9)) + +(assert_trap (invoke "loop-value-after-unreachable") "unreachable") +(assert_return (invoke "loop-value-after-br") (i32.const 9)) +(assert_return (invoke "loop-value-after-br_table") (i32.const 9)) +(assert_return (invoke "loop-value-after-return") (i32.const 9)) diff --git a/js/src/jit-test/tests/wasm/spec/unwind.wast.js b/js/src/jit-test/tests/wasm/spec/unwind.wast.js new file mode 100644 index 000000000..a6fd12bc5 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/unwind.wast.js @@ -0,0 +1 @@ +var importedArgs = ['unwind.wast']; load(scriptdir + '../spec.js'); diff --git a/js/src/jit-test/tests/wasm/stack.js b/js/src/jit-test/tests/wasm/stack.js new file mode 100644 index 000000000..63afbbf86 --- /dev/null +++ b/js/src/jit-test/tests/wasm/stack.js @@ -0,0 +1,69 @@ +load(libdir + "wasm.js"); + +// Test instructions with no return value interposed between pushes and pops. +wasmFullPass(` (module + (memory 1) + + (func (result i32) + (local $local f64) + i32.const 0 + i32.const 16 + i32.store + i32.const 0 + i32.load + i32.const 0 + if + i32.const 0 + call $returnVoid + i32.const 21 + i32.store + i32.const 22 + drop + else + i32.const 0 + i32.const 17 + i32.store + end + block i32 + block i32 + i32.const 2 + if i32 + i32.const 500 + else + i32.const 501 + end + end + end + drop + i32.const 0 + i32.load + f64.const 5.0 + set_local $local + f64.const 5.0 + tee_local $local + drop + block + i32.const 0 + i32.const 18 + i32.store + nop + i32.const 0 + i32.const 19 + call $returnVoid + i32.store + loop + i32.const 1 + if + i32.const 0 + i32.const 20 + i32.store + end + end + end + i32.add + ) + + (func $returnVoid) + + (export "run" 0) +)`, 33); diff --git a/js/src/jit-test/tests/wasm/start.js b/js/src/jit-test/tests/wasm/start.js new file mode 100644 index 000000000..507d329b8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/start.js @@ -0,0 +1,51 @@ +load(libdir + "wasm.js"); + +assertErrorMessage(() => wasmEvalText('(module (func) (start 0) (start 0))'), SyntaxError, /wasm text error/); +assertErrorMessage(() => wasmEvalText('(module (func) (start $unknown))'), SyntaxError, /label.*not found/); + +wasmFailValidateText('(module (func) (start 1))', /unknown start function/); +wasmFailValidateText('(module (func (param i32)) (start 0))', /must be nullary/); +wasmFailValidateText('(module (func (param i32) (param f32)) (start 0))', /must be nullary/); +wasmFailValidateText('(module (func (param i32) (param f32) (param f64)) (start 0))', /must be nullary/); +wasmFailValidateText('(module (func (result f32)) (start 0))', /must not return anything/); + +// Basic use case. +var count = 0; +function inc() { count++; } +var exports = wasmEvalText(`(module (import $imp "" "inc") (func $f (call $imp)) (start $f))`, { "":{inc} }).exports; +assertEq(count, 1); +assertEq(Object.keys(exports).length, 0); + +count = 0; +exports = wasmEvalText(`(module (import "" "inc") (func $start (call 0)) (start $start) (export "" 0))`, { "":{inc} }).exports; +assertEq(count, 1); +assertEq(typeof exports[""], 'function'); +assertEq(exports[""](), undefined); +assertEq(count, 2); + +// New API. +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; + +count = 0; +const m = new Module(wasmTextToBinary('(module (import $imp "" "inc") (func) (func $start (call $imp)) (start $start) (export "" $start))')); +assertEq(count, 0); + +assertErrorMessage(() => new Instance(m), TypeError, /second argument must be an object/); +assertEq(count, 0); + +const i1 = new Instance(m, { "":{inc} }); +assertEq(count, 1); +i1.exports[""](); +assertEq(count, 2); + +const i2 = new Instance(m, { "":{inc} }); +assertEq(count, 3); + +function fail() { assertEq(true, false); } + +count = 0; +const m2 = new Module(wasmTextToBinary('(module (import "" "fail") (import $imp "" "inc") (func) (start $imp))')); +assertEq(count, 0); +new Instance(m2, {"":{ inc, fail }}); +assertEq(count, 1); diff --git a/js/src/jit-test/tests/wasm/stealing.js b/js/src/jit-test/tests/wasm/stealing.js new file mode 100644 index 000000000..2da431e28 --- /dev/null +++ b/js/src/jit-test/tests/wasm/stealing.js @@ -0,0 +1,19 @@ +load(libdir + "wasm.js"); + +var exp = wasmEvalText(`(module + (memory 1) + (export "mem" memory) + (func $f (result i32) (i32.load (i32.const 0))) + (export "f" $f) +)`).exports; + +var ab = exp.mem.buffer; +new Int32Array(ab)[0] = 42; + +assertEq(exp.f(), 42); + +assertThrowsInstanceOf(() => detachArrayBuffer(ab), Error); +assertEq(exp.f(), 42); + +assertThrowsInstanceOf(() => serialize(ab, [ab]), Error); +assertEq(exp.f(), 42); diff --git a/js/src/jit-test/tests/wasm/table-gc.js b/js/src/jit-test/tests/wasm/table-gc.js new file mode 100644 index 000000000..0cce3edf8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/table-gc.js @@ -0,0 +1,221 @@ +// |jit-test| --no-baseline +// Turn off baseline and since it messes up the GC finalization assertions by +// adding spurious edges to the GC graph. + +load(libdir + 'wasm.js'); + +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; +const Table = WebAssembly.Table; +const RuntimeError = WebAssembly.RuntimeError; + +var caller = `(type $v2i (func (result i32))) (func $call (param $i i32) (result i32) (call_indirect $v2i (get_local $i))) (export "call" $call)` +var callee = i => `(func $f${i} (type $v2i) (i32.const ${i}))`; + +// A table should not hold exported functions alive and exported functions +// should not hold their originating table alive. Live exported functions should +// hold instances alive and instances hold imported tables alive. Nothing +// should hold the export object alive. +resetFinalizeCount(); +var i = wasmEvalText(`(module (table 2 anyfunc) (export "tbl" table) (elem (i32.const 0) $f0) ${callee(0)} ${caller})`); +var e = i.exports; +var t = e.tbl; +var f = t.get(0); +assertEq(f(), e.call(0)); +assertErrorMessage(() => e.call(1), RuntimeError, /indirect call to null/); +assertErrorMessage(() => e.call(2), RuntimeError, /index out of bounds/); +assertEq(finalizeCount(), 0); +i.edge = makeFinalizeObserver(); +t.edge = makeFinalizeObserver(); +f.edge = makeFinalizeObserver(); +gc(); +assertEq(finalizeCount(), 0); +f = null; +gc(); +assertEq(finalizeCount(), 1); +f = t.get(0); +f.edge = makeFinalizeObserver(); +gc(); +assertEq(finalizeCount(), 1); +i.exports = null; +e = null; +gc(); +assertEq(finalizeCount(), 1); +t = null; +gc(); +assertEq(finalizeCount(), 1); +i = null; +gc(); +assertEq(finalizeCount(), 1); +assertEq(f(), 0); +f = null; +gc(); +assertEq(finalizeCount(), 4); + +// A table should hold the instance of any of its elements alive. +resetFinalizeCount(); +var i = wasmEvalText(`(module (table 1 anyfunc) (export "tbl" table) (elem (i32.const 0) $f0) ${callee(0)} ${caller})`); +var e = i.exports; +var t = e.tbl; +var f = t.get(0); +i.edge = makeFinalizeObserver(); +t.edge = makeFinalizeObserver(); +f.edge = makeFinalizeObserver(); +gc(); +assertEq(finalizeCount(), 0); +i.exports = null; +e = null; +gc(); +assertEq(finalizeCount(), 0); +f = null; +gc(); +assertEq(finalizeCount(), 1); +i = null; +gc(); +assertEq(finalizeCount(), 1); +t = null; +gc(); +assertEq(finalizeCount(), 3); + +// Null elements shouldn't keep anything alive. +resetFinalizeCount(); +var i = wasmEvalText(`(module (table 2 anyfunc) (export "tbl" table) ${caller})`); +var e = i.exports; +var t = e.tbl; +i.edge = makeFinalizeObserver(); +t.edge = makeFinalizeObserver(); +gc(); +assertEq(finalizeCount(), 0); +i.exports = null; +e = null; +gc(); +assertEq(finalizeCount(), 0); +i = null; +gc(); +assertEq(finalizeCount(), 1); +t = null; +gc(); +assertEq(finalizeCount(), 2); + +// Before initialization, a table is not bound to any instance. +resetFinalizeCount(); +var i = wasmEvalText(`(module (func $f0 (result i32) (i32.const 0)) (export "f0" $f0))`); +var t = new Table({initial:4, element:"anyfunc"}); +i.edge = makeFinalizeObserver(); +t.edge = makeFinalizeObserver(); +gc(); +assertEq(finalizeCount(), 0); +i = null; +gc(); +assertEq(finalizeCount(), 1); +t = null; +gc(); +assertEq(finalizeCount(), 2); + +// When a Table is created (uninitialized) and then first assigned, it keeps the +// first element's Instance alive (as above). +resetFinalizeCount(); +var i = wasmEvalText(`(module (func $f (result i32) (i32.const 42)) (export "f" $f))`); +var f = i.exports.f; +var t = new Table({initial:1, element:"anyfunc"}); +i.edge = makeFinalizeObserver(); +f.edge = makeFinalizeObserver(); +t.edge = makeFinalizeObserver(); +t.set(0, f); +assertEq(t.get(0), f); +assertEq(t.get(0)(), 42); +gc(); +assertEq(finalizeCount(), 0); +f = null; +i.exports = null; +gc(); +assertEq(finalizeCount(), 1); +assertEq(t.get(0)(), 42); +t.get(0).edge = makeFinalizeObserver(); +gc(); +assertEq(finalizeCount(), 2); +i = null; +gc(); +assertEq(finalizeCount(), 2); +t.set(0, null); +assertEq(t.get(0), null); +gc(); +assertEq(finalizeCount(), 3); +t = null; +gc(); +assertEq(finalizeCount(), 4); + +// Once all of an instance's elements in a Table have been clobbered, the +// Instance should not be reachable. +resetFinalizeCount(); +var i1 = wasmEvalText(`(module (func $f1 (result i32) (i32.const 13)) (export "f1" $f1))`); +var i2 = wasmEvalText(`(module (func $f2 (result i32) (i32.const 42)) (export "f2" $f2))`); +var f1 = i1.exports.f1; +var f2 = i2.exports.f2; +var t = new Table({initial:2, element:"anyfunc"}); +i1.edge = makeFinalizeObserver(); +i2.edge = makeFinalizeObserver(); +f1.edge = makeFinalizeObserver(); +f2.edge = makeFinalizeObserver(); +t.edge = makeFinalizeObserver(); +t.set(0, f1); +t.set(1, f2); +gc(); +assertEq(finalizeCount(), 0); +f1 = f2 = null; +i1.exports = null; +i2.exports = null; +gc(); +assertEq(finalizeCount(), 2); +i1 = null; +i2 = null; +gc(); +assertEq(finalizeCount(), 2); +t.set(0, t.get(1)); +gc(); +assertEq(finalizeCount(), 3); +t = null; +gc(); +assertEq(finalizeCount(), 5); + +// Ensure that an instance that is only live on the stack cannot be GC even if +// there are no outstanding references. +resetFinalizeCount(); +const N = 10; +var tbl = new Table({initial:N, element:"anyfunc"}); +tbl.edge = makeFinalizeObserver(); +function runTest() { + tbl = null; + gc(); + assertEq(finalizeCount(), 0); + return 100; +} +var i = wasmEvalText( + `(module + (import $imp "a" "b" (result i32)) + (func $f (param i32) (result i32) (call $imp)) + (export "f" $f) + )`, + {a:{b:runTest}} +); +i.edge = makeFinalizeObserver(); +tbl.set(0, i.exports.f); +var m = new Module(wasmTextToBinary(`(module + (import "a" "b" (table ${N} anyfunc)) + (type $i2i (func (param i32) (result i32))) + (func $f (param $i i32) (result i32) + (set_local $i (i32.sub (get_local $i) (i32.const 1))) + (i32.add + (i32.const 1) + (call_indirect $i2i (get_local $i) (get_local $i)))) + (export "f" $f) +)`)); +for (var i = 1; i < N; i++) { + var inst = new Instance(m, {a:{b:tbl}}); + inst.edge = makeFinalizeObserver(); + tbl.set(i, inst.exports.f); +} +inst = null; +assertEq(tbl.get(N - 1)(N - 1), 109); +gc(); +assertEq(finalizeCount(), N + 1); diff --git a/js/src/jit-test/tests/wasm/table-pre-barrier.js b/js/src/jit-test/tests/wasm/table-pre-barrier.js new file mode 100644 index 000000000..a0d4fc9c0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/table-pre-barrier.js @@ -0,0 +1,24 @@ +load(libdir + "wasm.js"); + +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; +const Table = WebAssembly.Table; + +var i42 = new Instance(new Module(wasmTextToBinary(`(module (func (result i32) (i32.const 42)) (export "f" 0))`))); +var i13 = new Instance(new Module(wasmTextToBinary(`(module (func (result i32) (i32.const 13)) (export "f" 0))`))); +var t = new Table({element:"anyfunc", initial:1}); +t.set(0, i42.exports.f); + +assertEq(t.get(0)(), 42); + +verifyprebarriers(); +t.set(0, i13.exports.f); +verifyprebarriers(); + +assertEq(t.get(0)(), 13); + +verifyprebarriers(); +t.set(0, null); +verifyprebarriers(); + +assertEq(t.get(0), null); diff --git a/js/src/jit-test/tests/wasm/tables.js b/js/src/jit-test/tests/wasm/tables.js new file mode 100644 index 000000000..d8defeb9c --- /dev/null +++ b/js/src/jit-test/tests/wasm/tables.js @@ -0,0 +1,198 @@ +load(libdir + 'wasm.js'); + +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; +const Table = WebAssembly.Table; +const Memory = WebAssembly.Memory; +const RuntimeError = WebAssembly.RuntimeError; + +var callee = i => `(func $f${i} (result i32) (i32.const ${i}))`; + +wasmFailValidateText(`(module (elem (i32.const 0) $f0) ${callee(0)})`, /table index out of range/); +wasmFailValidateText(`(module (table 10 anyfunc) (elem (i32.const 0) 0))`, /table element out of range/); +wasmFailValidateText(`(module (table 10 anyfunc) (func) (elem (i32.const 0) 0 1))`, /table element out of range/); +wasmFailValidateText(`(module (table 10 anyfunc) (func) (elem (f32.const 0) 0) ${callee(0)})`, /type mismatch/); + +assertErrorMessage(() => wasmEvalText(`(module (table 10 anyfunc) (elem (i32.const 10) $f0) ${callee(0)})`), RangeError, /elem segment does not fit/); +assertErrorMessage(() => wasmEvalText(`(module (table 10 anyfunc) (elem (i32.const 8) $f0 $f0 $f0) ${callee(0)})`), RangeError, /elem segment does not fit/); +wasmEvalText(`(module (table 0 anyfunc) (func) (elem (i32.const 0x10001)))`); + +assertErrorMessage(() => wasmEvalText(`(module (table 10 anyfunc) (import "globals" "a" (global i32)) (elem (get_global 0) $f0) ${callee(0)})`, {globals:{a:10}}), RangeError, /elem segment does not fit/); +assertErrorMessage(() => wasmEvalText(`(module (table 10 anyfunc) (import "globals" "a" (global i32)) (elem (get_global 0) $f0 $f0 $f0) ${callee(0)})`, {globals:{a:8}}), RangeError, /elem segment does not fit/); + +assertEq(new Module(wasmTextToBinary(`(module (table 10 anyfunc) (elem (i32.const 1) $f0 $f0) (elem (i32.const 0) $f0) ${callee(0)})`)) instanceof Module, true); +assertEq(new Module(wasmTextToBinary(`(module (table 10 anyfunc) (elem (i32.const 1) $f0 $f0) (elem (i32.const 2) $f0) ${callee(0)})`)) instanceof Module, true); +wasmEvalText(`(module (table 10 anyfunc) (import "globals" "a" (global i32)) (elem (i32.const 1) $f0 $f0) (elem (get_global 0) $f0) ${callee(0)})`, {globals:{a:0}}); +wasmEvalText(`(module (table 10 anyfunc) (import "globals" "a" (global i32)) (elem (get_global 0) $f0 $f0) (elem (i32.const 2) $f0) ${callee(0)})`, {globals:{a:1}}); + +var m = new Module(wasmTextToBinary(` + (module + (import "globals" "table" (table 10 anyfunc)) + (import "globals" "a" (global i32)) + (elem (get_global 0) $f0 $f0) + ${callee(0)}) +`)); +var tbl = new Table({initial:50, element:"anyfunc"}); +assertEq(new Instance(m, {globals:{a:20, table:tbl}}) instanceof Instance, true); +assertErrorMessage(() => new Instance(m, {globals:{a:50, table:tbl}}), RangeError, /elem segment does not fit/); + +var caller = `(type $v2i (func (result i32))) (func $call (param $i i32) (result i32) (call_indirect $v2i (get_local $i))) (export "call" $call)` +var callee = i => `(func $f${i} (type $v2i) (i32.const ${i}))`; + +var call = wasmEvalText(`(module (table 10 anyfunc) ${callee(0)} ${caller})`).exports.call; +assertErrorMessage(() => call(0), RuntimeError, /indirect call to null/); +assertErrorMessage(() => call(10), RuntimeError, /index out of bounds/); + +var call = wasmEvalText(`(module (table 10 anyfunc) (elem (i32.const 0)) ${callee(0)} ${caller})`).exports.call; +assertErrorMessage(() => call(0), RuntimeError, /indirect call to null/); +assertErrorMessage(() => call(10), RuntimeError, /index out of bounds/); + +var call = wasmEvalText(`(module (table 10 anyfunc) (elem (i32.const 0) $f0) ${callee(0)} ${caller})`).exports.call; +assertEq(call(0), 0); +assertErrorMessage(() => call(1), RuntimeError, /indirect call to null/); +assertErrorMessage(() => call(2), RuntimeError, /indirect call to null/); +assertErrorMessage(() => call(10), RuntimeError, /index out of bounds/); + +var call = wasmEvalText(`(module (table 10 anyfunc) (elem (i32.const 1) $f0 $f1) (elem (i32.const 4) $f0 $f2) ${callee(0)} ${callee(1)} ${callee(2)} ${caller})`).exports.call; +assertErrorMessage(() => call(0), RuntimeError, /indirect call to null/); +assertEq(call(1), 0); +assertEq(call(2), 1); +assertErrorMessage(() => call(3), RuntimeError, /indirect call to null/); +assertEq(call(4), 0); +assertEq(call(5), 2); +assertErrorMessage(() => call(6), RuntimeError, /indirect call to null/); +assertErrorMessage(() => call(10), RuntimeError, /index out of bounds/); + +var imports = {a:{b:()=>42}}; +var call = wasmEvalText(`(module (table 10 anyfunc) (elem (i32.const 0) $f0 $f1 $f2) ${callee(0)} (import "a" "b" (func $f1)) (import "a" "b" (func $f2 (result i32))) ${caller})`, imports).exports.call; +assertEq(call(0), 0); +assertErrorMessage(() => call(1), RuntimeError, /indirect call signature mismatch/); +assertEq(call(2), 42); + +var tbl = new Table({initial:3, element:"anyfunc"}); +var call = wasmEvalText(`(module (import "a" "b" (table 3 anyfunc)) (export "tbl" table) (elem (i32.const 0) $f0 $f1) ${callee(0)} ${callee(1)} ${caller})`, {a:{b:tbl}}).exports.call; +assertEq(call(0), 0); +assertEq(call(1), 1); +assertEq(tbl.get(0)(), 0); +assertEq(tbl.get(1)(), 1); +assertErrorMessage(() => call(2), RuntimeError, /indirect call to null/); +assertEq(tbl.get(2), null); + +var exp = wasmEvalText(`(module (import "a" "b" (table 3 anyfunc)) (export "tbl" table) (elem (i32.const 2) $f2) ${callee(2)} ${caller})`, {a:{b:tbl}}).exports; +assertEq(exp.tbl, tbl); +assertEq(exp.call(0), 0); +assertEq(exp.call(1), 1); +assertEq(exp.call(2), 2); +assertEq(call(0), 0); +assertEq(call(1), 1); +assertEq(call(2), 2); +assertEq(tbl.get(0)(), 0); +assertEq(tbl.get(1)(), 1); +assertEq(tbl.get(2)(), 2); + +var exp1 = wasmEvalText(`(module (table 10 anyfunc) (export "tbl" table) (elem (i32.const 0) $f0 $f0) ${callee(0)} (export "f0" $f0) ${caller})`).exports +assertEq(exp1.tbl.get(0), exp1.f0); +assertEq(exp1.tbl.get(1), exp1.f0); +assertEq(exp1.tbl.get(2), null); +assertEq(exp1.call(0), 0); +assertEq(exp1.call(1), 0); +assertErrorMessage(() => exp1.call(2), RuntimeError, /indirect call to null/); +var exp2 = wasmEvalText(`(module (import "a" "b" (table 10 anyfunc)) (export "tbl" table) (elem (i32.const 1) $f1 $f1) ${callee(1)} (export "f1" $f1) ${caller})`, {a:{b:exp1.tbl}}).exports +assertEq(exp1.tbl, exp2.tbl); +assertEq(exp2.tbl.get(0), exp1.f0); +assertEq(exp2.tbl.get(1), exp2.f1); +assertEq(exp2.tbl.get(2), exp2.f1); +assertEq(exp1.call(0), 0); +assertEq(exp1.call(1), 1); +assertEq(exp1.call(2), 1); +assertEq(exp2.call(0), 0); +assertEq(exp2.call(1), 1); +assertEq(exp2.call(2), 1); + +var tbl = new Table({initial:3, element:"anyfunc"}); +var e1 = wasmEvalText(`(module (func $f (result i32) (i32.const 42)) (export "f" $f))`).exports; +var e2 = wasmEvalText(`(module (func $g (result f32) (f32.const 10)) (export "g" $g))`).exports; +var e3 = wasmEvalText(`(module (func $h (result i32) (i32.const 13)) (export "h" $h))`).exports; +tbl.set(0, e1.f); +tbl.set(1, e2.g); +tbl.set(2, e3.h); +var e4 = wasmEvalText(`(module (import "a" "b" (table 3 anyfunc)) ${caller})`, {a:{b:tbl}}).exports; +assertEq(e4.call(0), 42); +assertErrorMessage(() => e4.call(1), RuntimeError, /indirect call signature mismatch/); +assertEq(e4.call(2), 13); + +var m = new Module(wasmTextToBinary(`(module + (type $i2i (func (param i32) (result i32))) + (import "a" "mem" (memory 1)) + (import "a" "tbl" (table 10 anyfunc)) + (import $imp "a" "imp" (result i32)) + (func $call (param $i i32) (result i32) + (i32.add + (call $imp) + (i32.add + (i32.load (i32.const 0)) + (if i32 (i32.eqz (get_local $i)) + (then (i32.const 0)) + (else + (set_local $i (i32.sub (get_local $i) (i32.const 1))) + (call_indirect $i2i (get_local $i) (get_local $i))))))) + (export "call" $call) +)`)); +var failTime = false; +var tbl = new Table({initial:10, element:"anyfunc"}); +var mem1 = new Memory({initial:1}); +var e1 = new Instance(m, {a:{mem:mem1, tbl, imp() {if (failTime) throw new Error("ohai"); return 1}}}).exports; +tbl.set(0, e1.call); +var mem2 = new Memory({initial:1}); +var e2 = new Instance(m, {a:{mem:mem2, tbl, imp() {return 10} }}).exports; +tbl.set(1, e2.call); +var mem3 = new Memory({initial:1}); +var e3 = new Instance(m, {a:{mem:mem3, tbl, imp() {return 100} }}).exports; +new Int32Array(mem1.buffer)[0] = 1000; +new Int32Array(mem2.buffer)[0] = 10000; +new Int32Array(mem3.buffer)[0] = 100000; +assertEq(e3.call(2), 111111); +failTime = true; +assertErrorMessage(() => e3.call(2), Error, "ohai"); + +// Call signatures are matched structurally: + +var call = wasmEvalText(`(module + (type $v2i1 (func (result i32))) + (type $v2i2 (func (result i32))) + (type $i2v (func (param i32))) + (table anyfunc (elem $a $b $c)) + (func $a (type $v2i1) (i32.const 0)) + (func $b (type $v2i2) (i32.const 1)) + (func $c (type $i2v)) + (func $call (param i32) (result i32) (call_indirect $v2i1 (get_local 0))) + (export "call" $call) +)`).exports.call; +assertEq(call(0), 0); +assertEq(call(1), 1); +assertErrorMessage(() => call(2), RuntimeError, /indirect call signature mismatch/); + +var call = wasmEvalText(`(module + (type $A (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32))) + (type $B (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32))) + (type $C (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32))) + (type $D (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32))) + (type $E (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32))) + (type $F (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32))) + (type $G (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32))) + (table anyfunc (elem $a $b $c $d $e $f $g)) + (func $a (type $A) (get_local 7)) + (func $b (type $B) (get_local 8)) + (func $c (type $C) (get_local 9)) + (func $d (type $D) (get_local 10)) + (func $e (type $E) (get_local 11)) + (func $f (type $F) (get_local 12)) + (func $g (type $G) (get_local 13)) + (func $call (param i32) (result i32) + (call_indirect $A (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 42) (get_local 0))) + (export "call" $call) +)`).exports.call; +assertEq(call(0), 42); +for (var i = 1; i < 7; i++) + assertErrorMessage(() => call(i), RuntimeError, /indirect call signature mismatch/); +assertErrorMessage(() => call(7), RuntimeError, /index out of bounds/); diff --git a/js/src/jit-test/tests/wasm/text.js b/js/src/jit-test/tests/wasm/text.js new file mode 100644 index 000000000..64dd4d764 --- /dev/null +++ b/js/src/jit-test/tests/wasm/text.js @@ -0,0 +1,126 @@ +load(libdir + "wasm.js"); + +var parsingError = /parsing wasm text at/; + +assertErrorMessage(() => wasmEvalText(''), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('('), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(m'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(moduler'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (func) (export "a'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (func (local $a i32) (param $b f32)))'), SyntaxError, parsingError); + +assertErrorMessage(() => wasmEvalText('(module (func $a) (func) (export "a" $a) (export "b" $b))'), SyntaxError, /Function label '\$b' not found/); +assertErrorMessage(() => wasmEvalText('(module (import $foo "a" "b") (import $foo "a" "b"))'), SyntaxError, /duplicate import/); +assertErrorMessage(() => wasmEvalText('(module (func $foo) (func $foo))'), SyntaxError, /duplicate function/); +assertErrorMessage(() => wasmEvalText('(module (func (param $a i32) (local $a i32)))'), SyntaxError, /duplicate var/); +assertErrorMessage(() => wasmEvalText('(module (func (get_local $a)))'), SyntaxError, /Local label '\$a' not found/); +assertErrorMessage(() => wasmEvalText('(module (type $a (func)) (type $a (func (param i32))))'), SyntaxError, /duplicate signature/); +assertErrorMessage(() => wasmEvalText('(module (import "a" "") (func (call $abc)))'), SyntaxError, /Function label '\$abc' not found/); +assertErrorMessage(() => wasmEvalText('(module (type $a (func)) (func (type $b) (i32.const 13)))'), SyntaxError, /Signature label '\$b' not found/); +assertErrorMessage(() => wasmEvalText('(module (type $a (func)) (func (call_indirect $c (i32.const 0) (get_local 0))))'), SyntaxError, /Signature label '\$c' not found/); +assertErrorMessage(() => wasmEvalText('(module (func (br $a)))'), SyntaxError, /branch target label '\$a' not found/); +assertErrorMessage(() => wasmEvalText('(module (func (block $a ) (br $a)))'), SyntaxError, /branch target label '\$a' not found/); + +wasmEvalText('(module (func (param $a i32)))'); +wasmEvalText('(module (func (param i32)))'); +wasmEvalText('(module (func (param i32 i32 f32 f64 i32)))'); +assertErrorMessage(() => wasmEvalText('(module (func (param $a)))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (func (param $a i32 i32)))'), SyntaxError, parsingError); + +wasmEvalText('(module (func (local $a i32)))'); +wasmEvalText('(module (func (local i32)))'); +wasmEvalText('(module (func (local i32 i32 f32 f64 i32)))'); +assertErrorMessage(() => wasmEvalText('(module (func (local $a)))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (func (local $a i32 i32)))'), SyntaxError, parsingError); + +// Table +assertErrorMessage(() => wasmEvalText('(module (table (local $a)))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (table $t))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (table $t 1))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (table $t 1 10))'), SyntaxError, parsingError); +wasmEvalText('(module (table $t 1 10 anyfunc))'); +wasmEvalText('(module (table $t 1 anyfunc))'); +wasmEvalText('(module (table 0 anyfunc))'); + +assertErrorMessage(() => wasmEvalText('(module (table $t anyfunc))'), SyntaxError, parsingError); +wasmEvalText('(module (table $t anyfunc (elem)))'); +wasmEvalText('(module (func) (table $t anyfunc (elem 0 0 0)))'); + +const { Table } = WebAssembly; +const table = new Table({initial:1, element:"anyfunc"}); +assertErrorMessage(() => wasmEvalText('(module (table $t (import) 1 anyfunc))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (table $t (import "mod") 1 anyfunc))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (table $t (import "mod" "field") 1 anyfunc (elem 1 2 3)))'), SyntaxError, parsingError); +wasmEvalText('(module (table $t (import "mod" "field") 1 anyfunc))', {mod: {field: table}}); + +assertErrorMessage(() => wasmEvalText('(module (table $t (export "mod") 1))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (table $t (export "mod") anyfunc))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (table $t (export "mod") anyfunc 1 2 3))'), SyntaxError, parsingError); +assertEq(wasmEvalText('(module (table $t (export "tbl") anyfunc (elem)))').exports.tbl instanceof Table, true); +assertEq(wasmEvalText('(module (func) (table $t (export "tbl") anyfunc (elem 0 0 0)))').exports.tbl instanceof Table, true); + +// Functions. +assertErrorMessage(() => wasmEvalText('(module (func $t import))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (func $t (import)))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (func $t (import "mod")))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (func $t (import "mod" "func" (local i32))))'), SyntaxError, parsingError); + +const func = i => 42 + i; +wasmEvalText('(module (func $t (import "mod" "func")))', { mod: {func} }); +wasmEvalText('(module (func $t (import "mod" "func")(param i32)))', { mod: {func} }); +wasmEvalText('(module (func $t (import "mod" "func")(result i32)))', { mod: {func} }); +wasmEvalText('(module (func $t (import "mod" "func")(param i32) (result i32)))', { mod: {func} }); +wasmEvalText('(module (func $t (import "mod" "func")(result i32) (param i32)))', { mod: {func} }); + +assertErrorMessage(() => wasmEvalText('(module (func $t (import "mod" "func") (type)))', { mod: {func} }), SyntaxError, parsingError); +wasmEvalText('(module (type $t (func)) (func $t (import "mod" "func") (type $t)))', { mod: {func} }); + +assertErrorMessage(() => wasmEvalText('(module (func $t (export))))'), SyntaxError, parsingError); +wasmEvalText('(module (func (export "f")))'); +wasmEvalText('(module (func $f (export "f")))'); +wasmEvalText('(module (func $f (export "f") (result i32) (param i32) (i32.add (get_local 0) (i32.const 42))))'); + +assertErrorMessage(() => wasmEvalText(` + (module + (type $tf (func (param i32) (result i32))) + (func (import "mod" "a") (type $tf)) + (func (export "f1")) + (func (import "mod" "b") (type $tf)) + (func (export "f2")) + ) +`), SyntaxError, /import after function definition/); + +// Globals. +assertErrorMessage(() => wasmEvalText('(module (global $t (export)))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (global $t (export "g")))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (global $t (export "g") i32))'), SyntaxError, parsingError); +wasmEvalText('(module (global $t (export "g") i32 (i32.const 42)))'); + +assertErrorMessage(() => wasmEvalText('(module (global $t (import) i32))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (global $t (import "mod") i32))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (global $t (import "mod" "field")))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (global $t (import "mod" "field")) i32 (i32.const 42))'), SyntaxError, parsingError); +wasmEvalText('(module (global $t (import "mod" "field") i32))', { mod: {field: 42} }); + +assertErrorMessage(() => wasmEvalText(` + (module + (global (import "mod" "a") i32) + (global (export "f1") i32 (i32.const 42)) + (global (import "mod" "b") i32) + ) +`), SyntaxError, /import after global definition/); + +// Memory. +assertErrorMessage(() => wasmEvalText('(module (memory (export)))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (memory (export "g")))'), SyntaxError, parsingError); +wasmEvalText('(module (memory $t (export "g") 0))'); + +const mem = new WebAssembly.Memory({ initial: 1 }); +assertErrorMessage(() => wasmEvalText('(module (memory $t (import) 1))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (memory $t (import "mod") 1))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (memory $t (import "mod" "field")))'), SyntaxError, parsingError); +wasmEvalText('(module (memory $t (import "mod" "field") 1))', { mod: {field: mem} }); + +// Note: the s-expression text format is temporary, this file is mostly just to +// hold basic error smoke tests. diff --git a/js/src/jit-test/tests/wasm/to-text-experimental.js b/js/src/jit-test/tests/wasm/to-text-experimental.js new file mode 100644 index 000000000..aca5de308 --- /dev/null +++ b/js/src/jit-test/tests/wasm/to-text-experimental.js @@ -0,0 +1,224 @@ +load(libdir + "wasm.js"); + +assertErrorMessage(() => wasmBinaryToText(wasmTextToBinary(`(module (func (result i32) (f32.const 13.37)))`), 'experimental'), WebAssembly.CompileError, /type mismatch/); + +function runTest(code, expected) { + var binary = wasmTextToBinary(code); + var s = wasmBinaryToText(binary, "experimental"); + s = s.replace(/\s+/g, ' '); + print("TEXT: " + s); + assertEq(s, expected); +} + +// Smoke test +runTest(` +(module + (func (param i32) (result f64) + (local $l f32) + (block + (set_local $l (f32.const 0.0)) + (loop $exit $cont + (br_if $exit (get_local 0)) + (br 2) + ) + (drop (if f64 (i32.const 1) + (f64.min (f64.neg (f64.const 1)) (f64.const 0)) + (f64.add (f64.const 0.5) (f64.load offset=0 (i32.const 0)) ) + )) + ) + (i32.store16 (i32.const 8) (i32.const 128)) + + (return (f64.const 0)) + ) + (export "test" 0) + (memory 1 10) +)`, +"type $type0 of function (i32) : (f64); " + +"export $func0 as \"test\"; " + +"function $func0($var0: i32) : (f64) {" + +" var $var1: f32; { $var1 = 0.0f; { loop { br_if ($var0) $label0; br $label1; } $label0: };" + +" if (1) { f64.min(-1.0, 0.0) } else { 0.5 + f64[0] }; $label1: };" + +" i32:16[8] = 128; return 0.0; "+ +"} memory 1, 10 {} "); + +wasmFailValidateText( +`(module + (func (param i32) (result f64) + (local $l f32) + (block + (set_local $l (f32.const 0.0)) + (loop $cont + (br_if $cont (get_local 0)) + (br 2) + ) + (drop (if f64 (i32.const 1) + (f64.min (f64.neg (f64.const 1)) (f64.const 0)) + (f64.add (f64.const 0.5) (f64.load offset=0 (i32.const 0)) ) + )) + ) + (i32.store16 (i32.const 8) (i32.const 128)) + + (return (f64.const 0)) + ) + (export "test" 0) + (memory 1 10) +)`, /popping value from empty stack/); + +// function calls +runTest(` +(module + (type $type1 (func (param i32) (result i32))) + (import $import1 "mod" "test" (param f32) (result f32)) + (table anyfunc (elem $func1 $func2)) + (func $func1 (param i32) (param f32) (nop)) + (func $func2 (param i32) (result i32) (get_local 0)) + (func $test + (call $func1 + (call_indirect $type1 (i32.const 2) (i32.const 1)) + (call $import1 (f32.const 1.0)) + ) + ) + (export "test" $test) + (memory 1 65535) +)`, +"type $type0 of function (i32) : (i32); " + +"type $type1 of function (f32) : (f32); " + +"type $type2 of function (i32, f32) : (); " + +"type $type3 of function () : (); " + +"import \"test\" as $import0 from \"mod\" typeof function (f32) : (f32); " + +"table [$func1, $func2]; export $func3 as \"test\"; " + +"function $func1($var0: i32, $var1: f32) : () { nop; } " + +"function $func2($var0: i32) : (i32) { $var0 } " + +"function $func3() : () {" + +" call $func1 (call_indirect $type0 (2) [1], call $import0 (1.0f)) " + +"} memory 1, 65535 {} "); + +// precedence +runTest(` +(module + (func $test + (local $0 i32) (local $1 f64) (local $2 f64) + (drop (i32.add (i32.mul (i32.mul (i32.const 1) (i32.const 2)) (i32.const 3)) + (i32.mul (i32.const 4) (i32.mul (i32.const 5) (i32.const 6))))) + (drop (i32.mul (i32.add (i32.add (i32.const 1) (i32.const 2)) (i32.const 3)) + (i32.add (i32.const 4) (i32.add (i32.const 5) (i32.const 6))))) + (drop (i32.add (i32.const 0) (i32.sub (i32.const 1) (i32.mul (i32.const 2) (i32.div_s (i32.const 3) (i32.const 4)))))) + (drop (i32.sub (i32.add (i32.const 0) (i32.const 1)) (i32.div_s (i32.mul (i32.const 2) (i32.const 3)) (i32.const 4)))) + (i32.store8 (i32.const 8) (i32.or (i32.const 0) + (i32.xor (i32.const 1) (i32.and (i32.const 2) (i32.eq (i32.const 3) + (i32.lt_u (i32.const 4) (i32.shr_u (i32.const 5) (i32.add (i32.const 6) + (i32.mul (i32.const 7) (i32.eqz (i32.load16_u (get_local $0)))))))))))) + (drop (f64.load (i32.trunc_u/f64 (f64.neg (f64.mul (f64.const 0.0) + (f64.add (f64.const 1.0) (f64.convert_s/i32 (i32.lt_s (i32.const 6) + (f64.eq (f64.const 7.0) (tee_local $2 (tee_local $1 (f64.const 9.0)))))))))))) + (f64.store (i32.const 8) (tee_local $1 (f64.const 9.0))) + (unreachable) + ) + (export "test" $test) + (memory 0 0) +)`, +"type $type0 of function () : (); " + +"export $func0 as \"test\"; " + +"function $func0() : () {" + +" var $var0: i32, $var1: f64, $var2: f64;" + +" 1 * 2 * 3 + 4 * (5 * 6);" + +" (1 + 2 + 3) * (4 + (5 + 6));" + +" 0 + (1 - 2 * (3 /s 4));" + +" 0 + 1 - 2 * 3 /s 4;" + +" i32:8[8] = 0 | 1 ^ 2 & 3 == 4 <u 5 >>u 6 + 7 * !i32:16u[$var0];" + +" f64[i32.trunc_u/f64(-(0.0 * (1.0 + f64.convert_s/i32(6 <s (7.0 == ($var2 = $var1 = 9.0))))))];" + +" f64[8] = $var1 = 9.0;" + +" unreachable; " + +"} memory 0, 0 {} "); + +// more stack-machine code that isn't directly representable as an AST +runTest(` +(module + (func (result i32) + (local $x i32) + i32.const 100 + set_local $x + i32.const 200 + set_local $x + i32.const 400 + set_local $x + i32.const 2 + i32.const 16 + nop + set_local $x + i32.const 3 + i32.const 17 + set_local $x + i32.const 18 + set_local $x + i32.lt_s + if i32 + i32.const 101 + set_local $x + i32.const 8 + i32.const 102 + set_local $x + else + i32.const 103 + set_local $x + i32.const 900 + i32.const 104 + set_local $x + i32.const 105 + set_local $x + end + i32.const 107 + set_local $x + get_local $x + i32.add + i32.const 106 + set_local $x + ) + (export "" 0) +)`, +"type $type0 of function () : (i32); export $func0 as \"\"; function $func0() : (i32) { var $var0: i32; $var0 = 100; $var0 = 200; $var0 = 400; first(first(if (first(2, ($var0 = first(16, nop))) <s first(3, ($var0 = 17), ($var0 = 18))) { $var0 = 101; first(8, $var0 = 102) } else { $var0 = 103; first(900, $var0 = 104, $var0 = 105) }, ($var0 = 107)) + $var0, $var0 = 106) } "); + +// more stack-machine code that isn't directly representable as an AST +runTest(` +(module + (func $return_void) + + (func (result i32) + (local $x i32) + i32.const 0 + block + i32.const 1 + set_local $x + end + i32.const 2 + set_local $x + i32.const 3 + loop + i32.const 4 + set_local $x + end + i32.const 5 + set_local $x + i32.add + call $return_void + ) + (export "" 0) +)`, +"type $type0 of function () : (); type $type1 of function () : (i32); export $func0 as \"\"; function $func0() : () { } function $func1() : (i32) { var $var0: i32; first(first(0, { $var0 = 1; }, ($var0 = 2)) + first(3, loop { $var0 = 4; }, ($var0 = 5)), call $func0 ()) } "); + +runTest(` +(module + (func $func + block $block + i32.const 0 + if + i32.const 0 + if + end + else + end + end + ) + (export "" 0) +)`, +"type $type0 of function () : (); export $func0 as \"\"; function $func0() : () { { if (0) { if (0) { }; }; } } "); diff --git a/js/src/jit-test/tests/wasm/to-text.js b/js/src/jit-test/tests/wasm/to-text.js new file mode 100644 index 000000000..8b64c1434 --- /dev/null +++ b/js/src/jit-test/tests/wasm/to-text.js @@ -0,0 +1,261 @@ +load(libdir + "wasm.js"); + +var caught = false; +try { + wasmBinaryToText(new Int8Array(1)); +} catch (e) { + caught = true; +} +assertEq(caught, true); + +assertErrorMessage(() => wasmBinaryToText(wasmTextToBinary(`(module (func (result i32) (f32.const 13.37)))`)), WebAssembly.CompileError, /type mismatch/); + +function runTest(code) { + var expected = wasmTextToBinary(code); + var s = wasmBinaryToText(expected); + print("TEXT: " + s); + var roundtrip = wasmTextToBinary(s); + assertDeepEq(expected, roundtrip); +} + +// Smoke test +runTest(` +(module + (func (param i32) (result f64) + (local $l f32) + (block + (set_local $l (f32.const 0.0)) + (loop $exit $cont + (br_if $exit (get_local 0)) + (br 2) + ) + (drop (if f64 (i32.const 1) + (f64.min (f64.neg (f64.const 1)) (f64.const 0)) + (f64.add (f64.const 0.5) (f64.load offset=0 (i32.const 0)) ) + )) + ) + (i32.store16 (i32.const 8) (i32.const 128)) + + (return (f64.const 0)) + ) + (export "test" 0) + (memory 1 10) +)`); + +// Constants, stores and loads +runTest(` +(module (func + (local i32) (local f32) (local f64) + (drop (i32.const 0)) + (drop (i32.const 100002)) + (drop (f32.const 0.0)) + (drop (f32.const 1.5)) + (drop (f64.const 0.0)) + (drop (f64.const -10.25)) + (i32.store (i32.const 0) (i32.load (i32.const 0))) + (i32.store8 (i32.const 1) (i32.load8_s (i32.const 2))) + (i32.store8 (i32.const 3) (i32.load8_u (i32.const 4))) + (i32.store16 (i32.const 2) (i32.load16_s (i32.const 0))) + (i32.store16 (i32.const 1) (i32.load16_u (i32.const 0))) + (f32.store (i32.const 5) (f32.load (i32.const 6))) + (f64.store (i32.const 5) (f64.load (i32.const 6))) + (set_local 0 (get_local 0)) + (set_local 2 (get_local 2)) +)(memory 100))`); + +// Branching +runTest(` +(module +(func + (block (block (block (nop)))) + (block (loop )) + (if (i32.const 0) (block $label (nop))) + (if (i32.const 1) (nop) (loop $exit $cont (block ))) + (block $l (br $l)) + (block $m (block (block (br $m)))) + (block $k (br_if 0 (i32.const 0)) (return)) + (block $n (block (block (br_if 2 (i32.const 1)) (nop)))) + (block $1 (block $2 (block $3 (br_table $2 $3 $1 (i32.const 1)) )) (nop)) + (loop $exit $cont (br_if $cont (i32.const 0)) (nop)) + (return) +) +(func (result f32) (return (f32.const -0.5))) +(memory 0) +)`); + +// i32, f32 and f64 operations +runTest(` +(module + (func $iadd (param $x i32) (param $y i32) (result i32) (i32.add (get_local $x) (get_local $y))) + (func $isub (param $x i32) (param $y i32) (result i32) (i32.sub (get_local $x) (get_local $y))) + (func $imul (param $x i32) (param $y i32) (result i32) (i32.mul (get_local $x) (get_local $y))) + (func $idiv_s (param $x i32) (param $y i32) (result i32) (i32.div_s (get_local $x) (get_local $y))) + (func $idiv_u (param $x i32) (param $y i32) (result i32) (i32.div_u (get_local $x) (get_local $y))) + (func $irem_s (param $x i32) (param $y i32) (result i32) (i32.rem_s (get_local $x) (get_local $y))) + (func $irem_u (param $x i32) (param $y i32) (result i32) (i32.rem_u (get_local $x) (get_local $y))) + (func $iand (param $x i32) (param $y i32) (result i32) (i32.and (get_local $x) (get_local $y))) + (func $ior (param $x i32) (param $y i32) (result i32) (i32.or (get_local $x) (get_local $y))) + (func $ixor (param $x i32) (param $y i32) (result i32) (i32.xor (get_local $x) (get_local $y))) + (func $ishl (param $x i32) (param $y i32) (result i32) (i32.shl (get_local $x) (get_local $y))) + (func $ishr_s (param $x i32) (param $y i32) (result i32) (i32.shr_s (get_local $x) (get_local $y))) + (func $ishr_u (param $x i32) (param $y i32) (result i32) (i32.shr_u (get_local $x) (get_local $y))) + (func $iclz (param $x i32) (result i32) (i32.clz (get_local $x))) + (func $ictz (param $x i32) (result i32) (i32.ctz (get_local $x))) + (func $ipopcnt (param $x i32) (result i32) (i32.popcnt (get_local $x))) + (func $ieq (param $x i32) (param $y i32) (result i32) (i32.eq (get_local $x) (get_local $y))) + (func $ine (param $x i32) (param $y i32) (result i32) (i32.ne (get_local $x) (get_local $y))) + (func $ilt_s (param $x i32) (param $y i32) (result i32) (i32.lt_s (get_local $x) (get_local $y))) + (func $ilt_u (param $x i32) (param $y i32) (result i32) (i32.lt_u (get_local $x) (get_local $y))) + (func $ile_s (param $x i32) (param $y i32) (result i32) (i32.le_s (get_local $x) (get_local $y))) + (func $ile_u (param $x i32) (param $y i32) (result i32) (i32.le_u (get_local $x) (get_local $y))) + (func $igt_s (param $x i32) (param $y i32) (result i32) (i32.gt_s (get_local $x) (get_local $y))) + (func $igt_u (param $x i32) (param $y i32) (result i32) (i32.gt_u (get_local $x) (get_local $y))) + (func $ige_s (param $x i32) (param $y i32) (result i32) (i32.ge_s (get_local $x) (get_local $y))) + (func $ige_u (param $x i32) (param $y i32) (result i32) (i32.ge_u (get_local $x) (get_local $y))) + + (func $fadd (param $x f32) (param $y f32) (result f32) (f32.add (get_local $x) (get_local $y))) + (func $fsub (param $x f32) (param $y f32) (result f32) (f32.sub (get_local $x) (get_local $y))) + (func $fmul (param $x f32) (param $y f32) (result f32) (f32.mul (get_local $x) (get_local $y))) + (func $fdiv (param $x f32) (param $y f32) (result f32) (f32.div (get_local $x) (get_local $y))) + (func $fsqrt (param $x f32) (result f32) (f32.sqrt (get_local $x))) + (func $fmin (param $x f32) (param $y f32) (result f32) (f32.min (get_local $x) (get_local $y))) + (func $fmax (param $x f32) (param $y f32) (result f32) (f32.max (get_local $x) (get_local $y))) + (func $fceil (param $x f32) (result f32) (f32.ceil (get_local $x))) + (func $ffloor (param $x f32) (result f32) (f32.floor (get_local $x))) + (func $fabs (param $x f32) (result f32) (f32.abs (get_local $x))) + (func $fneg (param $x f32) (result f32) (f32.neg (get_local $x))) + + (func $dadd (param $x f64) (param $y f64) (result f64) (f64.add (get_local $x) (get_local $y))) + (func $dsub (param $x f64) (param $y f64) (result f64) (f64.sub (get_local $x) (get_local $y))) + (func $dmul (param $x f64) (param $y f64) (result f64) (f64.mul (get_local $x) (get_local $y))) + (func $ddiv (param $x f64) (param $y f64) (result f64) (f64.div (get_local $x) (get_local $y))) + (func $dceil (param $x f64) (result f64) (f64.ceil (get_local $x))) + (func $dfloor (param $x f64) (result f64) (f64.floor (get_local $x))) + (func $dabs (param $x f64) (result f64) (f64.abs (get_local $x))) + (func $dneg (param $x f64) (result f64) (f64.neg (get_local $x))) +(memory 0))`); + +// conversions +runTest(` +(module + (func $itrunc_s_f32 (param $x f32) (result i32) (i32.trunc_s/f32 (get_local $x))) + (func $itrunc_u_f32 (param $x f32) (result i32) (i32.trunc_u/f32 (get_local $x))) + (func $itrunc_s_f64 (param $x f64) (result i32) (i32.trunc_s/f64 (get_local $x))) + (func $itrunc_u_f64 (param $x f64) (result i32) (i32.trunc_u/f64 (get_local $x))) + (func $fconvert_s_i32 (param $x i32) (result f32) (f32.convert_s/i32 (get_local $x))) + (func $dconvert_s_i32 (param $x i32) (result f64) (f64.convert_s/i32 (get_local $x))) + (func $fconvert_u_i32 (param $x i32) (result f32) (f32.convert_u/i32 (get_local $x))) + (func $dconvert_u_i32 (param $x i32) (result f64) (f64.convert_u/i32 (get_local $x))) + (func $dpromote_f32 (param $x f32) (result f64) (f64.promote/f32 (get_local $x))) + (func $fdemote_f64 (param $x f64) (result f32) (f32.demote/f64 (get_local $x))) +(memory 0))`); + +// function calls +runTest(` +(module + (type $type1 (func (param i32) (result i32))) + (import $import1 "mod" "test" (param f32) (result f32)) + (table anyfunc (elem $func1 $func2)) + (func $func1 (param i32) (param f32) (nop)) + (func $func2 (param i32) (result i32) (get_local 0)) + (func $test + (call $func1 + (call_indirect $type1 (i32.const 2) (i32.const 1)) + (call $import1 (f32.const 1.0)) + ) + ) + (export "test" $test) + (memory 1) +)`); + +// default memory export from binaryen +runTest(`(module (func (nop)) (memory 0 65535))`); + +// stack-machine code that isn't directly representable as an AST +runTest(` +(module + (func (result i32) + (local $x i32) + i32.const 100 + set_local $x + i32.const 200 + set_local $x + i32.const 400 + set_local $x + i32.const 2 + i32.const 16 + nop + set_local $x + i32.const 3 + i32.const 17 + set_local $x + i32.const 18 + set_local $x + i32.lt_s + if i32 + i32.const 101 + set_local $x + i32.const 8 + i32.const 102 + set_local $x + else + i32.const 103 + set_local $x + i32.const 900 + i32.const 104 + set_local $x + i32.const 105 + set_local $x + end + i32.const 107 + set_local $x + get_local $x + i32.add + i32.const 106 + set_local $x + ) + (export "" 0) +)`); + +// more stack-machine code that isn't directly representable as an AST +runTest(` +(module + (func $return_void) + + (func (result i32) + (local $x i32) + i32.const 0 + block + i32.const 1 + set_local $x + end + i32.const 2 + set_local $x + i32.const 3 + loop + i32.const 4 + set_local $x + end + i32.const 5 + set_local $x + i32.add + call $return_void + ) + (export "" 0) +)`); + +runTest(` + (module + (func $func + block $block + i32.const 0 + if + i32.const 0 + if + end + else + end + end + ) + (export "" 0) +)`); diff --git a/js/src/jit-test/tests/wasm/unreachable.js b/js/src/jit-test/tests/wasm/unreachable.js new file mode 100644 index 000000000..0bfd90d7e --- /dev/null +++ b/js/src/jit-test/tests/wasm/unreachable.js @@ -0,0 +1,30 @@ +load(libdir + "wasm.js"); + +// In unreachable code, the current design is that validation is disabled, +// meaning we have to have a special mode in the decoder for decoding code +// that won't actually run. + +wasmFullPass(`(module + (func (result i32) + (return (i32.const 42)) + (i32.add (f64.const 1.0) (f32.const 0.0)) + (return (f64.const 2.0)) + (if (f32.const 3.0) (i64.const 2) (i32.const 1)) + (select (f64.const -5.0) (f32.const 2.3) (f64.const 8.9)) + ) + (export "run" 0) +)`, 42); + +wasmFullPass(`(module + (func (result i32) (param i32) + (block + (br_if 1 (i32.const 41) (get_local 0)) + (br 1 (i32.const 42)) + ) + (i32.add (f32.const 0.0) (f64.const 1.0)) + (return (f64.const 2.0)) + (if (f32.const 3.0) (i64.const 2) (i32.const 1)) + (select (f64.const -5.0) (f32.const 2.3) (f64.const 8.9)) + ) + (export "run" 0) +)`, 42, {}, 0); diff --git a/js/src/jit-test/tests/wasm/validate.js b/js/src/jit-test/tests/wasm/validate.js new file mode 100644 index 000000000..bae409a51 --- /dev/null +++ b/js/src/jit-test/tests/wasm/validate.js @@ -0,0 +1,25 @@ +load(libdir + "wasm.js"); + +const { validate } = WebAssembly; + +assertErrorMessage(() => validate(), Error, /requires more than 0 arguments/); + +const argError = /first argument must be an ArrayBuffer or typed array object/; +assertErrorMessage(() => validate(null), Error, argError); +assertErrorMessage(() => validate(true), Error, argError); +assertErrorMessage(() => validate(42), Error, argError); +assertErrorMessage(() => validate(NaN), Error, argError); +assertErrorMessage(() => validate('yo'), Error, argError); +assertErrorMessage(() => validate([]), Error, argError); +assertErrorMessage(() => validate({}), Error, argError); +assertErrorMessage(() => validate(Symbol.iterator), Error, argError); +assertErrorMessage(() => validate({ valueOf: () => new ArrayBuffer(65536) }), Error, argError); + +assertEq(validate(wasmTextToBinary(`(module)`)), true); + +assertEq(validate(wasmTextToBinary(`(module (export "run" 0))`)), false); +assertEq(validate(wasmTextToBinary(`(module (func) (export "run" 0))`)), true); + +// Feature-testing proof-of-concept. +assertEq(validate(wasmTextToBinary(`(module (memory 1) (func (result i32) (current_memory)))`)), true); +assertEq(validate(wasmTextToBinary(`(module (memory 1) (func (result i32) (grow_memory (i32.const 42))))`)), true); diff --git a/js/src/jit-test/tests/wasm/wasm-abi.js b/js/src/jit-test/tests/wasm/wasm-abi.js new file mode 100644 index 000000000..510e94cac --- /dev/null +++ b/js/src/jit-test/tests/wasm/wasm-abi.js @@ -0,0 +1,41 @@ +load(libdir + "wasm.js"); + +for (let numLocals of [3, 4, 5, 6, 17, 18, 19]) { + for (let numParams of [1, 2, 3, 4, 5, 6, 7, 8]) { + let locals = ` (local `; + let setLocals = ``; + let getLocals = ``; + let adds = ``; + let sum = 0; + for (let i = 0; i < numLocals; i++) { + sum += i + 1; + locals += `i32 `; + setLocals += ` (set_local ${i + 1} (i32.add (get_local 0) (i32.const ${i + 1})))\n`; + getLocals += ` get_local ${i + 1}\n`; + if (i > 0) + adds += ` i32.add\n`; + } + locals += `)\n`; + + var callee = ` (func $f (param `; + var caller = ` (call $f `; + for (let i = 0; i < numParams; i++) { + callee += `f32 `; + caller += `(f32.const ${i}) `; + } + callee += `))\n`; + caller += `)\n`; + + var code = `(module \n` + + callee + + ` (func (export "run") (param i32) (result i32)\n` + + locals + + setLocals + + caller + + getLocals + + adds + + ` )\n` + + `)`; + wasmFullPass(code, numLocals * 100 + sum, undefined, 100); + } +} |