1 # RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | \
2 # RUN: FileCheck %s --check-prefixes=CHECK,CHECK-LE
3 # RUN: llvm-mc %s -triple=mips-unknown-linux -show-encoding -mcpu=mips32r2 | \
4 # RUN: FileCheck %s --check-prefixes=CHECK,CHECK-BE
6 # Check that the IAS expands macro instructions in the same way as GAS.
8 # Load address, done by MipsAsmParser::expandLoadAddressReg()
9 # and MipsAsmParser::expandLoadAddressImm():
11 # CHECK-LE: lui $8, %hi($tmp0) # encoding: [A,A,0x08,0x3c]
12 # CHECK-LE: # fixup A - offset: 0, value: %hi($tmp0), kind: fixup_Mips_HI16
13 # CHECK-LE: addiu $8, $8, %lo($tmp0) # encoding: [A,A,0x08,0x25]
14 # CHECK-LE: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16
17 # CHECK-LE: lui $4, 1 # encoding: [0x01,0x00,0x04,0x3c]
18 # CHECK-LE: lb $4, -32768($4) # encoding: [0x00,0x80,0x84,0x80]
21 # CHECK-LE: lui $4, 2 # encoding: [0x02,0x00,0x04,0x3c]
22 # CHECK-LE: addu $4, $4, $3 # encoding: [0x21,0x20,0x83,0x00]
23 # CHECK-LE: lb $4, 4($4) # encoding: [0x04,0x00,0x84,0x80]
26 # CHECK-LE: lui $4, 1 # encoding: [0x01,0x00,0x04,0x3c]
27 # CHECK-LE: lbu $4, -32768($4) # encoding: [0x00,0x80,0x84,0x90]
30 # CHECK-LE: lui $4, 2 # encoding: [0x02,0x00,0x04,0x3c]
31 # CHECK-LE: addu $4, $4, $3 # encoding: [0x21,0x20,0x83,0x00]
32 # CHECK-LE: lbu $4, 4($4) # encoding: [0x04,0x00,0x84,0x90]
36 # CHECK-LE: lh $4, -32768($4)
40 # CHECK-LE: addu $4, $4, $3
41 # CHECK-LE: lh $4, 4($4)
45 # CHECK-LE: lhu $4, -32768($4)
49 # CHECK-LE: addu $4, $4, $3
50 # CHECK-LE: lhu $4, 4($4)
52 # LW/SW and LDC1/SDC1 of symbol address, done by MipsAsmParser::expandMemInst():
56 # CHECK-LE: lui $10, %hi(symbol) # encoding: [A,A,0x0a,0x3c]
57 # CHECK-LE: # fixup A - offset: 0, value: %hi(symbol), kind: fixup_Mips_HI16
58 # CHECK-LE: addu $10, $10, $4 # encoding: [0x21,0x50,0x44,0x01]
59 # CHECK-LE: lw $10, %lo(symbol)($10) # encoding: [A,A,0x4a,0x8d]
60 # CHECK-LE: # fixup A - offset: 0, value: %lo(symbol), kind: fixup_Mips_LO16
63 # CHECK-LE: lui $1, %hi(symbol) # encoding: [A,A,0x01,0x3c]
64 # CHECK-LE: # fixup A - offset: 0, value: %hi(symbol), kind: fixup_Mips_HI16
65 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
66 # CHECK-LE: sw $10, %lo(symbol)($1) # encoding: [A,A,0x2a,0xac]
67 # CHECK-LE: # fixup A - offset: 0, value: %lo(symbol), kind: fixup_Mips_LO16
70 # CHECK-LE: lui $8, %hi($tmp0) # encoding: [A,A,0x08,0x3c]
71 # CHECK-LE: # fixup A - offset: 0, value: %hi($tmp0), kind: fixup_Mips_HI16
72 # CHECK-LE: lw $8, %lo($tmp0)($8) # encoding: [A,A,0x08,0x8d]
73 # CHECK-LE: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16
75 # CHECK-LE: lui $1, %hi($tmp0) # encoding: [A,A,0x01,0x3c]
76 # CHECK-LE: # fixup A - offset: 0, value: %hi($tmp0), kind: fixup_Mips_HI16
77 # CHECK-LE: sw $8, %lo($tmp0)($1) # encoding: [A,A,0x28,0xac]
78 # CHECK-LE: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16
81 # CHECK-LE: lui $10, 10 # encoding: [0x0a,0x00,0x0a,0x3c]
82 # CHECK-LE: addu $10, $10, $4 # encoding: [0x21,0x50,0x44,0x01]
83 # CHECK-LE: lw $10, 123($10) # encoding: [0x7b,0x00,0x4a,0x8d]
85 # CHECK-LE: lui $1, 2 # encoding: [0x02,0x00,0x01,0x3c]
86 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
87 # CHECK-LE: sw $10, -7616($1) # encoding: [0x40,0xe2,0x2a,0xac]
90 # CHECK-LE: lui $8, %hi(symbol) # encoding: [A,A,0x08,0x3c]
91 # CHECK-LE: # fixup A - offset: 0, value: %hi(symbol), kind: fixup_Mips_HI16
92 # CHECK-LE-NOT: move $8, $8 # encoding: [0x21,0x40,0x00,0x01]
93 # CHECK-LE: lw $8, %lo(symbol)($8) # encoding: [A,A,0x08,0x8d]
94 # CHECK-LE: # fixup A - offset: 0, value: %lo(symbol), kind: fixup_Mips_LO16
96 # CHECK-LE: lui $1, %hi(symbol) # encoding: [A,A,0x01,0x3c]
97 # CHECK-LE: # fixup A - offset: 0, value: %hi(symbol), kind: fixup_Mips_HI16
98 # CHECK-LE-NOT: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
99 # CHECK-LE: sw $8, %lo(symbol)($1) # encoding: [A,A,0x28,0xac]
100 # CHECK-LE: # fixup A - offset: 0, value: %lo(symbol), kind: fixup_Mips_LO16
103 # CHECK-LE: lui $1, %hi(symbol)
104 # CHECK-LE: ldc1 $f0, %lo(symbol)($1)
106 # CHECK-LE: lui $1, %hi(symbol)
107 # CHECK-LE: sdc1 $f0, %lo(symbol)($1)
113 # CHECK-LE: lw $10, %got(symbol)($gp) # encoding: [A,A,0x8a,0x8f]
114 # CHECK-LE: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
115 # CHECK-LE-FIXME: addu $10, $10, $4 # encoding: [0x21,0x50,0x44,0x01]
116 # CHECK-LE: lw $10, 0($10) # encoding: [0x00,0x00,0x4a,0x8d]
119 # CHECK-LE: lw $1, %got(symbol)($gp) # encoding: [A,A,0x81,0x8f]
120 # CHECK-LE: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
121 # CHECK-LE-FIXME: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
122 # CHECK-LE: sw $10, 0($1) # encoding: [0x00,0x00,0x2a,0xac]
125 # CHECK-LE: lw $8, %got($tmp0)($gp) # encoding: [A,A,0x88,0x8f]
126 # CHECK-LE-NEXT: # fixup A - offset: 0, value: %got($tmp0), kind: fixup_Mips_GOT
127 # CHECK-LE-NEXT: addiu $8, $8, %lo($tmp0) # encoding: [A,A,0x08,0x25]
128 # CHECK-LE-NEXT: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16
129 # CHECK-LE-NEXT: lw $8, 8($8) # encoding: [0x08,0x00,0x08,0x8d]
131 # CHECK-LE: lw $1, %got($tmp0)($gp) # encoding: [A,A,0x81,0x8f]
132 # CHECK-LE-NEXT: # fixup A - offset: 0, value: %got($tmp0), kind: fixup_Mips_GOT
133 # CHECK-LE-NEXT: addiu $1, $1, %lo($tmp0) # encoding: [A,A,0x21,0x24]
134 # CHECK-LE-NEXT: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16
135 # CHECK-LE-NEXT: sw $8, 8($1) # encoding: [0x08,0x00,0x28,0xac]
138 # CHECK-LE: lui $10, 10 # encoding: [0x0a,0x00,0x0a,0x3c]
139 # CHECK-LE: addu $10, $10, $4 # encoding: [0x21,0x50,0x44,0x01]
140 # CHECK-LE: lw $10, 123($10) # encoding: [0x7b,0x00,0x4a,0x8d]
142 # CHECK-LE: lui $1, 2 # encoding: [0x02,0x00,0x01,0x3c]
143 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
144 # CHECK-LE: sw $10, -7616($1) # encoding: [0x40,0xe2,0x2a,0xac]
147 # CHECK-LE: lw $8, %got(symbol)($gp) # encoding: [A,A,0x88,0x8f]
148 # CHECK-LE-NEXT: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
149 # CHECK-LE-NEXT: lw $8, 8($8) # encoding: [0x08,0x00,0x08,0x8d]
151 # CHECK-LE: lw $1, %got(symbol)($gp) # encoding: [A,A,0x81,0x8f]
152 # CHECK-LE-NEXT: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
153 # CHECK-LE-NEXT: sw $8, 8($1) # encoding: [0x08,0x00,0x28,0xac]
156 # CHECK-LE: lw $1, %got(symbol)($gp) # encoding: [A,A,0x81,0x8f]
157 # CHECK-LE: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
158 # CHECK-LE: ldc1 $f0, 0($1) # encoding: [0x00,0x00,0x20,0xd4]
160 # CHECK-LE: lw $1, %got(symbol)($gp) # encoding: [A,A,0x81,0x8f]
161 # CHECK-LE: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
162 # CHECK-LE: sdc1 $f0, 0($1) # encoding: [0x00,0x00,0x20,0xf4]
165 # Test BNE with an immediate as the 2nd operand.
167 # CHECK-LE: bnez $2, 1332 # encoding: [0x4d,0x01,0x40,0x14]
168 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
171 # CHECK-LE: addiu $1, $zero, 123 # encoding: [0x7b,0x00,0x01,0x24]
172 # CHECK-LE: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14]
173 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
176 # CHECK-LE: addiu $1, $zero, -2345 # encoding: [0xd7,0xf6,0x01,0x24]
177 # CHECK-LE: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14]
178 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
181 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
182 # CHECK-LE: ori $1, $1, 2 # encoding: [0x02,0x00,0x21,0x34]
183 # CHECK-LE: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14]
184 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
187 # CHECK-LE: addiu $1, $zero, -8 # encoding: [0xf8,0xff,0x01,0x24]
188 # CHECK-LE: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14]
189 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
191 bne $
2, 0x10000, 1332
192 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
193 # CHECK-LE: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14]
194 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
196 # Test BEQ with an immediate as the 2nd operand.
198 # CHECK-LE: beqz $2, 1332 # encoding: [0x4d,0x01,0x40,0x10]
199 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
202 # CHECK-LE: addiu $1, $zero, 123 # encoding: [0x7b,0x00,0x01,0x24]
203 # CHECK-LE: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10]
204 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
207 # CHECK-LE: addiu $1, $zero, -2345 # encoding: [0xd7,0xf6,0x01,0x24]
208 # CHECK-LE: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10]
209 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
212 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
213 # CHECK-LE: ori $1, $1, 2 # encoding: [0x02,0x00,0x21,0x34]
214 # CHECK-LE: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10]
215 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
218 # CHECK-LE: addiu $1, $zero, -8 # encoding: [0xf8,0xff,0x01,0x24]
219 # CHECK-LE: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10]
220 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
222 beq $
2, 0x10000, 1332
223 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
224 # CHECK-LE: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10]
225 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
228 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
229 # CHECK-LE: ori $1, $1, 2 # encoding: [0x02,0x00,0x21,0x34]
230 # CHECK-LE: beq $2, $1, foo # encoding: [A,A,0x41,0x10]
231 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
233 # Test ULH with immediate operand.
234 ulh_imm
: # CHECK-LABEL: ulh_imm:
236 # CHECK-BE: lb $1, 0($zero) # encoding: [0x80,0x01,0x00,0x00]
237 # CHECK-BE: lbu $8, 1($zero) # encoding: [0x90,0x08,0x00,0x01]
238 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
239 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
240 # CHECK-LE: lb $1, 1($zero) # encoding: [0x01,0x00,0x01,0x80]
241 # CHECK-LE: lbu $8, 0($zero) # encoding: [0x00,0x00,0x08,0x90]
242 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
243 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
246 # CHECK-BE: lb $1, 2($zero) # encoding: [0x80,0x01,0x00,0x02]
247 # CHECK-BE: lbu $8, 3($zero) # encoding: [0x90,0x08,0x00,0x03]
248 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
249 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
250 # CHECK-LE: lb $1, 3($zero) # encoding: [0x03,0x00,0x01,0x80]
251 # CHECK-LE: lbu $8, 2($zero) # encoding: [0x02,0x00,0x08,0x90]
252 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
253 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
256 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
257 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
258 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
259 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
260 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
261 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
262 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
263 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
264 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
265 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
268 # CHECK-BE: lb $1, -32768($zero) # encoding: [0x80,0x01,0x80,0x00]
269 # CHECK-BE: lbu $8, -32767($zero) # encoding: [0x90,0x08,0x80,0x01]
270 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
271 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
272 # CHECK-LE: lb $1, -32767($zero) # encoding: [0x01,0x80,0x01,0x80]
273 # CHECK-LE: lbu $8, -32768($zero) # encoding: [0x00,0x80,0x08,0x90]
274 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
275 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
278 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
279 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
280 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
281 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
282 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
283 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
284 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
285 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
286 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
287 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
290 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
291 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
292 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
293 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
294 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
295 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
296 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
297 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
298 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
299 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
300 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
301 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
304 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
305 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
306 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
307 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
308 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
309 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
310 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
311 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
312 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
313 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
314 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
315 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
318 # CHECK-BE: addiu $1, $zero, 32767 # encoding: [0x24,0x01,0x7f,0xff]
319 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
320 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
321 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
322 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
323 # CHECK-LE: addiu $1, $zero, 32767 # encoding: [0xff,0x7f,0x01,0x24]
324 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
325 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
326 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
327 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
329 # Test ULH with immediate offset and a source register operand.
330 ulh_reg
: # CHECK-LABEL: ulh_reg:
332 # CHECK-BE: lb $1, 0($9) # encoding: [0x81,0x21,0x00,0x00]
333 # CHECK-BE: lbu $8, 1($9) # encoding: [0x91,0x28,0x00,0x01]
334 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
335 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
336 # CHECK-LE: lb $1, 1($9) # encoding: [0x01,0x00,0x21,0x81]
337 # CHECK-LE: lbu $8, 0($9) # encoding: [0x00,0x00,0x28,0x91]
338 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
339 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
342 # CHECK-BE: lb $1, 2($9) # encoding: [0x81,0x21,0x00,0x02]
343 # CHECK-BE: lbu $8, 3($9) # encoding: [0x91,0x28,0x00,0x03]
344 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
345 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
346 # CHECK-LE: lb $1, 3($9) # encoding: [0x03,0x00,0x21,0x81]
347 # CHECK-LE: lbu $8, 2($9) # encoding: [0x02,0x00,0x28,0x91]
348 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
349 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
352 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
353 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
354 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
355 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
356 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
357 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
358 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
359 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
360 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
361 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
362 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
363 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
366 # CHECK-BE: lb $1, -32768($9) # encoding: [0x81,0x21,0x80,0x00]
367 # CHECK-BE: lbu $8, -32767($9) # encoding: [0x91,0x28,0x80,0x01]
368 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
369 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
370 # CHECK-LE: lb $1, -32767($9) # encoding: [0x01,0x80,0x21,0x81]
371 # CHECK-LE: lbu $8, -32768($9) # encoding: [0x00,0x80,0x28,0x91]
372 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
373 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
376 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
377 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
378 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
379 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
380 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
381 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
382 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
383 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
384 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
385 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
386 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
387 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
390 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
391 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
392 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
393 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
394 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
395 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
396 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
397 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
398 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
399 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
400 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
401 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
402 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
403 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
406 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
407 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
408 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
409 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
410 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
411 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
412 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
413 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
414 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
415 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
416 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
417 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
418 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
419 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
422 # CHECK-BE: addiu $1, $9, 32767 # encoding: [0x25,0x21,0x7f,0xff]
423 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
424 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
425 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
426 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
427 # CHECK-LE: addiu $1, $9, 32767 # encoding: [0xff,0x7f,0x21,0x25]
428 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
429 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
430 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
431 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
433 # Test ULHU with immediate operand.
434 ulhu_imm
: # CHECK-LABEL: ulhu_imm:
436 # CHECK-BE: lbu $1, 0($zero) # encoding: [0x90,0x01,0x00,0x00]
437 # CHECK-BE: lbu $8, 1($zero) # encoding: [0x90,0x08,0x00,0x01]
438 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
439 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
440 # CHECK-LE: lbu $1, 1($zero) # encoding: [0x01,0x00,0x01,0x90]
441 # CHECK-LE: lbu $8, 0($zero) # encoding: [0x00,0x00,0x08,0x90]
442 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
443 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
446 # CHECK-BE: lbu $1, 2($zero) # encoding: [0x90,0x01,0x00,0x02]
447 # CHECK-BE: lbu $8, 3($zero) # encoding: [0x90,0x08,0x00,0x03]
448 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
449 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
450 # CHECK-LE: lbu $1, 3($zero) # encoding: [0x03,0x00,0x01,0x90]
451 # CHECK-LE: lbu $8, 2($zero) # encoding: [0x02,0x00,0x08,0x90]
452 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
453 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
456 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
457 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
458 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
459 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
460 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
461 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
462 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
463 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
464 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
465 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
468 # CHECK-BE: lbu $1, -32768($zero) # encoding: [0x90,0x01,0x80,0x00]
469 # CHECK-BE: lbu $8, -32767($zero) # encoding: [0x90,0x08,0x80,0x01]
470 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
471 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
472 # CHECK-LE: lbu $1, -32767($zero) # encoding: [0x01,0x80,0x01,0x90]
473 # CHECK-LE: lbu $8, -32768($zero) # encoding: [0x00,0x80,0x08,0x90]
474 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
475 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
478 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
479 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
480 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
481 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
482 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
483 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
484 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
485 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
486 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
487 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
490 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
491 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
492 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
493 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
494 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
495 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
496 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
497 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
498 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
499 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
500 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
501 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
504 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
505 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
506 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
507 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
508 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
509 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
510 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
511 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
512 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
513 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
514 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
515 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
518 # CHECK-BE: addiu $1, $zero, 32767 # encoding: [0x24,0x01,0x7f,0xff]
519 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
520 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
521 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
522 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
523 # CHECK-LE: addiu $1, $zero, 32767 # encoding: [0xff,0x7f,0x01,0x24]
524 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
525 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
526 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
527 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
529 # Test ULHU with immediate offset and a source register operand.
531 # CHECK-BE: lbu $1, 0($9) # encoding: [0x91,0x21,0x00,0x00]
532 # CHECK-BE: lbu $8, 1($9) # encoding: [0x91,0x28,0x00,0x01]
533 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
534 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
535 # CHECK-LE: lbu $1, 1($9) # encoding: [0x01,0x00,0x21,0x91]
536 # CHECK-LE: lbu $8, 0($9) # encoding: [0x00,0x00,0x28,0x91]
537 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
538 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
541 # CHECK-BE: lbu $1, 2($9) # encoding: [0x91,0x21,0x00,0x02]
542 # CHECK-BE: lbu $8, 3($9) # encoding: [0x91,0x28,0x00,0x03]
543 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
544 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
545 # CHECK-LE: lbu $1, 3($9) # encoding: [0x03,0x00,0x21,0x91]
546 # CHECK-LE: lbu $8, 2($9) # encoding: [0x02,0x00,0x28,0x91]
547 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
548 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
551 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
552 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
553 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
554 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
555 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
556 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
557 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
558 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
559 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
560 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
561 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
562 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
565 # CHECK-BE: lbu $1, -32768($9) # encoding: [0x91,0x21,0x80,0x00]
566 # CHECK-BE: lbu $8, -32767($9) # encoding: [0x91,0x28,0x80,0x01]
567 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
568 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
569 # CHECK-LE: lbu $1, -32767($9) # encoding: [0x01,0x80,0x21,0x91]
570 # CHECK-LE: lbu $8, -32768($9) # encoding: [0x00,0x80,0x28,0x91]
571 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
572 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
575 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
576 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
577 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
578 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
579 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
580 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
581 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
582 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
583 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
584 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
585 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
586 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
589 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
590 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
591 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
592 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
593 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
594 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
595 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
596 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
597 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
598 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
599 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
600 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
601 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
602 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
605 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
606 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
607 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
608 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
609 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
610 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
611 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
612 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
613 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
614 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
615 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
616 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
617 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
618 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
621 # CHECK-BE: addiu $1, $9, 32767 # encoding: [0x25,0x21,0x7f,0xff]
622 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
623 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
624 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
625 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
626 # CHECK-LE: addiu $1, $9, 32767 # encoding: [0xff,0x7f,0x21,0x25]
627 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
628 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
629 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
630 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
632 # Test ULW with immediate operand.
634 # CHECK-BE: lwl $8, 0($zero) # encoding: [0x88,0x08,0x00,0x00]
635 # CHECK-BE: lwr $8, 3($zero) # encoding: [0x98,0x08,0x00,0x03]
636 # CHECK-LE: lwl $8, 3($zero) # encoding: [0x03,0x00,0x08,0x88]
637 # CHECK-LE: lwr $8, 0($zero) # encoding: [0x00,0x00,0x08,0x98]
640 # CHECK-BE: lwl $8, 2($zero) # encoding: [0x88,0x08,0x00,0x02]
641 # CHECK-BE: lwr $8, 5($zero) # encoding: [0x98,0x08,0x00,0x05]
642 # CHECK-LE: lwl $8, 5($zero) # encoding: [0x05,0x00,0x08,0x88]
643 # CHECK-LE: lwr $8, 2($zero) # encoding: [0x02,0x00,0x08,0x98]
646 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
647 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
648 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
649 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
650 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
651 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
654 # CHECK-BE: lwl $8, -32768($zero) # encoding: [0x88,0x08,0x80,0x00]
655 # CHECK-BE: lwr $8, -32765($zero) # encoding: [0x98,0x08,0x80,0x03]
656 # CHECK-LE: lwl $8, -32765($zero) # encoding: [0x03,0x80,0x08,0x88]
657 # CHECK-LE: lwr $8, -32768($zero) # encoding: [0x00,0x80,0x08,0x98]
660 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
661 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
662 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
663 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
664 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
665 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
668 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
669 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
670 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
671 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
672 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
673 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
674 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
675 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
678 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
679 # CHECK-BE: ori $1, $1, 32765 # encoding: [0x34,0x21,0x7f,0xfd]
680 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
681 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
682 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
683 # CHECK-LE: ori $1, $1, 32765 # encoding: [0xfd,0x7f,0x21,0x34]
684 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
685 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
688 # CHECK-BE: addiu $1, $zero, 32765 # encoding: [0x24,0x01,0x7f,0xfd]
689 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
690 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
691 # CHECK-LE: addiu $1, $zero, 32765 # encoding: [0xfd,0x7f,0x01,0x24]
692 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
693 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
695 # Test ULW with immediate offset and a source register operand.
697 # CHECK-BE: lwl $8, 0($9) # encoding: [0x89,0x28,0x00,0x00]
698 # CHECK-BE: lwr $8, 3($9) # encoding: [0x99,0x28,0x00,0x03]
699 # CHECK-LE: lwl $8, 3($9) # encoding: [0x03,0x00,0x28,0x89]
700 # CHECK-LE: lwr $8, 0($9) # encoding: [0x00,0x00,0x28,0x99]
703 # CHECK-BE: lwl $8, 2($9) # encoding: [0x89,0x28,0x00,0x02]
704 # CHECK-BE: lwr $8, 5($9) # encoding: [0x99,0x28,0x00,0x05]
705 # CHECK-LE: lwl $8, 5($9) # encoding: [0x05,0x00,0x28,0x89]
706 # CHECK-LE: lwr $8, 2($9) # encoding: [0x02,0x00,0x28,0x99]
709 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
710 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
711 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
712 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
713 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
714 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
715 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
716 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
719 # CHECK-BE: lwl $8, -32768($9) # encoding: [0x89,0x28,0x80,0x00]
720 # CHECK-BE: lwr $8, -32765($9) # encoding: [0x99,0x28,0x80,0x03]
721 # CHECK-LE: lwl $8, -32765($9) # encoding: [0x03,0x80,0x28,0x89]
722 # CHECK-LE: lwr $8, -32768($9) # encoding: [0x00,0x80,0x28,0x99]
725 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
726 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
727 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
728 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
729 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
730 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
731 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
732 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
735 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
736 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
737 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
738 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
739 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
740 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
741 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
742 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
743 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
744 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
747 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
748 # CHECK-BE: ori $1, $1, 32765 # encoding: [0x34,0x21,0x7f,0xfd]
749 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
750 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
751 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
752 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
753 # CHECK-LE: ori $1, $1, 32765 # encoding: [0xfd,0x7f,0x21,0x34]
754 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
755 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
756 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
759 # CHECK-BE: addiu $1, $9, 32765 # encoding: [0x25,0x21,0x7f,0xfd]
760 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
761 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
762 # CHECK-LE: addiu $1, $9, 32765 # encoding: [0xfd,0x7f,0x21,0x25]
763 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
764 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
767 # CHECK-BE: lwl $1, 0($8) # encoding: [0x89,0x01,0x00,0x00]
768 # CHECK-BE: lwr $1, 3($8) # encoding: [0x99,0x01,0x00,0x03]
769 # CHECK-BE: move $8, $1 # encoding: [0x00,0x20,0x40,0x25]
770 # CHECK-LE: lwl $1, 3($8) # encoding: [0x03,0x00,0x01,0x89]
771 # CHECK-LE: lwr $1, 0($8) # encoding: [0x00,0x00,0x01,0x99]
772 # CHECK-LE: move $8, $1 # encoding: [0x25,0x40,0x20,0x00]
775 # CHECK-BE: lwl $1, 2($8) # encoding: [0x89,0x01,0x00,0x02]
776 # CHECK-BE: lwr $1, 5($8) # encoding: [0x99,0x01,0x00,0x05]
777 # CHECK-BE: move $8, $1 # encoding: [0x00,0x20,0x40,0x25]
778 # CHECK-LE: lwl $1, 5($8) # encoding: [0x05,0x00,0x01,0x89]
779 # CHECK-LE: lwr $1, 2($8) # encoding: [0x02,0x00,0x01,0x99]
780 # CHECK-LE: move $8, $1 # encoding: [0x25,0x40,0x20,0x00]
783 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
784 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
785 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
786 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
787 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
788 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
789 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
790 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
793 # CHECK-BE: lwl $1, -32768($8) # encoding: [0x89,0x01,0x80,0x00]
794 # CHECK-BE: lwr $1, -32765($8) # encoding: [0x99,0x01,0x80,0x03]
795 # CHECK-BE: move $8, $1 # encoding: [0x00,0x20,0x40,0x25]
796 # CHECK-LE: lwl $1, -32765($8) # encoding: [0x03,0x80,0x01,0x89]
797 # CHECK-LE: lwr $1, -32768($8) # encoding: [0x00,0x80,0x01,0x99]
798 # CHECK-LE: move $8, $1 # encoding: [0x25,0x40,0x20,0x00]
801 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
802 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
803 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
804 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
805 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
806 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
807 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
808 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
811 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
812 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
813 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
814 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
815 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
816 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
817 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
818 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
819 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
820 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
823 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
824 # CHECK-BE: ori $1, $1, 32765 # encoding: [0x34,0x21,0x7f,0xfd]
825 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
826 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
827 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
828 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
829 # CHECK-LE: ori $1, $1, 32765 # encoding: [0xfd,0x7f,0x21,0x34]
830 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
831 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
832 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
835 # CHECK-BE: addiu $1, $8, 32765 # encoding: [0x25,0x01,0x7f,0xfd]
836 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
837 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
838 # CHECK-LE: addiu $1, $8, 32765 # encoding: [0xfd,0x7f,0x01,0x25]
839 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
840 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
842 ush_imm
: # CHECK-LABEL: ush_imm
844 # CHECK-BE: sb $8, 1($zero) # encoding: [0xa0,0x08,0x00,0x01]
845 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
846 # CHECK-BE: sb $1, 0($zero) # encoding: [0xa0,0x01,0x00,0x00]
847 # CHECK-LE: sb $8, 0($zero) # encoding: [0x00,0x00,0x08,0xa0]
848 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
849 # CHECK-LE: sb $1, 1($zero) # encoding: [0x01,0x00,0x01,0xa0]
852 # CHECK-BE: sb $8, 3($zero) # encoding: [0xa0,0x08,0x00,0x03]
853 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
854 # CHECK-BE: sb $1, 2($zero) # encoding: [0xa0,0x01,0x00,0x02]
855 # CHECK-LE: sb $8, 2($zero) # encoding: [0x02,0x00,0x08,0xa0]
856 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
857 # CHECK-LE: sb $1, 3($zero) # encoding: [0x03,0x00,0x01,0xa0]
859 # FIXME: Remove the identity moves (move $1, $1) coming from loadImmediate
861 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
862 # CHECK-BE: move $1, $1 # encoding: [0x00,0x20,0x08,0x21]
863 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
864 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
865 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
866 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
867 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
868 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
869 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
870 # CHECK-LE: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
871 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
872 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
873 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
874 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
875 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
876 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
879 # CHECK-BE: sb $8, -32767($zero) # encoding: [0xa0,0x08,0x80,0x01]
880 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
881 # CHECK-BE: sb $1, -32768($zero) # encoding: [0xa0,0x01,0x80,0x00]
882 # CHECK-LE: sb $8, -32768($zero) # encoding: [0x00,0x80,0x08,0xa0]
883 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
884 # CHECK-LE: sb $1, -32767($zero) # encoding: [0x01,0x80,0x01,0xa0]
886 # FIXME: Remove the identity moves (move $1, $1) coming from loadImmediate
888 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
889 # CHECK-BE: move $1, $1 # encoding: [0x00,0x20,0x08,0x21]
890 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
891 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
892 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
893 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
894 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
895 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
896 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
897 # CHECK-LE: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
898 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
899 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
900 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
901 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
902 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
903 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
905 # FIXME: Remove the identity moves (move $1, $1) coming from loadImmediate
907 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
908 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
909 # CHECK-BE: move $1, $1 # encoding: [0x00,0x20,0x08,0x21]
910 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
911 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
912 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
913 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
914 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
915 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
916 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
917 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
918 # CHECK-LE: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
919 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
920 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
921 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
922 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
923 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
924 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
926 # FIXME: Remove the identity moves (move $1, $1) coming from loadImmediate
928 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
929 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
930 # CHECK-BE: move $1, $1 # encoding: [0x00,0x20,0x08,0x21]
931 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
932 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
933 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
934 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
935 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
936 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
937 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
938 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
939 # CHECK-LE: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
940 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
941 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
942 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
943 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
944 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
945 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
948 # CHECK-BE: addiu $1, $zero, 32767 # encoding: [0x24,0x01,0x7f,0xff]
949 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
950 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
951 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
952 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
953 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
954 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
955 # CHECK-LE: addiu $1, $zero, 32767 # encoding: [0xff,0x7f,0x01,0x24]
956 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
957 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
958 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
959 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
960 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
961 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
963 ush_reg
: # CHECK-LABEL: ush_reg
965 # CHECK-BE: sb $8, 1($9) # encoding: [0xa1,0x28,0x00,0x01]
966 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
967 # CHECK-BE: sb $1, 0($9) # encoding: [0xa1,0x21,0x00,0x00]
968 # CHECK-LE: sb $8, 0($9) # encoding: [0x00,0x00,0x28,0xa1]
969 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
970 # CHECK-LE: sb $1, 1($9) # encoding: [0x01,0x00,0x21,0xa1]
973 # CHECK-BE: sb $8, 3($9) # encoding: [0xa1,0x28,0x00,0x03]
974 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
975 # CHECK-BE: sb $1, 2($9) # encoding: [0xa1,0x21,0x00,0x02]
976 # CHECK-LE: sb $8, 2($9) # encoding: [0x02,0x00,0x28,0xa1]
977 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
978 # CHECK-LE: sb $1, 3($9) # encoding: [0x03,0x00,0x21,0xa1]
981 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
982 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
983 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
984 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
985 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
986 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
987 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
988 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
989 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
990 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
991 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
992 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
993 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
994 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
995 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
996 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
999 # CHECK-BE: sb $8, -32767($9) # encoding: [0xa1,0x28,0x80,0x01]
1000 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
1001 # CHECK-BE: sb $1, -32768($9) # encoding: [0xa1,0x21,0x80,0x00]
1002 # CHECK-LE: sb $8, -32768($9) # encoding: [0x00,0x80,0x28,0xa1]
1003 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
1004 # CHECK-LE: sb $1, -32767($9) # encoding: [0x01,0x80,0x21,0xa1]
1007 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1008 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
1009 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1010 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1011 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1012 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1013 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1014 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1015 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1016 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
1017 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1018 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1019 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1020 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1021 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1022 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1025 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1026 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
1027 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
1028 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1029 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1030 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1031 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1032 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1033 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1034 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1035 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
1036 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
1037 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1038 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1039 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1040 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1041 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1042 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1045 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
1046 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
1047 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
1048 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1049 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1050 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1051 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1052 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1053 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1054 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
1055 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
1056 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
1057 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1058 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1059 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1060 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1061 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1062 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1065 # CHECK-BE: addiu $1, $9, 32767 # encoding: [0x25,0x21,0x7f,0xff]
1066 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1067 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1068 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1069 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1070 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1071 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1072 # CHECK-LE: addiu $1, $9, 32767 # encoding: [0xff,0x7f,0x21,0x25]
1073 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1074 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1075 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1076 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1077 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1078 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1081 # CHECK-BE: sb $8, 1($8) # encoding: [0xa1,0x08,0x00,0x01]
1082 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
1083 # CHECK-BE: sb $1, 0($8) # encoding: [0xa1,0x01,0x00,0x00]
1084 # CHECK-LE: sb $8, 0($8) # encoding: [0x00,0x00,0x08,0xa1]
1085 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
1086 # CHECK-LE: sb $1, 1($8) # encoding: [0x01,0x00,0x01,0xa1]
1089 # CHECK-BE: sb $8, 3($8) # encoding: [0xa1,0x08,0x00,0x03]
1090 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
1091 # CHECK-BE: sb $1, 2($8) # encoding: [0xa1,0x01,0x00,0x02]
1092 # CHECK-LE: sb $8, 2($8) # encoding: [0x02,0x00,0x08,0xa1]
1093 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
1094 # CHECK-LE: sb $1, 3($8) # encoding: [0x03,0x00,0x01,0xa1]
1097 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
1098 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
1099 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1100 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1101 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1102 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1103 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1104 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1105 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
1106 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
1107 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1108 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1109 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1110 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1111 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1112 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1115 # CHECK-BE: sb $8, -32767($8) # encoding: [0xa1,0x08,0x80,0x01]
1116 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
1117 # CHECK-BE: sb $1, -32768($8) # encoding: [0xa1,0x01,0x80,0x00]
1118 # CHECK-LE: sb $8, -32768($8) # encoding: [0x00,0x80,0x08,0xa1]
1119 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
1120 # CHECK-LE: sb $1, -32767($8) # encoding: [0x01,0x80,0x01,0xa1]
1123 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1124 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
1125 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1126 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1127 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1128 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1129 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1130 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1131 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1132 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
1133 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1134 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1135 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1136 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1137 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1138 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1141 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1142 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
1143 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
1144 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1145 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1146 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1147 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1148 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1149 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1150 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1151 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
1152 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
1153 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1154 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1155 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1156 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1157 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1158 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1161 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
1162 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
1163 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
1164 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1165 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1166 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1167 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1168 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1169 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1170 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
1171 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
1172 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
1173 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1174 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1175 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1176 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1177 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1178 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1181 # CHECK-BE: addiu $1, $8, 32767 # encoding: [0x25,0x01,0x7f,0xff]
1182 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1183 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1184 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1185 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1186 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1187 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1188 # CHECK-LE: addiu $1, $8, 32767 # encoding: [0xff,0x7f,0x01,0x25]
1189 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1190 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1191 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1192 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1193 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1194 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1196 usw_imm
: # CHECK-LABEL: usw_imm:
1198 # CHECK-BE: swl $8, 0($zero) # encoding: [0xa8,0x08,0x00,0x00]
1199 # CHECK-BE: swr $8, 3($zero) # encoding: [0xb8,0x08,0x00,0x03]
1200 # CHECK-LE: swl $8, 3($zero) # encoding: [0x03,0x00,0x08,0xa8]
1201 # CHECK-LE: swr $8, 0($zero) # encoding: [0x00,0x00,0x08,0xb8]
1204 # CHECK-BE: swl $8, 2($zero) # encoding: [0xa8,0x08,0x00,0x02]
1205 # CHECK-BE: swr $8, 5($zero) # encoding: [0xb8,0x08,0x00,0x05]
1206 # CHECK-LE: swl $8, 5($zero) # encoding: [0x05,0x00,0x08,0xa8]
1207 # CHECK-LE: swr $8, 2($zero) # encoding: [0x02,0x00,0x08,0xb8]
1209 # FIXME: Remove the identity moves (move $1, $1) coming from loadImmediate
1211 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
1212 # CHECK-BE: move $1, $1 # encoding: [0x00,0x20,0x08,0x21]
1213 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1214 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1215 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
1216 # CHECK-LE: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
1217 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1218 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1221 # CHECK-BE: swl $8, -32768($zero) # encoding: [0xa8,0x08,0x80,0x00]
1222 # CHECK-BE: swr $8, -32765($zero) # encoding: [0xb8,0x08,0x80,0x03]
1223 # CHECK-LE: swl $8, -32765($zero) # encoding: [0x03,0x80,0x08,0xa8]
1224 # CHECK-LE: swr $8, -32768($zero) # encoding: [0x00,0x80,0x08,0xb8]
1226 # FIXME: Remove the identity moves (move $1, $1) coming from loadImmediate
1228 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1229 # CHECK-BE: move $1, $1 # encoding: [0x00,0x20,0x08,0x21]
1230 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1231 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1232 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1233 # CHECK-LE: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
1234 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1235 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1237 # FIXME: Remove the identity moves (move $1, $1) coming from loadImmediate
1239 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1240 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
1241 # CHECK-BE: move $1, $1 # encoding: [0x00,0x20,0x08,0x21]
1242 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1243 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1244 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1245 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
1246 # CHECK-LE: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
1247 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1248 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1250 # FIXME: Remove the identity moves (move $1, $1) coming from loadImmediate
1252 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
1253 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
1254 # CHECK-BE: move $1, $1 # encoding: [0x00,0x20,0x08,0x21]
1255 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1256 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1257 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
1258 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
1259 # CHECK-LE: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
1260 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1261 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1264 # CHECK-BE: addiu $1, $zero, 32767 # encoding: [0x24,0x01,0x7f,0xff]
1265 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1266 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1267 # CHECK-LE: addiu $1, $zero, 32767 # encoding: [0xff,0x7f,0x01,0x24]
1268 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1269 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1271 usw_reg
: # CHECK-LABEL: usw_reg:
1273 # CHECK-BE: swl $8, 0($9) # encoding: [0xa9,0x28,0x00,0x00]
1274 # CHECK-BE: swr $8, 3($9) # encoding: [0xb9,0x28,0x00,0x03]
1275 # CHECK-LE: swl $8, 3($9) # encoding: [0x03,0x00,0x28,0xa9]
1276 # CHECK-LE: swr $8, 0($9) # encoding: [0x00,0x00,0x28,0xb9]
1279 # CHECK-BE: swl $8, 2($9) # encoding: [0xa9,0x28,0x00,0x02]
1280 # CHECK-BE: swr $8, 5($9) # encoding: [0xb9,0x28,0x00,0x05]
1281 # CHECK-LE: swl $8, 5($9) # encoding: [0x05,0x00,0x28,0xa9]
1282 # CHECK-LE: swr $8, 2($9) # encoding: [0x02,0x00,0x28,0xb9]
1285 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
1286 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
1287 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1288 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1289 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
1290 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
1291 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1292 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1295 # CHECK-BE: swl $8, -32768($9) # encoding: [0xa9,0x28,0x80,0x00]
1296 # CHECK-BE: swr $8, -32765($9) # encoding: [0xb9,0x28,0x80,0x03]
1297 # CHECK-LE: swl $8, -32765($9) # encoding: [0x03,0x80,0x28,0xa9]
1298 # CHECK-LE: swr $8, -32768($9) # encoding: [0x00,0x80,0x28,0xb9]
1301 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1302 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
1303 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1304 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1305 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1306 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
1307 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1308 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1311 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1312 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
1313 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
1314 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1315 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1316 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1317 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
1318 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
1319 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1320 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1323 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
1324 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
1325 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
1326 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1327 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1328 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
1329 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
1330 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
1331 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1332 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1335 # CHECK-BE: addiu $1, $9, 32767 # encoding: [0x25,0x21,0x7f,0xff]
1336 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1337 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1338 # CHECK-LE: addiu $1, $9, 32767 # encoding: [0xff,0x7f,0x21,0x25]
1339 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1340 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1343 # CHECK-BE: swl $8, 0($8) # encoding: [0xa9,0x08,0x00,0x00]
1344 # CHECK-BE: swr $8, 3($8) # encoding: [0xb9,0x08,0x00,0x03]
1345 # CHECK-LE: swl $8, 3($8) # encoding: [0x03,0x00,0x08,0xa9]
1346 # CHECK-LE: swr $8, 0($8) # encoding: [0x00,0x00,0x08,0xb9]
1349 # CHECK-BE: swl $8, 2($8) # encoding: [0xa9,0x08,0x00,0x02]
1350 # CHECK-BE: swr $8, 5($8) # encoding: [0xb9,0x08,0x00,0x05]
1351 # CHECK-LE: swl $8, 5($8) # encoding: [0x05,0x00,0x08,0xa9]
1352 # CHECK-LE: swr $8, 2($8) # encoding: [0x02,0x00,0x08,0xb9]
1355 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
1356 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
1357 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1358 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1359 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
1360 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
1361 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1362 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1365 # CHECK-BE: swl $8, -32768($8) # encoding: [0xa9,0x08,0x80,0x00]
1366 # CHECK-BE: swr $8, -32765($8) # encoding: [0xb9,0x08,0x80,0x03]
1367 # CHECK-LE: swl $8, -32765($8) # encoding: [0x03,0x80,0x08,0xa9]
1368 # CHECK-LE: swr $8, -32768($8) # encoding: [0x00,0x80,0x08,0xb9]
1371 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1372 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
1373 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1374 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1375 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1376 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
1377 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1378 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1381 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1382 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
1383 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
1384 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1385 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1386 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1387 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
1388 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
1389 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1390 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1393 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
1394 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
1395 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
1396 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1397 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1398 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
1399 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
1400 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
1401 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1402 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1405 # CHECK-BE: addiu $1, $8, 32767 # encoding: [0x25,0x01,0x7f,0xff]
1406 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1407 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1408 # CHECK-LE: addiu $1, $8, 32767 # encoding: [0xff,0x7f,0x01,0x25]
1409 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1410 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]