summaryrefslogtreecommitdiff
path: root/test/lld/shared.wast.out
blob: 135aa3e5b5f01b1b3986baa7d30e93915d261c88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
(module
 (type $0 (func (param i32) (result i32)))
 (type $1 (func))
 (type $2 (func (result i32)))
 (type $FUNCSIG$ii (func (param i32) (result i32)))
 (type $FUNCSIG$i (func (result i32)))
 (import "env" "memory" (memory $0 0))
 (data (global.get $gimport$2) "Hello, world\00\00\00\00\00\00\00\00\01\00\00\00")
 (import "env" "table" (table $0 2 funcref))
 (elem (global.get $gimport$3) $puts $print_message\28\29)
 (import "env" "__memory_base" (global $gimport$2 i32))
 (import "env" "__table_base" (global $gimport$3 i32))
 (import "env" "puts" (func $puts (param i32) (result i32)))
 (import "env" "g$external_var" (func $g$external_var (result i32)))
 (import "env" "fp$puts$ii" (func $fp$puts$ii (result i32)))
 (import "env" "fp$_Z13print_messagev$i" (func $fp$_Z13print_messagev$i (result i32)))
 (global $gimport$5 (mut i32) (i32.const 0))
 (global $gimport$6 (mut i32) (i32.const 0))
 (global $gimport$7 (mut i32) (i32.const 0))
 (global $global$0 i32 (i32.const 16))
 (global $global$1 i32 (i32.const 20))
 (export "_Z13print_messagev" (func $print_message\28\29))
 (export "ptr_puts" (global $global$0))
 (export "ptr_local_func" (global $global$1))
 (export "__post_instantiate" (func $__post_instantiate))
 (export "dynCall_ii" (func $dynCall_ii))
 (export "dynCall_i" (func $dynCall_i))
 (func $__wasm_call_ctors (; 4 ;) (type $1)
  (call $__wasm_apply_relocs)
 )
 (func $__wasm_apply_relocs (; 5 ;) (type $1)
  (i32.store
   (i32.add
    (global.get $gimport$2)
    (i32.const 16)
   )
   (i32.add
    (global.get $gimport$3)
    (i32.const 0)
   )
  )
  (i32.store
   (i32.add
    (global.get $gimport$2)
    (i32.const 20)
   )
   (i32.add
    (global.get $gimport$3)
    (i32.const 1)
   )
  )
 )
 (func $print_message\28\29 (; 6 ;) (type $2) (result i32)
  (drop
   (call $puts
    (i32.add
     (global.get $gimport$2)
     (i32.const 0)
    )
   )
  )
  (i32.load
   (global.get $gimport$5)
  )
 )
 (func $__post_instantiate (; 7 ;)
  (call $__assign_got_enties)
  (call $__wasm_call_ctors)
 )
 (func $__assign_got_enties (; 8 ;)
  (global.set $gimport$5
   (call $g$external_var)
  )
  (global.set $gimport$6
   (call $fp$puts$ii)
  )
  (global.set $gimport$7
   (call $fp$_Z13print_messagev$i)
  )
 )
 (func $dynCall_ii (; 9 ;) (param $fptr i32) (param $0 i32) (result i32)
  (call_indirect (type $FUNCSIG$ii)
   (local.get $0)
   (local.get $fptr)
  )
 )
 (func $dynCall_i (; 10 ;) (param $fptr i32) (result i32)
  (call_indirect (type $FUNCSIG$i)
   (local.get $fptr)
  )
 )
)
(;
--BEGIN METADATA --
{
  "staticBump": 0,
  "tableSize": 2,
  "declares": [
    "puts",
    "g$external_var",
    "fp$puts$ii",
    "fp$_Z13print_messagev$i"
  ],
  "externs": [
    "___memory_base",
    "___table_base"
  ],
  "implementedFunctions": [
    "__Z13print_messagev",
    "___post_instantiate",
    "_dynCall_ii",
    "_dynCall_i"
  ],
  "exports": [
    "_Z13print_messagev",
    "__post_instantiate",
    "dynCall_ii",
    "dynCall_i"
  ],
  "namedGlobals": {
    "ptr_puts" : "16",
    "ptr_local_func" : "20"
  },
  "invokeFuncs": [
  ],
  "features": [
  ]
}
-- END METADATA --
;)