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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
|
# RUN: llvm-mc --disassemble %s -triple=mipsel-unknown-linux -mattr=micromips \
# RUN: | FileCheck %s
0xe6 0x00 0x10 0x49 # CHECK: add $9, $6, $7
0x26 0x11 0x67 0x45 # CHECK: addi $9, $6, 17767
0x26 0x31 0x67 0xc5 # CHECK: addiu $9, $6, -15001
0x26 0x11 0x67 0x45 # CHECK: addi $9, $6, 17767
0x26 0x31 0x67 0xc5 # CHECK: addiu $9, $6, -15001
0xf9 0x4f # CHECK: addiusp -16
0xff 0x4f # CHECK: addiusp -1028
0xfd 0x4f # CHECK: addiusp -1032
0x01 0x4c # CHECK: addiusp 1024
0x03 0x4c # CHECK: addiusp 1028
0xe6 0x00 0x50 0x49 # CHECK: addu $9, $6, $7
0x29 0x2c # CHECK: andi16 $16, $2, 31
0xe6 0x00 0x90 0x49 # CHECK: sub $9, $6, $7
0xa3 0x00 0xd0 0x21 # CHECK: subu $4, $3, $5
0xe0 0x00 0x90 0x31 # CHECK: sub $6, $zero, $7
0xe0 0x00 0xd0 0x31 # CHECK: subu $6, $zero, $7
0x08 0x00 0x50 0x39 # CHECK: addu $7, $8, $zero
0xa3 0x00 0x50 0x1b # CHECK: slt $3, $3, $5
0x63 0x90 0x67 0x00 # CHECK: slti $3, $3, 103
0x63 0x90 0x67 0x00 # CHECK: slti $3, $3, 103
0x63 0xb0 0x67 0x00 # CHECK: sltiu $3, $3, 103
0xa3 0x00 0x90 0x1b # CHECK: sltu $3, $3, $5
0xa9 0x41 0x67 0x45 # CHECK: lui $9, 17767
0xe6 0x00 0x50 0x4a # CHECK: and $9, $6, $7
0x26 0xd1 0x67 0x45 # CHECK: andi $9, $6, 17767
0x26 0xd1 0x67 0x45 # CHECK: andi $9, $6, 17767
0xa4 0x00 0x90 0x1a # CHECK: or $3, $4, $5
0x26 0x51 0x67 0x45 # CHECK: ori $9, $6, 17767
0xa3 0x00 0x10 0x1b # CHECK: xor $3, $3, $5
0x26 0x71 0x67 0x45 # CHECK: xori $9, $6, 17767
0x26 0x71 0x67 0x45 # CHECK: xori $9, $6, 17767
0xe6 0x00 0xd0 0x4a # CHECK: nor $9, $6, $7
0x08 0x00 0xd0 0x3a # CHECK: not $7, $8
0xe6 0x00 0x10 0x4a # CHECK: mul $9, $6, $7
0xe9 0x00 0x3c 0x8b # CHECK: mult $9, $7
0xe9 0x00 0x3c 0x9b # CHECK: multu $9, $7
0xe9 0x00 0x3c 0xab # CHECK: div $zero, $9, $7
0xe9 0x00 0x3c 0xbb # CHECK: divu $zero, $9, $7
0x83 0x00 0x00 0x38 # CHECK: sll $4, $3, 7
0x65 0x00 0x10 0x10 # CHECK: sllv $2, $3, $5
0x83 0x00 0x80 0x38 # CHECK: sra $4, $3, 7
0x65 0x00 0x90 0x10 # CHECK: srav $2, $3, $5
0x83 0x00 0x40 0x38 # CHECK: srl $4, $3, 7
0x65 0x00 0x50 0x10 # CHECK: srlv $2, $3, $5
0x26 0x01 0xc0 0x38 # CHECK: rotr $9, $6, 7
0xc7 0x00 0xd0 0x48 # CHECK: rotrv $9, $6, $7
0xa4 0x1c 0x08 0x00 # CHECK: lb $5, 8($4)
0xc4 0x14 0x08 0x00 # CHECK: lbu $6, 8($4)
0x44 0x3c 0x08 0x00 # CHECK: lh $2, 8($4)
0x82 0x34 0x08 0x00 # CHECK: lhu $4, 8($2)
0xc5 0xfc 0x04 0x00 # CHECK: lw $6, 4($5)
0xdd 0xfc 0x7b 0x00 # CHECK: lw $6, 123($sp)
0xa4 0x18 0x08 0x00 # CHECK: sb $5, 8($4)
0x44 0x38 0x08 0x00 # CHECK: sh $2, 8($4)
0xa6 0xf8 0x04 0x00 # CHECK: sw $5, 4($6)
0xbd 0xf8 0x7b 0x00 # CHECK: sw $5, 123($sp)
0x44 0x60 0x08 0xe0 # CHECK: lwu $2, 8($4)
0x85 0x60 0x10 0x00 # CHECK: lwl $4, 16($5)
0x85 0x60 0x10 0x10 # CHECK: lwr $4, 16($5)
0x85 0x60 0x10 0x80 # CHECK: swl $4, 16($5)
0x85 0x60 0x10 0x90 # CHECK: swr $4, 16($5)
0xe6 0x00 0x58 0x48 # CHECK: movz $9, $6, $7
0xe6 0x00 0x18 0x48 # CHECK: movn $9, $6, $7
0x26 0x55 0x7b 0x09 # CHECK: movt $9, $6, $fcc0
0x26 0x55 0x7b 0x01 # CHECK: movf $9, $6, $fcc0
0x06 0x00 0x7c 0x2d # CHECK: mthi $6
0x06 0x00 0x7c 0x0d # CHECK: mfhi $6
0x06 0x00 0x7c 0x3d # CHECK: mtlo $6
0x06 0x00 0x7c 0x1d # CHECK: mflo $6
0xa4 0x00 0x3c 0xcb # CHECK: madd $4, $5
0xa4 0x00 0x3c 0xdb # CHECK: maddu $4, $5
0xa4 0x00 0x3c 0xeb # CHECK: msub $4, $5
0xa4 0x00 0x3c 0xfb # CHECK: msubu $4, $5
0x26 0x01 0x3c 0x5b # CHECK: clz $9, $6
0x26 0x01 0x3c 0x4b # CHECK: clo $9, $6
0x26 0x01 0x3c 0x2b # CHECK: seb $9, $6
0x26 0x01 0x3c 0x3b # CHECK: seh $9, $6
0x26 0x01 0x3c 0x7b # CHECK: wsbh $9, $6
0x26 0x01 0xec 0x30 # CHECK: ext $9, $6, 3, 7
0x26 0x01 0xcc 0x48 # CHECK: ins $9, $6, 3, 7
0x00 0xd4 0x98 0x02 # CHECK: j 1328
0x00 0xf4 0x98 0x02 # CHECK: jal 1328
0xe6 0x03 0x3c 0x0f # CHECK: jalr $ra, $6
0x07 0x00 0x3c 0x0f # CHECK: jr $7
0x05 0x47 # CHECK: jraddiusp 20
0xc9 0x94 0x9a 0x02 # CHECK: beq $9, $6, 1332
0x46 0x40 0x9a 0x02 # CHECK: bgez $6, 1332
0x66 0x40 0x9a 0x02 # CHECK: bgezal $6, 1332
0x26 0x40 0x9a 0x02 # CHECK: bltzal $6, 1332
0xc6 0x40 0x9a 0x02 # CHECK: bgtz $6, 1332
0x86 0x40 0x9a 0x02 # CHECK: blez $6, 1332
0xc9 0xb4 0x9a 0x02 # CHECK: bne $9, $6, 1332
0x06 0x40 0x9a 0x02 # CHECK: bltz $6, 1332
0x28 0x01 0x3c 0x00 # CHECK: teq $8, $9, 0
0x28 0x01 0x3c 0x02 # CHECK: tge $8, $9, 0
0x28 0x01 0x3c 0x04 # CHECK: tgeu $8, $9, 0
0x28 0x01 0x3c 0x08 # CHECK: tlt $8, $9, 0
0x28 0x01 0x3c 0x0a # CHECK: tltu $8, $9, 0
0x28 0x01 0x3c 0x0c # CHECK: tne $8, $9, 0
0xc9 0x41 0x67 0x45 # CHECK: teqi $9, 17767
0x29 0x41 0x67 0x45 # CHECK: tgei $9, 17767
0x69 0x41 0x67 0x45 # CHECK: tgeiu $9, 17767
0x09 0x41 0x67 0x45 # CHECK: tlti $9, 17767
0x49 0x41 0x67 0x45 # CHECK: tltiu $9, 17767
0x89 0x41 0x67 0x45 # CHECK: tnei $9, 17767
0x25 0x20 0x08 0x60 # CHECK: cache 1, 8($5)
0x25 0x60 0x08 0x20 # CHECK: pref 1, 8($5)
0x00 0x00 0x00 0x08 # CHECK: ssnop
0x00 0x00 0x00 0x18 # CHECK: ehb
0x00 0x00 0x00 0x28 # CHECK: pause
0x44 0x60 0x08 0x30 # CHECK: ll $2, 8($4)
0x44 0x60 0x08 0xb0 # CHECK: sc $2, 8($4)
0x64 0x00 0x18 0x11 # CHECK: lwxs $2, $3($4)
0x66 0x42 0x9a 0x02 # CHECK: bgezals $6, 1332
0x26 0x42 0x9a 0x02 # CHECK: bltzals $6, 1332
0xe9 0x40 0x9a 0x02 # CHECK: beqzc $9, 1332
0xa9 0x40 0x9a 0x02 # CHECK: bnezc $9, 1332
0x00 0x74 0x98 0x02 # CHECK: jals 1328
0xe6 0x03 0x3c 0x4f # CHECK: jalrs $ra, $6
0x44 0x20 0x08 0x50 # CHECK: lwm32 $16, $17, 8($4)
0x44 0x20 0x08 0xd0 # CHECK: swm32 $16, $17, 8($4)
0x04 0x22 0x08 0x90 # CHECK: swp $16, 8($4)
0x04 0x22 0x08 0x10 # CHECK: lwp $16, 8($4)
0x00 0x00 0x00 0x00 # CHECK: nop
0x00 0x79 0x05 0x00 # CHECK: addiupc $2, 20
0xbf 0x7b 0xff 0xff # CHECK: addiupc $7, 16777212
0xc0 0x7b 0x00 0x00 # CHECK: addiupc $7, -16777216
0x42 0x07 # CHECK: addu16 $6, $17, $4
0xb1 0x06 # CHECK: subu16 $5, $16, $3
0x82 0x44 # CHECK: and16 $16, $2
0x0b 0x44 # CHECK: not16 $17, $3
0xc4 0x44 # CHECK: or16 $16, $4
0x4d 0x44 # CHECK: xor16 $17, $5
0x8a 0x25 # CHECK: sll16 $3, $16, 5
0x1d 0x26 # CHECK: srl16 $4, $17, 6
0x94 0x09 # CHECK: lbu16 $3, 4($17)
0x8f 0x09 # CHECK: lbu16 $3, -1($16)
0x82 0x29 # CHECK: lhu16 $3, 4($16)
0x12 0x6a # CHECK: lw16 $4, 8($17)
0x84 0x89 # CHECK: sb16 $3, 4($16)
0x14 0xaa # CHECK: sh16 $4, 8($17)
0x11 0xea # CHECK: sw16 $4, 4($17)
0x11 0xe8 # CHECK: sw16 $zero, 4($17)
0x09 0x46 # CHECK: mfhi $9
0x49 0x46 # CHECK: mflo $9
0x21 0x0f # CHECK: move $25, $1
0xa9 0x45 # CHECK: jrc $9
0xc9 0x45 # CHECK: jalr $9
0xe9 0x45 # CHECK: jalrs16 $9
0x89 0x45 # CHECK: jr16 $9
0xff 0xed # CHECK: li16 $3, -1
0xfe 0xed # CHECK: li16 $3, 126
0x83 0x6f # CHECK: addiur1sp $7, 4
0x7e 0x6f # CHECK: addiur2 $6, $7, -1
0x76 0x6f # CHECK: addiur2 $6, $7, 12
0xfc 0x4c # CHECK: addius5 $7, -2
0x00 0x0c # CHECK: nop
0x68 0x48 # CHECK: lw $3, 32($sp)
0x9f 0xc8 # CHECK: sw $4, 124($sp)
0x0a 0x8f # CHECK: beqz16 $6, 20
0x0a 0xaf # CHECK: bnez16 $6, 20
0x42 0xcc # CHECK: b16 132
0x88 0x65 # CHECK: lw $3, 32($gp)
0x12 0x45 # CHECK: lwm16 $16, $17, $ra, 8($sp)
0x52 0x45 # CHECK: swm16 $16, $17, $ra, 8($sp)
0x88 0x46 # CHECK: break16 8
0xce 0x46 # CHECK: sdbbp16 14
0x34 0x84 # CHECK: movep $5, $6, $2, $3
0x00 0x00 0x7c 0x57 # CHECK: ei
0x0a 0x00 0x7c 0x57 # CHECK: ei $10
|