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.clamp145
1 files changed, 49 insertions, 96 deletions
diff --git a/test/emcc_hello_world.fromasm.clamp b/test/emcc_hello_world.fromasm.clamp
index ea687d264..17c1a9336 100644
--- a/test/emcc_hello_world.fromasm.clamp
+++ b/test/emcc_hello_world.fromasm.clamp
@@ -149,7 +149,6 @@
)
(drop
(call $_printf
- (i32.const 672)
(get_local $0)
)
)
@@ -569,10 +568,8 @@
)
)
(set_local $0
- (tee_local $1
- (call $___fflush_unlocked
- (get_local $0)
- )
+ (call $___fflush_unlocked
+ (get_local $0)
)
)
)
@@ -640,9 +637,9 @@
)
(get_local $0)
)
- (func $_printf (; 33 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
- (set_local $2
+ (func $_printf (; 33 ;) (; has Stack IR ;) (param $0 i32) (result i32)
+ (local $1 i32)
+ (set_local $1
(get_global $STACKTOP)
)
(set_global $STACKTOP
@@ -659,20 +656,20 @@
(call $abort)
)
(i32.store
- (get_local $2)
(get_local $1)
+ (get_local $0)
)
(set_local $0
(call $_vfprintf
(i32.load
(i32.const 8)
)
- (get_local $0)
- (get_local $2)
+ (i32.const 672)
+ (get_local $1)
)
)
(set_global $STACKTOP
- (get_local $2)
+ (get_local $1)
)
(get_local $0)
)
@@ -1562,7 +1559,7 @@
)
)
)
- (func $_wcrtomb (; 38 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $_wcrtomb (; 38 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
(block $do-once (result i32)
(if (result i32)
(get_local $0)
@@ -1742,28 +1739,20 @@
(call $_wcrtomb
(get_local $0)
(get_local $1)
- (i32.const 0)
)
(i32.const 0)
)
)
- (func $_memchr (; 40 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $_memchr (; 40 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
+ (local $2 i32)
(local $3 i32)
- (local $4 i32)
- (local $5 i32)
- (set_local $5
- (i32.and
- (get_local $1)
- (i32.const 255)
- )
- )
(block $label$break$L8
(block $__rjti$2
(if
(i32.and
- (tee_local $4
+ (tee_local $3
(i32.ne
- (get_local $2)
+ (get_local $1)
(i32.const 0)
)
)
@@ -1776,27 +1765,17 @@
)
)
(block
- (set_local $4
- (i32.and
- (get_local $1)
- (i32.const 255)
- )
- )
- (set_local $3
- (get_local $2)
- )
(set_local $2
+ (get_local $1)
+ )
+ (set_local $1
(get_local $0)
)
(loop $while-in
(br_if $__rjti$2
- (i32.eq
+ (i32.eqz
(i32.load8_u
- (get_local $2)
- )
- (i32.and
- (get_local $4)
- (i32.const 255)
+ (get_local $1)
)
)
)
@@ -1804,9 +1783,9 @@
(i32.and
(tee_local $0
(i32.ne
- (tee_local $3
+ (tee_local $2
(i32.add
- (get_local $3)
+ (get_local $2)
(i32.const -1)
)
)
@@ -1815,9 +1794,9 @@
)
(i32.ne
(i32.and
- (tee_local $2
+ (tee_local $1
(i32.add
- (get_local $2)
+ (get_local $1)
(i32.const 1)
)
)
@@ -1830,14 +1809,14 @@
)
)
(block
- (set_local $3
- (get_local $2)
- )
(set_local $2
+ (get_local $1)
+ )
+ (set_local $1
(get_local $0)
)
(set_local $0
- (get_local $4)
+ (get_local $3)
)
)
)
@@ -1850,27 +1829,13 @@
(br $label$break$L8)
)
(set_local $0
- (get_local $3)
+ (get_local $2)
)
(if
- (i32.ne
- (i32.load8_u
- (get_local $2)
- )
- (tee_local $1
- (i32.and
- (get_local $1)
- (i32.const 255)
- )
- )
+ (i32.load8_u
+ (get_local $1)
)
(block
- (set_local $3
- (i32.mul
- (get_local $5)
- (i32.const 16843009)
- )
- )
(block $__rjto$0
(block $__rjti$0
(br_if $__rjti$0
@@ -1885,12 +1850,9 @@
(i32.and
(i32.xor
(i32.and
- (tee_local $4
- (i32.xor
- (i32.load
- (get_local $2)
- )
- (get_local $3)
+ (tee_local $3
+ (i32.load
+ (get_local $1)
)
)
(i32.const -2139062144)
@@ -1898,15 +1860,15 @@
(i32.const -2139062144)
)
(i32.add
- (get_local $4)
+ (get_local $3)
(i32.const -16843009)
)
)
)
(block
- (set_local $2
+ (set_local $1
(i32.add
- (get_local $2)
+ (get_local $1)
(i32.const 4)
)
)
@@ -1941,19 +1903,15 @@
)
(loop $while-in5
(br_if $label$break$L8
- (i32.eq
+ (i32.eqz
(i32.load8_u
- (get_local $2)
- )
- (i32.and
(get_local $1)
- (i32.const 255)
)
)
)
- (set_local $2
+ (set_local $1
(i32.add
- (get_local $2)
+ (get_local $1)
(i32.const 1)
)
)
@@ -1973,7 +1931,7 @@
)
)
(select
- (get_local $2)
+ (get_local $1)
(i32.const 0)
(get_local $0)
)
@@ -4589,7 +4547,6 @@
(get_global $tempRet0)
)
(i32.const 1000000000)
- (i32.const 0)
)
)
(set_local $12
@@ -4597,7 +4554,6 @@
(get_local $12)
(get_local $18)
(i32.const 1000000000)
- (i32.const 0)
)
)
(br_if $while-in66
@@ -6532,7 +6488,6 @@
(tee_local $13
(call $_memchr
(get_local $7)
- (i32.const 0)
(get_local $6)
)
)
@@ -7474,7 +7429,6 @@
(get_local $0)
(get_local $1)
(i32.const 10)
- (i32.const 0)
)
)
(i32.const 48)
@@ -7485,7 +7439,6 @@
(get_local $0)
(get_local $1)
(i32.const 10)
- (i32.const 0)
)
)
(set_local $4
@@ -15360,18 +15313,18 @@
)
(get_local $3)
)
- (func $___udivdi3 (; 62 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (func $___udivdi3 (; 62 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(call $___udivmoddi4
(get_local $0)
(get_local $1)
(get_local $2)
- (get_local $3)
+ (i32.const 0)
(i32.const 0)
)
)
- (func $___uremdi3 (; 63 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
- (local $4 i32)
- (set_local $4
+ (func $___uremdi3 (; 63 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ (set_local $3
(get_global $STACKTOP)
)
(set_global $STACKTOP
@@ -15385,20 +15338,20 @@
(get_local $0)
(get_local $1)
(get_local $2)
+ (i32.const 0)
(get_local $3)
- (get_local $4)
)
)
(set_global $STACKTOP
- (get_local $4)
+ (get_local $3)
)
(set_global $tempRet0
(i32.load offset=4
- (get_local $4)
+ (get_local $3)
)
)
(i32.load
- (get_local $4)
+ (get_local $3)
)
)
(func $___udivmoddi4 (; 64 ;) (; has Stack IR ;) (param $xl i32) (param $xh i32) (param $yl i32) (param $yh i32) (param $r i32) (result i32)