File tree Expand file tree Collapse file tree 1 file changed +71
-71
lines changed Expand file tree Collapse file tree 1 file changed +71
-71
lines changed Original file line number Diff line number Diff line change 7
7
(export " get_high" (func $get_high ))
8
8
(global $high (mut i32 ) (i32.const 0 ))
9
9
(func $get_high (result i32 )
10
- (get_global $high )
10
+ (global.get $high )
11
11
)
12
12
(func $mul (param $xl i32 ) (param $xh i32 ) (param $yl i32 ) (param $yh i32 ) (result i32 )
13
13
(local $result i64 )
14
- (set_local $result
14
+ (local.set $result
15
15
(i64.mul
16
16
(i64.or
17
- (i64.extend_u / i32
18
- (get_local $xl )
17
+ (i64.extend_i32_u
18
+ (local.get $xl )
19
19
)
20
20
(i64.shl
21
- (i64.extend_u / i32
22
- (get_local $xh )
21
+ (i64.extend_i32_u
22
+ (local.get $xh )
23
23
)
24
24
(i64.const 32 )
25
25
)
26
26
)
27
27
(i64.or
28
- (i64.extend_u / i32
29
- (get_local $yl )
28
+ (i64.extend_i32_u
29
+ (local.get $yl )
30
30
)
31
31
(i64.shl
32
- (i64.extend_u / i32
33
- (get_local $yh )
32
+ (i64.extend_i32_u
33
+ (local.get $yh )
34
34
)
35
35
(i64.const 32 )
36
36
)
37
37
)
38
38
)
39
39
)
40
- (set_global $high
41
- (i32.wrap / i64
40
+ (global.set $high
41
+ (i32.wrap_i64
42
42
(i64.shr_s
43
- (get_local $result )
43
+ (local.get $result )
44
44
(i64.const 32 )
45
45
)
46
46
)
47
47
)
48
- (i32.wrap / i64
49
- (get_local $result )
48
+ (i32.wrap_i64
49
+ (local.get $result )
50
50
)
51
51
)
52
52
(func $div_s (param $xl i32 ) (param $xh i32 ) (param $yl i32 ) (param $yh i32 ) (result i32 )
53
53
(local $result i64 )
54
- (set_local $result
54
+ (local.set $result
55
55
(i64.div_s
56
56
(i64.or
57
- (i64.extend_u / i32
58
- (get_local $xl )
57
+ (i64.extend_i32_u
58
+ (local.get $xl )
59
59
)
60
60
(i64.shl
61
- (i64.extend_u / i32
62
- (get_local $xh )
61
+ (i64.extend_i32_u
62
+ (local.get $xh )
63
63
)
64
64
(i64.const 32 )
65
65
)
66
66
)
67
67
(i64.or
68
- (i64.extend_u / i32
69
- (get_local $yl )
68
+ (i64.extend_i32_u
69
+ (local.get $yl )
70
70
)
71
71
(i64.shl
72
- (i64.extend_u / i32
73
- (get_local $yh )
72
+ (i64.extend_i32_u
73
+ (local.get $yh )
74
74
)
75
75
(i64.const 32 )
76
76
)
77
77
)
78
78
)
79
79
)
80
- (set_global $high
81
- (i32.wrap / i64
80
+ (global.set $high
81
+ (i32.wrap_i64
82
82
(i64.shr_s
83
- (get_local $result )
83
+ (local.get $result )
84
84
(i64.const 32 )
85
85
)
86
86
)
87
87
)
88
- (i32.wrap / i64
89
- (get_local $result )
88
+ (i32.wrap_i64
89
+ (local.get $result )
90
90
)
91
91
)
92
92
(func $div_u (param $xl i32 ) (param $xh i32 ) (param $yl i32 ) (param $yh i32 ) (result i32 )
93
93
(local $result i64 )
94
- (set_local $result
94
+ (local.set $result
95
95
(i64.div_u
96
96
(i64.or
97
- (i64.extend_u / i32
98
- (get_local $xl )
97
+ (i64.extend_i32_u
98
+ (local.get $xl )
99
99
)
100
100
(i64.shl
101
- (i64.extend_u / i32
102
- (get_local $xh )
101
+ (i64.extend_i32_u
102
+ (local.get $xh )
103
103
)
104
104
(i64.const 32 )
105
105
)
106
106
)
107
107
(i64.or
108
- (i64.extend_u / i32
109
- (get_local $yl )
108
+ (i64.extend_i32_u
109
+ (local.get $yl )
110
110
)
111
111
(i64.shl
112
- (i64.extend_u / i32
113
- (get_local $yh )
112
+ (i64.extend_i32_u
113
+ (local.get $yh )
114
114
)
115
115
(i64.const 32 )
116
116
)
117
117
)
118
118
)
119
119
)
120
- (set_global $high
121
- (i32.wrap / i64
120
+ (global.set $high
121
+ (i32.wrap_i64
122
122
(i64.shr_s
123
- (get_local $result )
123
+ (local.get $result )
124
124
(i64.const 32 )
125
125
)
126
126
)
127
127
)
128
- (i32.wrap / i64
129
- (get_local $result )
128
+ (i32.wrap_i64
129
+ (local.get $result )
130
130
)
131
131
)
132
132
(func $rem_s (param $xl i32 ) (param $xh i32 ) (param $yl i32 ) (param $yh i32 ) (result i32 )
133
133
(local $result i64 )
134
- (set_local $result
134
+ (local.set $result
135
135
(i64.rem_s
136
136
(i64.or
137
- (i64.extend_u / i32
138
- (get_local $xl )
137
+ (i64.extend_i32_u
138
+ (local.get $xl )
139
139
)
140
140
(i64.shl
141
- (i64.extend_u / i32
142
- (get_local $xh )
141
+ (i64.extend_i32_u
142
+ (local.get $xh )
143
143
)
144
144
(i64.const 32 )
145
145
)
146
146
)
147
147
(i64.or
148
- (i64.extend_u / i32
149
- (get_local $yl )
148
+ (i64.extend_i32_u
149
+ (local.get $yl )
150
150
)
151
151
(i64.shl
152
- (i64.extend_u / i32
153
- (get_local $yh )
152
+ (i64.extend_i32_u
153
+ (local.get $yh )
154
154
)
155
155
(i64.const 32 )
156
156
)
157
157
)
158
158
)
159
159
)
160
- (set_global $high
161
- (i32.wrap / i64
160
+ (global.set $high
161
+ (i32.wrap_i64
162
162
(i64.shr_s
163
- (get_local $result )
163
+ (local.get $result )
164
164
(i64.const 32 )
165
165
)
166
166
)
167
167
)
168
- (i32.wrap / i64
169
- (get_local $result )
168
+ (i32.wrap_i64
169
+ (local.get $result )
170
170
)
171
171
)
172
172
(func $rem_u (param $xl i32 ) (param $xh i32 ) (param $yl i32 ) (param $yh i32 ) (result i32 )
173
173
(local $result i64 )
174
- (set_local $result
174
+ (local.set $result
175
175
(i64.rem_u
176
176
(i64.or
177
- (i64.extend_u / i32
178
- (get_local $xl )
177
+ (i64.extend_i32_u
178
+ (local.get $xl )
179
179
)
180
180
(i64.shl
181
- (i64.extend_u / i32
182
- (get_local $xh )
181
+ (i64.extend_i32_u
182
+ (local.get $xh )
183
183
)
184
184
(i64.const 32 )
185
185
)
186
186
)
187
187
(i64.or
188
- (i64.extend_u / i32
189
- (get_local $yl )
188
+ (i64.extend_i32_u
189
+ (local.get $yl )
190
190
)
191
191
(i64.shl
192
- (i64.extend_u / i32
193
- (get_local $yh )
192
+ (i64.extend_i32_u
193
+ (local.get $yh )
194
194
)
195
195
(i64.const 32 )
196
196
)
197
197
)
198
198
)
199
199
)
200
- (set_global $high
201
- (i32.wrap / i64
200
+ (global.set $high
201
+ (i32.wrap_i64
202
202
(i64.shr_s
203
- (get_local $result )
203
+ (local.get $result )
204
204
(i64.const 32 )
205
205
)
206
206
)
207
207
)
208
- (i32.wrap / i64
209
- (get_local $result )
208
+ (i32.wrap_i64
209
+ (local.get $result )
210
210
)
211
211
)
212
212
)
You can’t perform that action at this time.
0 commit comments