summaryrefslogtreecommitdiff
path: root/test/emcc_hello_world.fromasm.clamp
diff options
context:
space:
mode:
Diffstat (limited to 'test/emcc_hello_world.fromasm.clamp')
-rw-r--r--test/emcc_hello_world.fromasm.clamp28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/emcc_hello_world.fromasm.clamp b/test/emcc_hello_world.fromasm.clamp
index b074afa30..e483ed89c 100644
--- a/test/emcc_hello_world.fromasm.clamp
+++ b/test/emcc_hello_world.fromasm.clamp
@@ -2214,6 +2214,32 @@
)
)
)
+ (func $f64-to-uint (param $0 f64) (result i32)
+ (if (result i32)
+ (f64.ne
+ (get_local $0)
+ (get_local $0)
+ )
+ (i32.const 0)
+ (if (result i32)
+ (f64.ge
+ (get_local $0)
+ (f64.const 4294967296)
+ )
+ (i32.const 0)
+ (if (result i32)
+ (f64.le
+ (get_local $0)
+ (f64.const -1)
+ )
+ (i32.const 0)
+ (i32.trunc_u/f64
+ (get_local $0)
+ )
+ )
+ )
+ )
+ )
(func $i32s-div (param $0 i32) (param $1 i32) (result i32)
(if (result i32)
(get_local $1)
@@ -4587,7 +4613,7 @@
(i32.store
(get_local $7)
(tee_local $5
- (call $f64-to-int
+ (call $f64-to-uint
(get_local $15)
)
)