diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/float_ops.cpp | 28 | ||||
-rw-r--r-- | test/float_ops.post.js | 11 | ||||
-rw-r--r-- | test/float_ops.txt | 139 | ||||
-rw-r--r-- | test/float_ops_precise.cpp | 45 | ||||
-rw-r--r-- | test/float_ops_precise.emcc | 1 | ||||
-rw-r--r-- | test/float_ops_precise.post.js | 78 | ||||
-rw-r--r-- | test/float_ops_precise.txt | 345 | ||||
-rw-r--r-- | test/unit.asm.js | 9 | ||||
-rw-r--r-- | test/unit.fromasm.imprecise.no-opts | 14 | ||||
-rw-r--r-- | test/unit.fromasm.no-opts | 14 |
10 files changed, 215 insertions, 469 deletions
diff --git a/test/float_ops.cpp b/test/float_ops.cpp index ddd8bcae6..9e4d68bae 100644 --- a/test/float_ops.cpp +++ b/test/float_ops.cpp @@ -41,5 +41,33 @@ int EMSCRIPTEN_KEEPALIVE double_to_int(double d) { return x; } +int EMSCRIPTEN_KEEPALIVE double_to_uint(double d) { + d += 1.23; + unsigned x = d; + return x; +} + +float EMSCRIPTEN_KEEPALIVE int_to_float(int x) { + float d = x; + return d + 1.23; +} + +float EMSCRIPTEN_KEEPALIVE uint_to_float(unsigned x) { + float d = x; + return d + 1.23; +} + +int EMSCRIPTEN_KEEPALIVE float_to_int(float d) { + d += 1.23; + int x = d; + return x; +} + +int EMSCRIPTEN_KEEPALIVE float_to_uint(float d) { + d += 1.23; + unsigned x = d; + return x; +} + } diff --git a/test/float_ops.post.js b/test/float_ops.post.js index 117175ffd..c08ba19e5 100644 --- a/test/float_ops.post.js +++ b/test/float_ops.post.js @@ -21,6 +21,12 @@ function testUnary(name) { doTest(-1 | 0); doTest((-1 | 0) + 1); doTest((-1 | 0) - 1); + doTest((-1 >>> 0) + 1); + doTest((-1 >>> 0) - 1); + doTest((-1 | 0) + 2); + doTest((-1 | 0) - 2); + doTest((-1 >>> 0) + 2); + doTest((-1 >>> 0) - 2); } testUnary('dfloor'); @@ -73,6 +79,11 @@ testBinary('dge'); testUnary('int_to_double'); testUnary('uint_to_double'); testUnary('double_to_int'); +testUnary('double_to_uint'); +testUnary('int_to_float'); +testUnary('uint_to_float'); +testUnary('float_to_int'); +testUnary('float_to_uint'); Module.print('done.'); diff --git a/test/float_ops.txt b/test/float_ops.txt index aa28b7eb6..3cd01846b 100644 --- a/test/float_ops.txt +++ b/test/float_ops.txt @@ -15,6 +15,12 @@ dfloor -1 ==> -1 0 ==> 0 -2 ==> -2 + 4294967296 ==> 4294967296 + 4294967294 ==> 4294967294 + 1 ==> 1 + -3 ==> -3 + 4294967297 ==> 4294967297 + 4294967293 ==> 4294967293 dadd 0,0 ==> 0 0,1 ==> 1 @@ -308,6 +314,12 @@ int_to_double -1 ==> 0.22999999999999998 0 ==> 1.23 -2 ==> -0.77 + 4294967296 ==> 1.23 + 4294967294 ==> -0.77 + 1 ==> 2.23 + -3 ==> -1.77 + 4294967297 ==> 2.23 + 4294967293 ==> -1.77 uint_to_double 0 ==> 1.23 1 ==> 2.23 @@ -325,6 +337,12 @@ uint_to_double -1 ==> 4294967296.23 0 ==> 1.23 -2 ==> 4294967295.23 + 4294967296 ==> 1.23 + 4294967294 ==> 4294967295.23 + 1 ==> 2.23 + -3 ==> 4294967294.23 + 4294967297 ==> 2.23 + 4294967293 ==> 4294967294.23 double_to_int 0 ==> 1 1 ==> 2 @@ -342,4 +360,125 @@ double_to_int -1 ==> 0 0 ==> 1 -2 ==> 0 + 4294967296 ==> 1 + 4294967294 ==> -1 + 1 ==> 2 + -3 ==> -1 + 4294967297 ==> 2 + 4294967293 ==> -2 +double_to_uint + 0 ==> 1 + 1 ==> 2 + -1 ==> 0 + 0.5 ==> 1 + -0.5 ==> 0 + 1.4 ==> 2 + -1.4 ==> 0 + 1.6 ==> 2 + -1.6 ==> 0 + 5.1 ==> 6 + 5.3 ==> 6 + 5.7 ==> 6 + 5.9 ==> 7 + -1 ==> 0 + 0 ==> 1 + -2 ==> 0 + 4294967296 ==> 1 + 4294967294 ==> -1 + 1 ==> 2 + -3 ==> -1 + 4294967297 ==> 2 + 4294967293 ==> -2 +int_to_float + 0 ==> 1.2300000190734863 + 1 ==> 2.2300000190734863 + -1 ==> 0.23000000417232513 + 0.5 ==> 1.2300000190734863 + -0.5 ==> 1.2300000190734863 + 1.4 ==> 2.2300000190734863 + -1.4 ==> 0.23000000417232513 + 1.6 ==> 2.2300000190734863 + -1.6 ==> 0.23000000417232513 + 5.1 ==> 6.230000019073486 + 5.3 ==> 6.230000019073486 + 5.7 ==> 6.230000019073486 + 5.9 ==> 6.230000019073486 + -1 ==> 0.23000000417232513 + 0 ==> 1.2300000190734863 + -2 ==> -0.7699999809265137 + 4294967296 ==> 1.2300000190734863 + 4294967294 ==> -0.7699999809265137 + 1 ==> 2.2300000190734863 + -3 ==> -1.7699999809265137 + 4294967297 ==> 2.2300000190734863 + 4294967293 ==> -1.7699999809265137 +uint_to_float + 0 ==> 1.2300000190734863 + 1 ==> 2.2300000190734863 + -1 ==> 4294967296 + 0.5 ==> 1.2300000190734863 + -0.5 ==> 1.2300000190734863 + 1.4 ==> 2.2300000190734863 + -1.4 ==> 4294967296 + 1.6 ==> 2.2300000190734863 + -1.6 ==> 4294967296 + 5.1 ==> 6.230000019073486 + 5.3 ==> 6.230000019073486 + 5.7 ==> 6.230000019073486 + 5.9 ==> 6.230000019073486 + -1 ==> 4294967296 + 0 ==> 1.2300000190734863 + -2 ==> 4294967296 + 4294967296 ==> 1.2300000190734863 + 4294967294 ==> 4294967296 + 1 ==> 2.2300000190734863 + -3 ==> 4294967296 + 4294967297 ==> 2.2300000190734863 + 4294967293 ==> 4294967296 +float_to_int + 0 ==> 1 + 1 ==> 2 + -1 ==> 0 + 0.5 ==> 1 + -0.5 ==> 0 + 1.4 ==> 2 + -1.4 ==> 0 + 1.6 ==> 2 + -1.6 ==> 0 + 5.1 ==> 6 + 5.3 ==> 6 + 5.7 ==> 6 + 5.9 ==> 7 + -1 ==> 0 + 0 ==> 1 + -2 ==> 0 + 4294967296 ==> 0 + 4294967294 ==> 0 + 1 ==> 2 + -3 ==> -1 + 4294967297 ==> 0 + 4294967293 ==> 0 +float_to_uint + 0 ==> 1 + 1 ==> 2 + -1 ==> 0 + 0.5 ==> 1 + -0.5 ==> 0 + 1.4 ==> 2 + -1.4 ==> 0 + 1.6 ==> 2 + -1.6 ==> 0 + 5.1 ==> 6 + 5.3 ==> 6 + 5.7 ==> 6 + 5.9 ==> 7 + -1 ==> 0 + 0 ==> 1 + -2 ==> 0 + 4294967296 ==> 0 + 4294967294 ==> 0 + 1 ==> 2 + -3 ==> -1 + 4294967297 ==> 0 + 4294967293 ==> 0 done. diff --git a/test/float_ops_precise.cpp b/test/float_ops_precise.cpp deleted file mode 100644 index ddd8bcae6..000000000 --- a/test/float_ops_precise.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include <cmath> -#include <algorithm> -#include <emscripten.h> - -extern "C" { - -// unary -double EMSCRIPTEN_KEEPALIVE dneg(double x) { return -x; } -double EMSCRIPTEN_KEEPALIVE dfloor(double x) { return floor(x); } - -// binary -double EMSCRIPTEN_KEEPALIVE dadd(double x, double y) { return x + y; } -double EMSCRIPTEN_KEEPALIVE dsub(double x, double y) { return x - y; } -double EMSCRIPTEN_KEEPALIVE dmul(double x, double y) { return x * y; } -double EMSCRIPTEN_KEEPALIVE ddiv(double x, double y) { return x / y; } -double EMSCRIPTEN_KEEPALIVE dcopysign(double x, double y) { return std::copysign(x, y); } -double EMSCRIPTEN_KEEPALIVE dmin(double x, double y) { return std::min(x, y); } -double EMSCRIPTEN_KEEPALIVE dmax(double x, double y) { return std::max(x, y); } - -// comparisons -int EMSCRIPTEN_KEEPALIVE deq(double x, double y) { return x == y; } -int EMSCRIPTEN_KEEPALIVE dne(double x, double y) { return x != y; } -int EMSCRIPTEN_KEEPALIVE dlt(double x, double y) { return x < y; } -int EMSCRIPTEN_KEEPALIVE dle(double x, double y) { return x <= y; } -int EMSCRIPTEN_KEEPALIVE dgt(double x, double y) { return x > y; } -int EMSCRIPTEN_KEEPALIVE dge(double x, double y) { return x >= y; } - -double EMSCRIPTEN_KEEPALIVE int_to_double(int x) { - double d = x; - return d + 1.23; -} - -double EMSCRIPTEN_KEEPALIVE uint_to_double(unsigned x) { - double d = x; - return d + 1.23; -} - -int EMSCRIPTEN_KEEPALIVE double_to_int(double d) { - d += 1.23; - int x = d; - return x; -} - -} - diff --git a/test/float_ops_precise.emcc b/test/float_ops_precise.emcc deleted file mode 100644 index 68a64d12d..000000000 --- a/test/float_ops_precise.emcc +++ /dev/null @@ -1 +0,0 @@ -["-s", "ASSERTIONS=0", "-s", "PRECISE_F32=1"] diff --git a/test/float_ops_precise.post.js b/test/float_ops_precise.post.js deleted file mode 100644 index 117175ffd..000000000 --- a/test/float_ops_precise.post.js +++ /dev/null @@ -1,78 +0,0 @@ - -// unary -function testUnary(name) { - Module.print(name); - function doTest(x) { - Module.print(' ' + [x] + ' ==> ' + Module['_' + name](x)); - } - doTest(0); - doTest(1); - doTest(-1); - doTest(0.5); - doTest(-0.5); - doTest(1.4); - doTest(-1.4); - doTest(1.6); - doTest(-1.6); - doTest(5.1); - doTest(5.3); - doTest(5.7); - doTest(5.9); - doTest(-1 | 0); - doTest((-1 | 0) + 1); - doTest((-1 | 0) - 1); -} -testUnary('dfloor'); - -// binary -function testBinary(name) { - Module.print(name); - function doTest(x, y) { - Module.print(' ' + [x, y] + ' ==> ' + Module['_' + name](x, y)); - } - doTest(0, 0); - doTest(0, 1); - doTest(1, 0); - doTest(1, 1); - doTest(5, 6); - doTest(6, 5); - doTest(101, -12); - doTest(-12, 101); - doTest(-1, 5); - doTest(5, -1); - doTest(-1, -1); - doTest(0.12, 0.12); - doTest(0.812, 1); - doTest(1.821, 0); - doTest(1, 1.212); - doTest(5.543, 6); - doTest(6, 5.121); - doTest(101.001, -12); - doTest(-12.001, 101); - doTest(-1, 5.123); - doTest(5, -1.123); - doTest(-1, -1.123); -} -testBinary('dadd'); -testBinary('dsub'); -testBinary('dmul'); -testBinary('ddiv'); -//testBinary('dcopysign'); // TODO this uses tempDoublePtr, a global, which is not yet functional -testBinary('dmin'); -testBinary('dmax'); - -// comparisons -testBinary('deq'); -testBinary('dne'); -testBinary('dlt'); -testBinary('dle'); -testBinary('dgt'); -testBinary('dge'); - -// conversions -testUnary('int_to_double'); -testUnary('uint_to_double'); -testUnary('double_to_int'); - -Module.print('done.'); - diff --git a/test/float_ops_precise.txt b/test/float_ops_precise.txt deleted file mode 100644 index aa28b7eb6..000000000 --- a/test/float_ops_precise.txt +++ /dev/null @@ -1,345 +0,0 @@ -dfloor - 0 ==> 0 - 1 ==> 1 - -1 ==> -1 - 0.5 ==> 0 - -0.5 ==> -1 - 1.4 ==> 1 - -1.4 ==> -2 - 1.6 ==> 1 - -1.6 ==> -2 - 5.1 ==> 5 - 5.3 ==> 5 - 5.7 ==> 5 - 5.9 ==> 5 - -1 ==> -1 - 0 ==> 0 - -2 ==> -2 -dadd - 0,0 ==> 0 - 0,1 ==> 1 - 1,0 ==> 1 - 1,1 ==> 2 - 5,6 ==> 11 - 6,5 ==> 11 - 101,-12 ==> 89 - -12,101 ==> 89 - -1,5 ==> 4 - 5,-1 ==> 4 - -1,-1 ==> -2 - 0.12,0.12 ==> 0.24 - 0.812,1 ==> 1.812 - 1.821,0 ==> 1.821 - 1,1.212 ==> 2.2119999999999997 - 5.543,6 ==> 11.543 - 6,5.121 ==> 11.121 - 101.001,-12 ==> 89.001 - -12.001,101 ==> 88.999 - -1,5.123 ==> 4.123 - 5,-1.123 ==> 3.877 - -1,-1.123 ==> -2.123 -dsub - 0,0 ==> 0 - 0,1 ==> -1 - 1,0 ==> 1 - 1,1 ==> 0 - 5,6 ==> -1 - 6,5 ==> 1 - 101,-12 ==> 113 - -12,101 ==> -113 - -1,5 ==> -6 - 5,-1 ==> 6 - -1,-1 ==> 0 - 0.12,0.12 ==> 0 - 0.812,1 ==> -0.18799999999999994 - 1.821,0 ==> 1.821 - 1,1.212 ==> -0.21199999999999997 - 5.543,6 ==> -0.45699999999999985 - 6,5.121 ==> 0.8789999999999996 - 101.001,-12 ==> 113.001 - -12.001,101 ==> -113.001 - -1,5.123 ==> -6.123 - 5,-1.123 ==> 6.123 - -1,-1.123 ==> 0.123 -dmul - 0,0 ==> 0 - 0,1 ==> 0 - 1,0 ==> 0 - 1,1 ==> 1 - 5,6 ==> 30 - 6,5 ==> 30 - 101,-12 ==> -1212 - -12,101 ==> -1212 - -1,5 ==> -5 - 5,-1 ==> -5 - -1,-1 ==> 1 - 0.12,0.12 ==> 0.0144 - 0.812,1 ==> 0.812 - 1.821,0 ==> 0 - 1,1.212 ==> 1.212 - 5.543,6 ==> 33.258 - 6,5.121 ==> 30.726000000000003 - 101.001,-12 ==> -1212.0120000000002 - -12.001,101 ==> -1212.1009999999999 - -1,5.123 ==> -5.123 - 5,-1.123 ==> -5.615 - -1,-1.123 ==> 1.123 -ddiv - 0,0 ==> NaN - 0,1 ==> 0 - 1,0 ==> Infinity - 1,1 ==> 1 - 5,6 ==> 0.8333333333333334 - 6,5 ==> 1.2 - 101,-12 ==> -8.416666666666666 - -12,101 ==> -0.1188118811881188 - -1,5 ==> -0.2 - 5,-1 ==> -5 - -1,-1 ==> 1 - 0.12,0.12 ==> 1 - 0.812,1 ==> 0.812 - 1.821,0 ==> Infinity - 1,1.212 ==> 0.8250825082508251 - 5.543,6 ==> 0.9238333333333334 - 6,5.121 ==> 1.1716461628588166 - 101.001,-12 ==> -8.41675 - -12.001,101 ==> -0.11882178217821782 - -1,5.123 ==> -0.19519812609798945 - 5,-1.123 ==> -4.452359750667854 - -1,-1.123 ==> 0.8904719501335708 -dmin - 0,0 ==> 0 - 0,1 ==> 0 - 1,0 ==> 0 - 1,1 ==> 1 - 5,6 ==> 5 - 6,5 ==> 5 - 101,-12 ==> -12 - -12,101 ==> -12 - -1,5 ==> -1 - 5,-1 ==> -1 - -1,-1 ==> -1 - 0.12,0.12 ==> 0.12 - 0.812,1 ==> 0.812 - 1.821,0 ==> 0 - 1,1.212 ==> 1 - 5.543,6 ==> 5.543 - 6,5.121 ==> 5.121 - 101.001,-12 ==> -12 - -12.001,101 ==> -12.001 - -1,5.123 ==> -1 - 5,-1.123 ==> -1.123 - -1,-1.123 ==> -1.123 -dmax - 0,0 ==> 0 - 0,1 ==> 1 - 1,0 ==> 1 - 1,1 ==> 1 - 5,6 ==> 6 - 6,5 ==> 6 - 101,-12 ==> 101 - -12,101 ==> 101 - -1,5 ==> 5 - 5,-1 ==> 5 - -1,-1 ==> -1 - 0.12,0.12 ==> 0.12 - 0.812,1 ==> 1 - 1.821,0 ==> 1.821 - 1,1.212 ==> 1.212 - 5.543,6 ==> 6 - 6,5.121 ==> 6 - 101.001,-12 ==> 101.001 - -12.001,101 ==> 101 - -1,5.123 ==> 5.123 - 5,-1.123 ==> 5 - -1,-1.123 ==> -1 -deq - 0,0 ==> 1 - 0,1 ==> 0 - 1,0 ==> 0 - 1,1 ==> 1 - 5,6 ==> 0 - 6,5 ==> 0 - 101,-12 ==> 0 - -12,101 ==> 0 - -1,5 ==> 0 - 5,-1 ==> 0 - -1,-1 ==> 1 - 0.12,0.12 ==> 1 - 0.812,1 ==> 0 - 1.821,0 ==> 0 - 1,1.212 ==> 0 - 5.543,6 ==> 0 - 6,5.121 ==> 0 - 101.001,-12 ==> 0 - -12.001,101 ==> 0 - -1,5.123 ==> 0 - 5,-1.123 ==> 0 - -1,-1.123 ==> 0 -dne - 0,0 ==> 0 - 0,1 ==> 1 - 1,0 ==> 1 - 1,1 ==> 0 - 5,6 ==> 1 - 6,5 ==> 1 - 101,-12 ==> 1 - -12,101 ==> 1 - -1,5 ==> 1 - 5,-1 ==> 1 - -1,-1 ==> 0 - 0.12,0.12 ==> 0 - 0.812,1 ==> 1 - 1.821,0 ==> 1 - 1,1.212 ==> 1 - 5.543,6 ==> 1 - 6,5.121 ==> 1 - 101.001,-12 ==> 1 - -12.001,101 ==> 1 - -1,5.123 ==> 1 - 5,-1.123 ==> 1 - -1,-1.123 ==> 1 -dlt - 0,0 ==> 0 - 0,1 ==> 1 - 1,0 ==> 0 - 1,1 ==> 0 - 5,6 ==> 1 - 6,5 ==> 0 - 101,-12 ==> 0 - -12,101 ==> 1 - -1,5 ==> 1 - 5,-1 ==> 0 - -1,-1 ==> 0 - 0.12,0.12 ==> 0 - 0.812,1 ==> 1 - 1.821,0 ==> 0 - 1,1.212 ==> 1 - 5.543,6 ==> 1 - 6,5.121 ==> 0 - 101.001,-12 ==> 0 - -12.001,101 ==> 1 - -1,5.123 ==> 1 - 5,-1.123 ==> 0 - -1,-1.123 ==> 0 -dle - 0,0 ==> 1 - 0,1 ==> 1 - 1,0 ==> 0 - 1,1 ==> 1 - 5,6 ==> 1 - 6,5 ==> 0 - 101,-12 ==> 0 - -12,101 ==> 1 - -1,5 ==> 1 - 5,-1 ==> 0 - -1,-1 ==> 1 - 0.12,0.12 ==> 1 - 0.812,1 ==> 1 - 1.821,0 ==> 0 - 1,1.212 ==> 1 - 5.543,6 ==> 1 - 6,5.121 ==> 0 - 101.001,-12 ==> 0 - -12.001,101 ==> 1 - -1,5.123 ==> 1 - 5,-1.123 ==> 0 - -1,-1.123 ==> 0 -dgt - 0,0 ==> 0 - 0,1 ==> 0 - 1,0 ==> 1 - 1,1 ==> 0 - 5,6 ==> 0 - 6,5 ==> 1 - 101,-12 ==> 1 - -12,101 ==> 0 - -1,5 ==> 0 - 5,-1 ==> 1 - -1,-1 ==> 0 - 0.12,0.12 ==> 0 - 0.812,1 ==> 0 - 1.821,0 ==> 1 - 1,1.212 ==> 0 - 5.543,6 ==> 0 - 6,5.121 ==> 1 - 101.001,-12 ==> 1 - -12.001,101 ==> 0 - -1,5.123 ==> 0 - 5,-1.123 ==> 1 - -1,-1.123 ==> 1 -dge - 0,0 ==> 1 - 0,1 ==> 0 - 1,0 ==> 1 - 1,1 ==> 1 - 5,6 ==> 0 - 6,5 ==> 1 - 101,-12 ==> 1 - -12,101 ==> 0 - -1,5 ==> 0 - 5,-1 ==> 1 - -1,-1 ==> 1 - 0.12,0.12 ==> 1 - 0.812,1 ==> 0 - 1.821,0 ==> 1 - 1,1.212 ==> 0 - 5.543,6 ==> 0 - 6,5.121 ==> 1 - 101.001,-12 ==> 1 - -12.001,101 ==> 0 - -1,5.123 ==> 0 - 5,-1.123 ==> 1 - -1,-1.123 ==> 1 -int_to_double - 0 ==> 1.23 - 1 ==> 2.23 - -1 ==> 0.22999999999999998 - 0.5 ==> 1.23 - -0.5 ==> 1.23 - 1.4 ==> 2.23 - -1.4 ==> 0.22999999999999998 - 1.6 ==> 2.23 - -1.6 ==> 0.22999999999999998 - 5.1 ==> 6.23 - 5.3 ==> 6.23 - 5.7 ==> 6.23 - 5.9 ==> 6.23 - -1 ==> 0.22999999999999998 - 0 ==> 1.23 - -2 ==> -0.77 -uint_to_double - 0 ==> 1.23 - 1 ==> 2.23 - -1 ==> 4294967296.23 - 0.5 ==> 1.23 - -0.5 ==> 1.23 - 1.4 ==> 2.23 - -1.4 ==> 4294967296.23 - 1.6 ==> 2.23 - -1.6 ==> 4294967296.23 - 5.1 ==> 6.23 - 5.3 ==> 6.23 - 5.7 ==> 6.23 - 5.9 ==> 6.23 - -1 ==> 4294967296.23 - 0 ==> 1.23 - -2 ==> 4294967295.23 -double_to_int - 0 ==> 1 - 1 ==> 2 - -1 ==> 0 - 0.5 ==> 1 - -0.5 ==> 0 - 1.4 ==> 2 - -1.4 ==> 0 - 1.6 ==> 2 - -1.6 ==> 0 - 5.1 ==> 6 - 5.3 ==> 6 - 5.7 ==> 6 - 5.9 ==> 7 - -1 ==> 0 - 0 ==> 1 - -2 ==> 0 -done. diff --git a/test/unit.asm.js b/test/unit.asm.js index f002965ec..cfe99e0f3 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -607,6 +607,15 @@ function asm(global, env, buffer) { return; } + function f32_ucast(x) { + x = x | 0; + return Math_fround(x>>>0); + } + function f32_scast(x) { + x = x | 0; + return Math_fround(x|0); + } + function v() { } function vi(x) { diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index 608d68dcb..45e758970 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -1701,6 +1701,20 @@ ) (return) ) + (func $f32_ucast (param $x i32) (result f32) + (return + (f32.convert_u/i32 + (get_local $x) + ) + ) + ) + (func $f32_scast (param $x i32) (result f32) + (return + (f32.convert_s/i32 + (get_local $x) + ) + ) + ) (func $v (nop) ) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 0b8a67ca7..1502473ba 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -1707,6 +1707,20 @@ ) (return) ) + (func $f32_ucast (param $x i32) (result f32) + (return + (f32.convert_u/i32 + (get_local $x) + ) + ) + ) + (func $f32_scast (param $x i32) (result f32) + (return + (f32.convert_s/i32 + (get_local $x) + ) + ) + ) (func $v (nop) ) |