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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
| # RUN: llvm-mc -show-encoding -triple=wasm32-unkown-unknown -mattr=+atomics < %s | FileCheck %s
main:
.functype main () -> ()
# CHECK: atomic.notify 0 # encoding: [0xfe,0x00,0x02,0x00]
atomic.notify 0
# CHECK: i32.atomic.wait 0 # encoding: [0xfe,0x01,0x02,0x00]
i32.atomic.wait 0
# CHECK: i64.atomic.wait 0 # encoding: [0xfe,0x02,0x03,0x00]
i64.atomic.wait 0
# CHECK: atomic.fence # encoding: [0xfe,0x03,0x00]
atomic.fence
# CHECK: i32.atomic.load 0 # encoding: [0xfe,0x10,0x02,0x00]
i32.atomic.load 0
# CHECK: i64.atomic.load 4 # encoding: [0xfe,0x11,0x03,0x04]
i64.atomic.load 4
# CHECK: i32.atomic.load8_u 48 # encoding: [0xfe,0x12,0x00,0x30]
i32.atomic.load8_u 48
# CHECK: i32.atomic.load16_u 0 # encoding: [0xfe,0x13,0x01,0x00]
i32.atomic.load16_u 0
# CHECK: i64.atomic.load8_u 0 # encoding: [0xfe,0x14,0x00,0x00]
i64.atomic.load8_u 0
# CHECK: i64.atomic.load16_u 0 # encoding: [0xfe,0x15,0x01,0x00]
i64.atomic.load16_u 0
# CHECK: i64.atomic.load32_u 0 # encoding: [0xfe,0x16,0x02,0x00]
i64.atomic.load32_u 0
# CHECK: i32.atomic.store 0 # encoding: [0xfe,0x17,0x02,0x00]
i32.atomic.store 0
# CHECK: i64.atomic.store 8 # encoding: [0xfe,0x18,0x03,0x08]
i64.atomic.store 8
# CHECK: i32.atomic.store8 0 # encoding: [0xfe,0x19,0x00,0x00]
i32.atomic.store8 0
# CHECK: i32.atomic.store16 0 # encoding: [0xfe,0x1a,0x01,0x00]
i32.atomic.store16 0
# CHECK: i64.atomic.store8 16 # encoding: [0xfe,0x1b,0x00,0x10]
i64.atomic.store8 16
# CHECK: i64.atomic.store16 0 # encoding: [0xfe,0x1c,0x01,0x00]
i64.atomic.store16 0
# CHECK: i64.atomic.store32 0 # encoding: [0xfe,0x1d,0x02,0x00]
i64.atomic.store32 0
# CHECK: i32.atomic.rmw.add 0 # encoding: [0xfe,0x1e,0x02,0x00]
i32.atomic.rmw.add 0
# CHECK: i64.atomic.rmw.add 0 # encoding: [0xfe,0x1f,0x03,0x00]
i64.atomic.rmw.add 0
# CHECK: i32.atomic.rmw8.add_u 0 # encoding: [0xfe,0x20,0x00,0x00]
i32.atomic.rmw8.add_u 0
# CHECK: i32.atomic.rmw16.add_u 0 # encoding: [0xfe,0x21,0x01,0x00]
i32.atomic.rmw16.add_u 0
# CHECK: i64.atomic.rmw8.add_u 0 # encoding: [0xfe,0x22,0x00,0x00]
i64.atomic.rmw8.add_u 0
# CHECK: i64.atomic.rmw16.add_u 0 # encoding: [0xfe,0x23,0x01,0x00]
i64.atomic.rmw16.add_u 0
# CHECK: i64.atomic.rmw32.add_u 16 # encoding: [0xfe,0x24,0x02,0x10]
i64.atomic.rmw32.add_u 16
# CHECK: i32.atomic.rmw.sub 0 # encoding: [0xfe,0x25,0x02,0x00]
i32.atomic.rmw.sub 0
# CHECK: i64.atomic.rmw.sub 0 # encoding: [0xfe,0x26,0x03,0x00]
i64.atomic.rmw.sub 0
# CHECK: i32.atomic.rmw8.sub_u 0 # encoding: [0xfe,0x27,0x00,0x00]
i32.atomic.rmw8.sub_u 0
# CHECK: i32.atomic.rmw16.sub_u 0 # encoding: [0xfe,0x28,0x01,0x00]
i32.atomic.rmw16.sub_u 0
# CHECK: i64.atomic.rmw8.sub_u 8 # encoding: [0xfe,0x29,0x00,0x08]
i64.atomic.rmw8.sub_u 8
# CHECK: i64.atomic.rmw16.sub_u 0 # encoding: [0xfe,0x2a,0x01,0x00]
i64.atomic.rmw16.sub_u 0
# CHECK: i64.atomic.rmw32.sub_u 0 # encoding: [0xfe,0x2b,0x02,0x00]
i64.atomic.rmw32.sub_u 0
# CHECK: i32.atomic.rmw.and 0 # encoding: [0xfe,0x2c,0x02,0x00]
i32.atomic.rmw.and 0
# CHECK: i64.atomic.rmw.and 0 # encoding: [0xfe,0x2d,0x03,0x00]
i64.atomic.rmw.and 0
# CHECK: i32.atomic.rmw8.and_u 0 # encoding: [0xfe,0x2e,0x00,0x00]
i32.atomic.rmw8.and_u 0
# CHECK: i32.atomic.rmw16.and_u 0 # encoding: [0xfe,0x2f,0x01,0x00]
i32.atomic.rmw16.and_u 0
# CHECK: i64.atomic.rmw8.and_u 96 # encoding: [0xfe,0x30,0x00,0x60]
i64.atomic.rmw8.and_u 96
# CHECK: i64.atomic.rmw16.and_u 0 # encoding: [0xfe,0x31,0x01,0x00]
i64.atomic.rmw16.and_u 0
# CHECK: i64.atomic.rmw32.and_u 0 # encoding: [0xfe,0x32,0x02,0x00]
i64.atomic.rmw32.and_u 0
# CHECK: i32.atomic.rmw.or 0 # encoding: [0xfe,0x33,0x02,0x00]
i32.atomic.rmw.or 0
# CHECK: i64.atomic.rmw.or 0 # encoding: [0xfe,0x34,0x03,0x00]
i64.atomic.rmw.or 0
# CHECK: i32.atomic.rmw8.or_u 0 # encoding: [0xfe,0x35,0x00,0x00]
i32.atomic.rmw8.or_u 0
# CHECK: i32.atomic.rmw16.or_u 0 # encoding: [0xfe,0x36,0x01,0x00]
i32.atomic.rmw16.or_u 0
# CHECK: i64.atomic.rmw8.or_u 0 # encoding: [0xfe,0x37,0x00,0x00]
i64.atomic.rmw8.or_u 0
# CHECK: i64.atomic.rmw16.or_u 48 # encoding: [0xfe,0x38,0x01,0x30]
i64.atomic.rmw16.or_u 48
# CHECK: i64.atomic.rmw32.or_u 0 # encoding: [0xfe,0x39,0x02,0x00]
i64.atomic.rmw32.or_u 0
# CHECK: i32.atomic.rmw.xor 0 # encoding: [0xfe,0x3a,0x02,0x00]
i32.atomic.rmw.xor 0
# CHECK: i64.atomic.rmw.xor 0 # encoding: [0xfe,0x3b,0x03,0x00]
i64.atomic.rmw.xor 0
# CHECK: i32.atomic.rmw8.xor_u 4 # encoding: [0xfe,0x3c,0x00,0x04]
i32.atomic.rmw8.xor_u 4
# CHECK: i32.atomic.rmw16.xor_u 0 # encoding: [0xfe,0x3d,0x01,0x00]
i32.atomic.rmw16.xor_u 0
# CHECK: i64.atomic.rmw8.xor_u 0 # encoding: [0xfe,0x3e,0x00,0x00]
i64.atomic.rmw8.xor_u 0
# CHECK: i64.atomic.rmw16.xor_u 0 # encoding: [0xfe,0x3f,0x01,0x00]
i64.atomic.rmw16.xor_u 0
# CHECK: i64.atomic.rmw32.xor_u 0 # encoding: [0xfe,0x40,0x02,0x00]
i64.atomic.rmw32.xor_u 0
# CHECK: i32.atomic.rmw.xchg 0 # encoding: [0xfe,0x41,0x02,0x00]
i32.atomic.rmw.xchg 0
# CHECK: i64.atomic.rmw.xchg 0 # encoding: [0xfe,0x42,0x03,0x00]
i64.atomic.rmw.xchg 0
# CHECK: i32.atomic.rmw8.xchg_u 0 # encoding: [0xfe,0x43,0x00,0x00]
i32.atomic.rmw8.xchg_u 0
# CHECK: i32.atomic.rmw16.xchg_u 0 # encoding: [0xfe,0x44,0x01,0x00]
i32.atomic.rmw16.xchg_u 0
# CHECK: i64.atomic.rmw8.xchg_u 0 # encoding: [0xfe,0x45,0x00,0x00]
i64.atomic.rmw8.xchg_u 0
# CHECK: i64.atomic.rmw16.xchg_u 8 # encoding: [0xfe,0x46,0x01,0x08]
i64.atomic.rmw16.xchg_u 8
# CHECK: i64.atomic.rmw32.xchg_u 0 # encoding: [0xfe,0x47,0x02,0x00]
i64.atomic.rmw32.xchg_u 0
# CHECK: i32.atomic.rmw.cmpxchg 32 # encoding: [0xfe,0x48,0x02,0x20]
i32.atomic.rmw.cmpxchg 32
# CHECK: i64.atomic.rmw.cmpxchg 0 # encoding: [0xfe,0x49,0x03,0x00]
i64.atomic.rmw.cmpxchg 0
# CHECK: i32.atomic.rmw8.cmpxchg_u 0 # encoding: [0xfe,0x4a,0x00,0x00]
i32.atomic.rmw8.cmpxchg_u 0
# CHECK: i32.atomic.rmw16.cmpxchg_u 0 # encoding: [0xfe,0x4b,0x01,0x00]
i32.atomic.rmw16.cmpxchg_u 0
# CHECK: i64.atomic.rmw8.cmpxchg_u 16 # encoding: [0xfe,0x4c,0x00,0x10]
i64.atomic.rmw8.cmpxchg_u 16
# CHECK: i64.atomic.rmw16.cmpxchg_u 0 # encoding: [0xfe,0x4d,0x01,0x00]
i64.atomic.rmw16.cmpxchg_u 0
# CHECK: i64.atomic.rmw32.cmpxchg_u 0 # encoding: [0xfe,0x4e,0x02,0x00]
i64.atomic.rmw32.cmpxchg_u 0
end_function
|