]> git.proxmox.com Git - rustc.git/blob - src/binaryen/test/dot_s/globals.wast
New upstream version 1.25.0+dfsg1
[rustc.git] / src / binaryen / test / dot_s / globals.wast
1 (module
2 (import "env" "memory" (memory $0 1))
3 (import "env" "imported_global" (global $imported_global i32))
4 (table 0 anyfunc)
5 (data (i32.const 12) "\11\00\00\00")
6 (data (i32.const 16) "\0c\00\00\00")
7 (data (i32.const 20) "\0e\00\00\00")
8 (export "globals" (func $globals))
9 (export "import_globals" (func $import_globals))
10 (export "globals_offset" (func $globals_offset))
11 (export "import_globals_offset" (func $import_globals_offset))
12 (export "stackSave" (func $stackSave))
13 (export "stackAlloc" (func $stackAlloc))
14 (export "stackRestore" (func $stackRestore))
15 (func $globals (; 0 ;)
16 (i32.store offset=12
17 (i32.const 0)
18 (i32.const 7)
19 )
20 (drop
21 (i32.load offset=12
22 (i32.const 0)
23 )
24 )
25 (drop
26 (i32.const 12)
27 )
28 )
29 (func $import_globals (; 1 ;)
30 (i32.store
31 (get_global $imported_global)
32 (i32.const 7)
33 )
34 (drop
35 (i32.load
36 (get_global $imported_global)
37 )
38 )
39 (drop
40 (get_global $imported_global)
41 )
42 )
43 (func $globals_offset (; 2 ;)
44 (i32.store offset=24
45 (i32.const 4)
46 (i32.const 7)
47 )
48 (drop
49 (i32.load offset=8
50 (i32.const 8)
51 )
52 )
53 (drop
54 (i32.const 28)
55 )
56 )
57 (func $import_globals_offset (; 3 ;)
58 (i32.store offset=12
59 (i32.add
60 (i32.const 4)
61 (get_global $imported_global)
62 )
63 (i32.const 7)
64 )
65 (drop
66 (i32.load
67 (i32.add
68 (i32.const 8)
69 (i32.add
70 (i32.const -4)
71 (get_global $imported_global)
72 )
73 )
74 )
75 )
76 (drop
77 (i32.add
78 (i32.const 16)
79 (get_global $imported_global)
80 )
81 )
82 )
83 (func $stackSave (; 4 ;) (result i32)
84 (i32.load offset=4
85 (i32.const 0)
86 )
87 )
88 (func $stackAlloc (; 5 ;) (param $0 i32) (result i32)
89 (local $1 i32)
90 (set_local $1
91 (i32.load offset=4
92 (i32.const 0)
93 )
94 )
95 (i32.store offset=4
96 (i32.const 0)
97 (i32.and
98 (i32.sub
99 (get_local $1)
100 (get_local $0)
101 )
102 (i32.const -16)
103 )
104 )
105 (get_local $1)
106 )
107 (func $stackRestore (; 6 ;) (param $0 i32)
108 (i32.store offset=4
109 (i32.const 0)
110 (get_local $0)
111 )
112 )
113 )
114 ;; METADATA: { "asmConsts": {},"staticBump": 24, "initializers": [] }