Chromium Code Reviews| Index: test/mjsunit/wasm/float-constant-folding.js |
| diff --git a/test/mjsunit/wasm/float-constant-folding.js b/test/mjsunit/wasm/float-constant-folding.js |
| index 30757c403d75efb4b95356de2bfd31fc49f0de52..b6ab867c9ed1da6fb270995d53eb7d405b6a43ce 100644 |
| --- a/test/mjsunit/wasm/float-constant-folding.js |
| +++ b/test/mjsunit/wasm/float-constant-folding.js |
| @@ -184,6 +184,25 @@ load("test/mjsunit/wasm/wasm-module-builder.js"); |
| })(); |
| (function() { |
| + print("F64: sNaN / -1 = qNaN"); |
| + var builder = new WasmModuleBuilder(); |
| + builder.addFunction("F64Div1", kSig_i_i) |
| + .addBody([ |
| + kExprI64Const, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xf9, 0xff, 0x00, |
| + kExprF64ReinterpretI64, |
|
titzer
2017/01/31 17:24:49
Can't this just be a F64Const?
ahaas
2017/01/31 19:43:37
Actually no, for two reasons:
1) Other constant fo
|
| + kExprF64Const, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xbf, |
| + kExprF64Div, |
| + kExprI64ReinterpretF64, |
| + kExprI64Const, 32, |
| + kExprI64ShrU, |
| + kExprI32ConvertI64, |
| + ]) |
| + .exportFunc(); |
| + var module = builder.instantiate(); |
| + assertEquals(0x7ffa0000, module.exports.F64Div1()); |
| +})(); |
| + |
| +(function() { |
| print("F64: X / sNaN = qNaN"); |
| var builder = new WasmModuleBuilder(); |
| builder.addFunction("F64XDivNaN", kSig_i_i) |