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 8e9d65320a830569501a91b822cab38f26fa4e62..5c23ac376839cc5969ca13f5860b86e230ac5695 100644 |
--- a/test/mjsunit/wasm/float-constant-folding.js |
+++ b/test/mjsunit/wasm/float-constant-folding.js |
@@ -239,6 +239,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, |
+ 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) |