Index: test/mjsunit/wasm/asm-wasm.js |
diff --git a/test/mjsunit/wasm/asm-wasm.js b/test/mjsunit/wasm/asm-wasm.js |
index b1e73c1edabd1f0c38f5fffe899d1ebcdf9f9a75..dc8ecff7a01f7beee787f14af709b2dff6c8822a 100644 |
--- a/test/mjsunit/wasm/asm-wasm.js |
+++ b/test/mjsunit/wasm/asm-wasm.js |
@@ -1628,3 +1628,44 @@ function TestNotOne() { |
} |
assertWasm(55, TestNotOne); |
+ |
+ |
+function TestDotfulFloat(stdlib) { |
+ "use asm"; |
+ var fround = stdlib.Math.fround; |
+ var foo = fround(55.0); |
+ function caller() { |
+ return +foo; |
+ } |
+ return {caller: caller}; |
+} |
+ |
+assertWasm(55, TestDotfulFloat); |
+ |
+ |
+function TestDotlessFloat(stdlib) { |
+ "use asm"; |
+ var fround = stdlib.Math.fround; |
+ var foo = fround(55); |
+ function caller() { |
+ return +foo; |
+ } |
+ return {caller: caller}; |
+} |
+ |
+assertWasm(55, TestDotlessFloat); |
+ |
+ |
+function TestFloatGlobals(stdlib) { |
+ "use asm"; |
+ var fround = stdlib.Math.fround; |
+ var foo = fround(1.25); |
+ function caller() { |
+ foo = fround(foo + fround(1.0)); |
+ foo = fround(foo + fround(1.0)); |
+ return +foo; |
+ } |
+ return {caller: caller}; |
+} |
+ |
+assertWasm(3.25, TestFloatGlobals); |