[InstCombine] Signed saturation patterns
[llvm-core.git] / test / MC / Mips / mips-expansions.s
blob09b45c34937fa65cd62c31c8896109fc06ee465d
1 # RUN: llvm-mc %s -triple=mipsel-unknown-linux -mcpu=mips32r2 -mattr=-xgot \
2 # RUN: -show-encoding | FileCheck %s --check-prefixes=CHECK,CHECK-LE,GOT
3 # RUN: llvm-mc %s -triple=mipsel-unknown-linux -mcpu=mips32r2 -mattr=+xgot \
4 # RUN: -show-encoding | FileCheck %s --check-prefixes=CHECK,CHECK-LE,XGOT
5 # RUN: llvm-mc %s -triple=mips-unknown-linux -mcpu=mips32r2 \
6 # RUN: -show-encoding | FileCheck %s --check-prefixes=CHECK,CHECK-BE
8 # Check that the IAS expands macro instructions in the same way as GAS.
10 # Load address, done by MipsAsmParser::expandLoadAddressReg()
11 # and MipsAsmParser::expandLoadAddressImm():
12 la $8, 1f
13 # CHECK-LE: lui $8, %hi($tmp0) # encoding: [A,A,0x08,0x3c]
14 # CHECK-LE: # fixup A - offset: 0, value: %hi($tmp0), kind: fixup_Mips_HI16
15 # CHECK-LE: addiu $8, $8, %lo($tmp0) # encoding: [A,A,0x08,0x25]
16 # CHECK-LE: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16
18 lb $4, 0x8000
19 # CHECK-LE: lui $4, 1 # encoding: [0x01,0x00,0x04,0x3c]
20 # CHECK-LE: lb $4, -32768($4) # encoding: [0x00,0x80,0x84,0x80]
22 lb $4, 0x20004($3)
23 # CHECK-LE: lui $4, 2 # encoding: [0x02,0x00,0x04,0x3c]
24 # CHECK-LE: addu $4, $4, $3 # encoding: [0x21,0x20,0x83,0x00]
25 # CHECK-LE: lb $4, 4($4) # encoding: [0x04,0x00,0x84,0x80]
27 lbu $4, 0x8000
28 # CHECK-LE: lui $4, 1 # encoding: [0x01,0x00,0x04,0x3c]
29 # CHECK-LE: lbu $4, -32768($4) # encoding: [0x00,0x80,0x84,0x90]
31 lbu $4, 0x20004($3)
32 # CHECK-LE: lui $4, 2 # encoding: [0x02,0x00,0x04,0x3c]
33 # CHECK-LE: addu $4, $4, $3 # encoding: [0x21,0x20,0x83,0x00]
34 # CHECK-LE: lbu $4, 4($4) # encoding: [0x04,0x00,0x84,0x90]
36 lh $4, 0x8000
37 # CHECK-LE: lui $4, 1
38 # CHECK-LE: lh $4, -32768($4)
40 lh $4, 0x20004($3)
41 # CHECK-LE: lui $4, 2
42 # CHECK-LE: addu $4, $4, $3
43 # CHECK-LE: lh $4, 4($4)
45 lhu $4, 0x8000
46 # CHECK-LE: lui $4, 1
47 # CHECK-LE: lhu $4, -32768($4)
49 lhu $4, 0x20004($3)
50 # CHECK-LE: lui $4, 2
51 # CHECK-LE: addu $4, $4, $3
52 # CHECK-LE: lhu $4, 4($4)
54 # LW/SW and LDC1/SDC1 of symbol address, done by MipsAsmParser::expandMemInst():
55 # NON-PIC code
56 .set noat
57 lw $10, symbol($4)
58 # CHECK-LE: lui $10, %hi(symbol) # encoding: [A,A,0x0a,0x3c]
59 # CHECK-LE: # fixup A - offset: 0, value: %hi(symbol), kind: fixup_Mips_HI16
60 # CHECK-LE: addu $10, $10, $4 # encoding: [0x21,0x50,0x44,0x01]
61 # CHECK-LE: lw $10, %lo(symbol)($10) # encoding: [A,A,0x4a,0x8d]
62 # CHECK-LE: # fixup A - offset: 0, value: %lo(symbol), kind: fixup_Mips_LO16
63 .set at
64 sw $10, symbol($9)
65 # CHECK-LE: lui $1, %hi(symbol) # encoding: [A,A,0x01,0x3c]
66 # CHECK-LE: # fixup A - offset: 0, value: %hi(symbol), kind: fixup_Mips_HI16
67 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
68 # CHECK-LE: sw $10, %lo(symbol)($1) # encoding: [A,A,0x2a,0xac]
69 # CHECK-LE: # fixup A - offset: 0, value: %lo(symbol), kind: fixup_Mips_LO16
71 lw $8, 1f
72 # CHECK-LE: lui $8, %hi($tmp0) # encoding: [A,A,0x08,0x3c]
73 # CHECK-LE: # fixup A - offset: 0, value: %hi($tmp0), kind: fixup_Mips_HI16
74 # CHECK-LE: lw $8, %lo($tmp0)($8) # encoding: [A,A,0x08,0x8d]
75 # CHECK-LE: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16
76 sw $8, 1f
77 # CHECK-LE: lui $1, %hi($tmp0) # encoding: [A,A,0x01,0x3c]
78 # CHECK-LE: # fixup A - offset: 0, value: %hi($tmp0), kind: fixup_Mips_HI16
79 # CHECK-LE: sw $8, %lo($tmp0)($1) # encoding: [A,A,0x28,0xac]
80 # CHECK-LE: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16
82 lw $10, 655483($4)
83 # CHECK-LE: lui $10, 10 # encoding: [0x0a,0x00,0x0a,0x3c]
84 # CHECK-LE: addu $10, $10, $4 # encoding: [0x21,0x50,0x44,0x01]
85 # CHECK-LE: lw $10, 123($10) # encoding: [0x7b,0x00,0x4a,0x8d]
86 sw $10, 123456($9)
87 # CHECK-LE: lui $1, 2 # encoding: [0x02,0x00,0x01,0x3c]
88 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
89 # CHECK-LE: sw $10, -7616($1) # encoding: [0x40,0xe2,0x2a,0xac]
91 lw $8, symbol
92 # CHECK-LE: lui $8, %hi(symbol) # encoding: [A,A,0x08,0x3c]
93 # CHECK-LE: # fixup A - offset: 0, value: %hi(symbol), kind: fixup_Mips_HI16
94 # CHECK-LE-NOT: move $8, $8 # encoding: [0x21,0x40,0x00,0x01]
95 # CHECK-LE: lw $8, %lo(symbol)($8) # encoding: [A,A,0x08,0x8d]
96 # CHECK-LE: # fixup A - offset: 0, value: %lo(symbol), kind: fixup_Mips_LO16
97 sw $8, symbol
98 # CHECK-LE: lui $1, %hi(symbol) # encoding: [A,A,0x01,0x3c]
99 # CHECK-LE: # fixup A - offset: 0, value: %hi(symbol), kind: fixup_Mips_HI16
100 # CHECK-LE-NOT: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
101 # CHECK-LE: sw $8, %lo(symbol)($1) # encoding: [A,A,0x28,0xac]
102 # CHECK-LE: # fixup A - offset: 0, value: %lo(symbol), kind: fixup_Mips_LO16
104 ldc1 $f0, symbol
105 # CHECK-LE: lui $1, %hi(symbol)
106 # CHECK-LE: ldc1 $f0, %lo(symbol)($1)
107 sdc1 $f0, symbol
108 # CHECK-LE: lui $1, %hi(symbol)
109 # CHECK-LE: sdc1 $f0, %lo(symbol)($1)
111 # PIC code
112 .option pic2
113 .set noat
114 lw $10, symbol($4)
115 # GOT: lw $10, %got(symbol)($gp) # encoding: [A,A,0x8a,0x8f]
116 # GOT-NEXT: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
117 # GOT-NEXT: addu $10, $10, $4 # encoding: [0x21,0x50,0x44,0x01]
118 # GOT-NEXT: lw $10, 0($10) # encoding: [0x00,0x00,0x4a,0x8d]
120 # XGOT: lui $10, %got_hi(symbol) # encoding: [A,A,0x0a,0x3c]
121 # XGOT-NEXT: # fixup A - offset: 0, value: %got_hi(symbol), kind: fixup_Mips_GOT_HI16
122 # XGOT-NEXT: addu $10, $10, $gp # encoding: [0x21,0x50,0x5c,0x01]
123 # XGOT-NEXT: lw $10, %got_lo(symbol)($10) # encoding: [A,A,0x4a,0x8d]
124 # XGOT-NEXT: # fixup A - offset: 0, value: %got_lo(symbol), kind: fixup_Mips_GOT_LO16
125 # XGOT-NEXT: addu $10, $10, $4 # encoding: [0x21,0x50,0x44,0x01]
126 # XGOT-NEXT: lw $10, 0($10) # encoding: [0x00,0x00,0x4a,0x8d]
127 .set at
128 sw $10, symbol($9)
129 # GOT: lw $1, %got(symbol)($gp) # encoding: [A,A,0x81,0x8f]
130 # GOT-NEXT: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
131 # GOT-NEXT: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
132 # GOT-NEXT: sw $10, 0($1) # encoding: [0x00,0x00,0x2a,0xac]
134 # XGOT: lui $1, %got_hi(symbol) # encoding: [A,A,0x01,0x3c]
135 # XGOT-NEXT: # fixup A - offset: 0, value: %got_hi(symbol), kind: fixup_Mips_GOT_HI16
136 # XGOT-NEXT: addu $1, $1, $gp # encoding: [0x21,0x08,0x3c,0x00]
137 # XGOT-NEXT: lw $1, %got_lo(symbol)($1) # encoding: [A,A,0x21,0x8c]
138 # XGOT-NEXT: # fixup A - offset: 0, value: %got_lo(symbol), kind: fixup_Mips_GOT_LO16
139 # XGOT-NEXT: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
140 # XGOT-NEXT: sw $10, 0($1) # encoding: [0x00,0x00,0x2a,0xac]
142 lw $8, 1f+8
143 # GOT: lw $8, %got($tmp0)($gp) # encoding: [A,A,0x88,0x8f]
144 # GOT-NEXT: # fixup A - offset: 0, value: %got($tmp0), kind: fixup_Mips_GOT
145 # GOT-NEXT: addiu $8, $8, %lo($tmp0) # encoding: [A,A,0x08,0x25]
146 # GOT-NEXT: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16
147 # GOT-NEXT: lw $8, 8($8) # encoding: [0x08,0x00,0x08,0x8d]
149 # XGOT: lw $8, %got($tmp0)($gp) # encoding: [A,A,0x88,0x8f]
150 # XGOT-NEXT: # fixup A - offset: 0, value: %got($tmp0), kind: fixup_Mips_GOT
151 # XGOT-NEXT: addiu $8, $8, %lo($tmp0) # encoding: [A,A,0x08,0x25]
152 # XGOT-NEXT: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16
153 # XGOT-NEXT: lw $8, 8($8) # encoding: [0x08,0x00,0x08,0x8d]
154 sw $8, 1f+8
155 # GOT: lw $1, %got($tmp0)($gp) # encoding: [A,A,0x81,0x8f]
156 # GOT-NEXT: # fixup A - offset: 0, value: %got($tmp0), kind: fixup_Mips_GOT
157 # GOT-NEXT: addiu $1, $1, %lo($tmp0) # encoding: [A,A,0x21,0x24]
158 # GOT-NEXT: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16
159 # GOT-NEXT: sw $8, 8($1) # encoding: [0x08,0x00,0x28,0xac]
161 # XGOT: lw $1, %got($tmp0)($gp) # encoding: [A,A,0x81,0x8f]
162 # XGOT-NEXT: # fixup A - offset: 0, value: %got($tmp0), kind: fixup_Mips_GOT
163 # XGOT-NEXT: addiu $1, $1, %lo($tmp0) # encoding: [A,A,0x21,0x24]
164 # XGOT-NEXT: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16
165 # XGOT-NEXT: sw $8, 8($1) # encoding: [0x08,0x00,0x28,0xac]
167 lw $10, 655483($4)
168 # GOT: lui $10, 10 # encoding: [0x0a,0x00,0x0a,0x3c]
169 # GOT-NEXT: addu $10, $10, $4 # encoding: [0x21,0x50,0x44,0x01]
170 # GOT-NEXT: lw $10, 123($10) # encoding: [0x7b,0x00,0x4a,0x8d]
172 # XGOT: lui $10, 10 # encoding: [0x0a,0x00,0x0a,0x3c]
173 # XGOT-NEXT: addu $10, $10, $4 # encoding: [0x21,0x50,0x44,0x01]
174 # XGOT-NEXT: lw $10, 123($10) # encoding: [0x7b,0x00,0x4a,0x8d]
175 sw $10, 123456($9)
176 # GOT: lui $1, 2 # encoding: [0x02,0x00,0x01,0x3c]
177 # GOT-NEXT: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
178 # GOT-NEXT: sw $10, -7616($1) # encoding: [0x40,0xe2,0x2a,0xac]
180 # XGOT: lui $1, 2 # encoding: [0x02,0x00,0x01,0x3c]
181 # XGOT-NEXT: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
182 # XGOT-NEXT: sw $10, -7616($1) # encoding: [0x40,0xe2,0x2a,0xac]
184 lw $8, symbol+8
185 # GOT: lw $8, %got(symbol)($gp) # encoding: [A,A,0x88,0x8f]
186 # GOT-NEXT: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
187 # GOT-NEXT: lw $8, 8($8) # encoding: [0x08,0x00,0x08,0x8d]
189 # XGOT: lui $8, %got_hi(symbol) # encoding: [A,A,0x08,0x3c]
190 # XGOT-NEXT: # fixup A - offset: 0, value: %got_hi(symbol), kind: fixup_Mips_GOT_HI16
191 # XGOT-NEXT: addu $8, $8, $gp # encoding: [0x21,0x40,0x1c,0x01]
192 # XGOT-NEXT: lw $8, %got_lo(symbol)($8) # encoding: [A,A,0x08,0x8d]
193 # XGOT-NEXT: # fixup A - offset: 0, value: %got_lo(symbol), kind: fixup_Mips_GOT_LO16
194 # XGOT-NEXT: lw $8, 8($8) # encoding: [0x08,0x00,0x08,0x8d]
195 sw $8, symbol+8
196 # GOT: lw $1, %got(symbol)($gp) # encoding: [A,A,0x81,0x8f]
197 # GOT-NEXT: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
198 # GOT-NEXT: sw $8, 8($1) # encoding: [0x08,0x00,0x28,0xac]
200 # XGOT: lui $1, %got_hi(symbol) # encoding: [A,A,0x01,0x3c]
201 # XGOT-NEXT: # fixup A - offset: 0, value: %got_hi(symbol), kind: fixup_Mips_GOT_HI16
202 # XGOT-NEXT: addu $1, $1, $gp # encoding: [0x21,0x08,0x3c,0x00]
203 # XGOT-NEXT: lw $1, %got_lo(symbol)($1) # encoding: [A,A,0x21,0x8c]
204 # XGOT-NEXT: # fixup A - offset: 0, value: %got_lo(symbol), kind: fixup_Mips_GOT_LO16
205 # XGOT-NEXT: sw $8, 8($1) # encoding: [0x08,0x00,0x28,0xac]
207 ldc1 $f0, symbol
208 # GOT: lw $1, %got(symbol)($gp) # encoding: [A,A,0x81,0x8f]
209 # GOT-NEXT: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
210 # GOT-NEXT: ldc1 $f0, 0($1) # encoding: [0x00,0x00,0x20,0xd4]
212 # XGOT: lui $1, %got_hi(symbol) # encoding: [A,A,0x01,0x3c]
213 # XGOT-NEXT: # fixup A - offset: 0, value: %got_hi(symbol), kind: fixup_Mips_GOT_HI16
214 # XGOT-NEXT: addu $1, $1, $gp # encoding: [0x21,0x08,0x3c,0x00]
215 # XGOT-NEXT: lw $1, %got_lo(symbol)($1) # encoding: [A,A,0x21,0x8c]
216 # XGOT-NEXT: # fixup A - offset: 0, value: %got_lo(symbol), kind: fixup_Mips_GOT_LO16
217 # XGOT-NEXT: ldc1 $f0, 0($1) # encoding: [0x00,0x00,0x20,0xd4]
218 sdc1 $f0, symbol
219 # GOT: lw $1, %got(symbol)($gp) # encoding: [A,A,0x81,0x8f]
220 # GOT-NEXT: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
221 # GOT-NEXT: sdc1 $f0, 0($1) # encoding: [0x00,0x00,0x20,0xf4]
223 # XGOT: lui $1, %got_hi(symbol) # encoding: [A,A,0x01,0x3c]
224 # XGOT-NEXT: # fixup A - offset: 0, value: %got_hi(symbol), kind: fixup_Mips_GOT_HI16
225 # XGOT-NEXT: addu $1, $1, $gp # encoding: [0x21,0x08,0x3c,0x00]
226 # XGOT-NEXT: lw $1, %got_lo(symbol)($1) # encoding: [A,A,0x21,0x8c]
227 # XGOT-NEXT: # fixup A - offset: 0, value: %got_lo(symbol), kind: fixup_Mips_GOT_LO16
228 # XGOT-NEXT: sdc1 $f0, 0($1) # encoding: [0x00,0x00,0x20,0xf4]
229 .option pic0
231 # Test BNE with an immediate as the 2nd operand.
232 bne $2, 0, 1332
233 # CHECK-LE: bnez $2, 1332 # encoding: [0x4d,0x01,0x40,0x14]
234 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
236 bne $2, 123, 1332
237 # CHECK-LE: addiu $1, $zero, 123 # encoding: [0x7b,0x00,0x01,0x24]
238 # CHECK-LE: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14]
239 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
241 bne $2, -2345, 1332
242 # CHECK-LE: addiu $1, $zero, -2345 # encoding: [0xd7,0xf6,0x01,0x24]
243 # CHECK-LE: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14]
244 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
246 bne $2, 65538, 1332
247 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
248 # CHECK-LE: ori $1, $1, 2 # encoding: [0x02,0x00,0x21,0x34]
249 # CHECK-LE: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14]
250 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
252 bne $2, ~7, 1332
253 # CHECK-LE: addiu $1, $zero, -8 # encoding: [0xf8,0xff,0x01,0x24]
254 # CHECK-LE: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14]
255 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
257 bne $2, 0x10000, 1332
258 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
259 # CHECK-LE: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14]
260 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
262 # Test BEQ with an immediate as the 2nd operand.
263 beq $2, 0, 1332
264 # CHECK-LE: beqz $2, 1332 # encoding: [0x4d,0x01,0x40,0x10]
265 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
267 beq $2, 123, 1332
268 # CHECK-LE: addiu $1, $zero, 123 # encoding: [0x7b,0x00,0x01,0x24]
269 # CHECK-LE: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10]
270 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
272 beq $2, -2345, 1332
273 # CHECK-LE: addiu $1, $zero, -2345 # encoding: [0xd7,0xf6,0x01,0x24]
274 # CHECK-LE: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10]
275 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
277 beq $2, 65538, 1332
278 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
279 # CHECK-LE: ori $1, $1, 2 # encoding: [0x02,0x00,0x21,0x34]
280 # CHECK-LE: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10]
281 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
283 beq $2, ~7, 1332
284 # CHECK-LE: addiu $1, $zero, -8 # encoding: [0xf8,0xff,0x01,0x24]
285 # CHECK-LE: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10]
286 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
288 beq $2, 0x10000, 1332
289 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
290 # CHECK-LE: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10]
291 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
293 beq $2, 65538, foo
294 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
295 # CHECK-LE: ori $1, $1, 2 # encoding: [0x02,0x00,0x21,0x34]
296 # CHECK-LE: beq $2, $1, foo # encoding: [A,A,0x41,0x10]
297 # CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00]
299 # Test ULH with immediate operand.
300 ulh_imm: # CHECK-LABEL: ulh_imm:
301 ulh $8, 0
302 # CHECK-BE: lb $1, 0($zero) # encoding: [0x80,0x01,0x00,0x00]
303 # CHECK-BE: lbu $8, 1($zero) # encoding: [0x90,0x08,0x00,0x01]
304 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
305 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
306 # CHECK-LE: lb $1, 1($zero) # encoding: [0x01,0x00,0x01,0x80]
307 # CHECK-LE: lbu $8, 0($zero) # encoding: [0x00,0x00,0x08,0x90]
308 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
309 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
311 ulh $8, 2
312 # CHECK-BE: lb $1, 2($zero) # encoding: [0x80,0x01,0x00,0x02]
313 # CHECK-BE: lbu $8, 3($zero) # encoding: [0x90,0x08,0x00,0x03]
314 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
315 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
316 # CHECK-LE: lb $1, 3($zero) # encoding: [0x03,0x00,0x01,0x80]
317 # CHECK-LE: lbu $8, 2($zero) # encoding: [0x02,0x00,0x08,0x90]
318 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
319 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
321 ulh $8, 0x8000
322 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
323 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
324 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
325 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
326 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
327 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
328 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
329 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
330 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
331 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
333 ulh $8, -0x8000
334 # CHECK-BE: lb $1, -32768($zero) # encoding: [0x80,0x01,0x80,0x00]
335 # CHECK-BE: lbu $8, -32767($zero) # encoding: [0x90,0x08,0x80,0x01]
336 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
337 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
338 # CHECK-LE: lb $1, -32767($zero) # encoding: [0x01,0x80,0x01,0x80]
339 # CHECK-LE: lbu $8, -32768($zero) # encoding: [0x00,0x80,0x08,0x90]
340 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
341 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
343 ulh $8, 0x10000
344 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
345 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
346 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
347 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
348 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
349 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
350 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
351 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
352 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
353 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
355 ulh $8, 0x18888
356 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
357 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
358 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
359 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
360 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
361 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
362 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
363 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
364 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
365 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
366 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
367 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
369 ulh $8, -32769
370 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
371 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
372 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
373 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
374 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
375 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
376 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
377 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
378 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
379 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
380 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
381 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
383 ulh $8, 32767
384 # CHECK-BE: addiu $1, $zero, 32767 # encoding: [0x24,0x01,0x7f,0xff]
385 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
386 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
387 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
388 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
389 # CHECK-LE: addiu $1, $zero, 32767 # encoding: [0xff,0x7f,0x01,0x24]
390 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
391 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
392 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
393 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
395 # Test ULH with immediate offset and a source register operand.
396 ulh_reg: # CHECK-LABEL: ulh_reg:
397 ulh $8, 0($9)
398 # CHECK-BE: lb $1, 0($9) # encoding: [0x81,0x21,0x00,0x00]
399 # CHECK-BE: lbu $8, 1($9) # encoding: [0x91,0x28,0x00,0x01]
400 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
401 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
402 # CHECK-LE: lb $1, 1($9) # encoding: [0x01,0x00,0x21,0x81]
403 # CHECK-LE: lbu $8, 0($9) # encoding: [0x00,0x00,0x28,0x91]
404 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
405 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
407 ulh $8, 2($9)
408 # CHECK-BE: lb $1, 2($9) # encoding: [0x81,0x21,0x00,0x02]
409 # CHECK-BE: lbu $8, 3($9) # encoding: [0x91,0x28,0x00,0x03]
410 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
411 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
412 # CHECK-LE: lb $1, 3($9) # encoding: [0x03,0x00,0x21,0x81]
413 # CHECK-LE: lbu $8, 2($9) # encoding: [0x02,0x00,0x28,0x91]
414 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
415 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
417 ulh $8, 0x8000($9)
418 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
419 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
420 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
421 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
422 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
423 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
424 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
425 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
426 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
427 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
428 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
429 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
431 ulh $8, -0x8000($9)
432 # CHECK-BE: lb $1, -32768($9) # encoding: [0x81,0x21,0x80,0x00]
433 # CHECK-BE: lbu $8, -32767($9) # encoding: [0x91,0x28,0x80,0x01]
434 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
435 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
436 # CHECK-LE: lb $1, -32767($9) # encoding: [0x01,0x80,0x21,0x81]
437 # CHECK-LE: lbu $8, -32768($9) # encoding: [0x00,0x80,0x28,0x91]
438 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
439 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
441 ulh $8, 0x10000($9)
442 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
443 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
444 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
445 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
446 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
447 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
448 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
449 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
450 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
451 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
452 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
453 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
455 ulh $8, 0x18888($9)
456 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
457 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
458 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
459 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
460 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
461 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
462 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
463 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
464 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
465 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
466 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
467 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
468 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
469 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
471 ulh $8, -32769($9)
472 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
473 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
474 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
475 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
476 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
477 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
478 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
479 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
480 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
481 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
482 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
483 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
484 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
485 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
487 ulh $8, 32767($9)
488 # CHECK-BE: addiu $1, $9, 32767 # encoding: [0x25,0x21,0x7f,0xff]
489 # CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00]
490 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
491 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
492 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
493 # CHECK-LE: addiu $1, $9, 32767 # encoding: [0xff,0x7f,0x21,0x25]
494 # CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80]
495 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
496 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
497 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
499 # Test ULHU with immediate operand.
500 ulhu_imm: # CHECK-LABEL: ulhu_imm:
501 ulhu $8, 0
502 # CHECK-BE: lbu $1, 0($zero) # encoding: [0x90,0x01,0x00,0x00]
503 # CHECK-BE: lbu $8, 1($zero) # encoding: [0x90,0x08,0x00,0x01]
504 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
505 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
506 # CHECK-LE: lbu $1, 1($zero) # encoding: [0x01,0x00,0x01,0x90]
507 # CHECK-LE: lbu $8, 0($zero) # encoding: [0x00,0x00,0x08,0x90]
508 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
509 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
511 ulhu $8, 2
512 # CHECK-BE: lbu $1, 2($zero) # encoding: [0x90,0x01,0x00,0x02]
513 # CHECK-BE: lbu $8, 3($zero) # encoding: [0x90,0x08,0x00,0x03]
514 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
515 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
516 # CHECK-LE: lbu $1, 3($zero) # encoding: [0x03,0x00,0x01,0x90]
517 # CHECK-LE: lbu $8, 2($zero) # encoding: [0x02,0x00,0x08,0x90]
518 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
519 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
521 ulhu $8, 0x8000
522 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
523 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
524 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
525 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
526 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
527 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
528 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
529 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
530 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
531 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
533 ulhu $8, -0x8000
534 # CHECK-BE: lbu $1, -32768($zero) # encoding: [0x90,0x01,0x80,0x00]
535 # CHECK-BE: lbu $8, -32767($zero) # encoding: [0x90,0x08,0x80,0x01]
536 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
537 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
538 # CHECK-LE: lbu $1, -32767($zero) # encoding: [0x01,0x80,0x01,0x90]
539 # CHECK-LE: lbu $8, -32768($zero) # encoding: [0x00,0x80,0x08,0x90]
540 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
541 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
543 ulhu $8, 0x10000
544 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
545 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
546 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
547 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
548 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
549 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
550 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
551 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
552 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
553 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
555 ulhu $8, 0x18888
556 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
557 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
558 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
559 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
560 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
561 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
562 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
563 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
564 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
565 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
566 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
567 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
569 ulhu $8, -32769
570 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
571 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
572 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
573 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
574 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
575 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
576 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
577 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
578 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
579 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
580 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
581 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
583 ulhu $8, 32767
584 # CHECK-BE: addiu $1, $zero, 32767 # encoding: [0x24,0x01,0x7f,0xff]
585 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
586 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
587 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
588 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
589 # CHECK-LE: addiu $1, $zero, 32767 # encoding: [0xff,0x7f,0x01,0x24]
590 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
591 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
592 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
593 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
595 # Test ULHU with immediate offset and a source register operand.
596 ulhu $8, 0($9)
597 # CHECK-BE: lbu $1, 0($9) # encoding: [0x91,0x21,0x00,0x00]
598 # CHECK-BE: lbu $8, 1($9) # encoding: [0x91,0x28,0x00,0x01]
599 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
600 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
601 # CHECK-LE: lbu $1, 1($9) # encoding: [0x01,0x00,0x21,0x91]
602 # CHECK-LE: lbu $8, 0($9) # encoding: [0x00,0x00,0x28,0x91]
603 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
604 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
606 ulhu $8, 2($9)
607 # CHECK-BE: lbu $1, 2($9) # encoding: [0x91,0x21,0x00,0x02]
608 # CHECK-BE: lbu $8, 3($9) # encoding: [0x91,0x28,0x00,0x03]
609 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
610 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
611 # CHECK-LE: lbu $1, 3($9) # encoding: [0x03,0x00,0x21,0x91]
612 # CHECK-LE: lbu $8, 2($9) # encoding: [0x02,0x00,0x28,0x91]
613 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
614 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
616 ulhu $8, 0x8000($9)
617 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
618 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
619 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
620 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
621 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
622 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
623 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
624 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
625 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
626 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
627 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
628 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
630 ulhu $8, -0x8000($9)
631 # CHECK-BE: lbu $1, -32768($9) # encoding: [0x91,0x21,0x80,0x00]
632 # CHECK-BE: lbu $8, -32767($9) # encoding: [0x91,0x28,0x80,0x01]
633 # CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00]
634 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
635 # CHECK-LE: lbu $1, -32767($9) # encoding: [0x01,0x80,0x21,0x91]
636 # CHECK-LE: lbu $8, -32768($9) # encoding: [0x00,0x80,0x28,0x91]
637 # CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00]
638 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
640 ulhu $8, 0x10000($9)
641 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
642 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
643 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
644 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
645 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
646 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
647 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
648 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
649 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
650 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
651 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
652 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
654 ulhu $8, 0x18888($9)
655 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
656 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
657 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
658 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
659 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
660 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
661 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
662 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
663 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
664 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
665 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
666 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
667 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
668 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
670 ulhu $8, -32769($9)
671 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
672 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
673 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
674 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
675 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
676 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
677 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
678 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
679 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
680 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
681 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
682 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
683 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
684 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
686 ulhu $8, 32767($9)
687 # CHECK-BE: addiu $1, $9, 32767 # encoding: [0x25,0x21,0x7f,0xff]
688 # CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00]
689 # CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01]
690 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
691 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
692 # CHECK-LE: addiu $1, $9, 32767 # encoding: [0xff,0x7f,0x21,0x25]
693 # CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90]
694 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
695 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
696 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
698 # Test ULW with immediate operand.
699 ulw $8, 0
700 # CHECK-BE: lwl $8, 0($zero) # encoding: [0x88,0x08,0x00,0x00]
701 # CHECK-BE: lwr $8, 3($zero) # encoding: [0x98,0x08,0x00,0x03]
702 # CHECK-LE: lwl $8, 3($zero) # encoding: [0x03,0x00,0x08,0x88]
703 # CHECK-LE: lwr $8, 0($zero) # encoding: [0x00,0x00,0x08,0x98]
705 ulw $8, 2
706 # CHECK-BE: lwl $8, 2($zero) # encoding: [0x88,0x08,0x00,0x02]
707 # CHECK-BE: lwr $8, 5($zero) # encoding: [0x98,0x08,0x00,0x05]
708 # CHECK-LE: lwl $8, 5($zero) # encoding: [0x05,0x00,0x08,0x88]
709 # CHECK-LE: lwr $8, 2($zero) # encoding: [0x02,0x00,0x08,0x98]
711 ulw $8, 0x8000
712 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
713 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
714 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
715 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
716 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
717 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
719 ulw $8, -0x8000
720 # CHECK-BE: lwl $8, -32768($zero) # encoding: [0x88,0x08,0x80,0x00]
721 # CHECK-BE: lwr $8, -32765($zero) # encoding: [0x98,0x08,0x80,0x03]
722 # CHECK-LE: lwl $8, -32765($zero) # encoding: [0x03,0x80,0x08,0x88]
723 # CHECK-LE: lwr $8, -32768($zero) # encoding: [0x00,0x80,0x08,0x98]
725 ulw $8, 0x10000
726 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
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: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
731 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
733 ulw $8, 0x18888
734 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
735 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
736 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
737 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
738 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
739 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
740 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
741 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
743 ulw $8, -32771
744 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
745 # CHECK-BE: ori $1, $1, 32765 # encoding: [0x34,0x21,0x7f,0xfd]
746 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
747 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
748 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
749 # CHECK-LE: ori $1, $1, 32765 # encoding: [0xfd,0x7f,0x21,0x34]
750 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
751 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
753 ulw $8, 32765
754 # CHECK-BE: addiu $1, $zero, 32765 # encoding: [0x24,0x01,0x7f,0xfd]
755 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
756 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
757 # CHECK-LE: addiu $1, $zero, 32765 # encoding: [0xfd,0x7f,0x01,0x24]
758 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
759 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
761 # Test ULW with immediate offset and a source register operand.
762 ulw $8, 0($9)
763 # CHECK-BE: lwl $8, 0($9) # encoding: [0x89,0x28,0x00,0x00]
764 # CHECK-BE: lwr $8, 3($9) # encoding: [0x99,0x28,0x00,0x03]
765 # CHECK-LE: lwl $8, 3($9) # encoding: [0x03,0x00,0x28,0x89]
766 # CHECK-LE: lwr $8, 0($9) # encoding: [0x00,0x00,0x28,0x99]
768 ulw $8, 2($9)
769 # CHECK-BE: lwl $8, 2($9) # encoding: [0x89,0x28,0x00,0x02]
770 # CHECK-BE: lwr $8, 5($9) # encoding: [0x99,0x28,0x00,0x05]
771 # CHECK-LE: lwl $8, 5($9) # encoding: [0x05,0x00,0x28,0x89]
772 # CHECK-LE: lwr $8, 2($9) # encoding: [0x02,0x00,0x28,0x99]
774 ulw $8, 0x8000($9)
775 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
776 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
777 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
778 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
779 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
780 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
781 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
782 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
784 ulw $8, -0x8000($9)
785 # CHECK-BE: lwl $8, -32768($9) # encoding: [0x89,0x28,0x80,0x00]
786 # CHECK-BE: lwr $8, -32765($9) # encoding: [0x99,0x28,0x80,0x03]
787 # CHECK-LE: lwl $8, -32765($9) # encoding: [0x03,0x80,0x28,0x89]
788 # CHECK-LE: lwr $8, -32768($9) # encoding: [0x00,0x80,0x28,0x99]
790 ulw $8, 0x10000($9)
791 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
792 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
793 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
794 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
795 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
796 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
797 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
798 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
800 ulw $8, 0x18888($9)
801 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
802 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
803 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
804 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
805 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
806 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
807 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
808 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
809 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
810 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
812 ulw $8, -32771($9)
813 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
814 # CHECK-BE: ori $1, $1, 32765 # encoding: [0x34,0x21,0x7f,0xfd]
815 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
816 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
817 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
818 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
819 # CHECK-LE: ori $1, $1, 32765 # encoding: [0xfd,0x7f,0x21,0x34]
820 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
821 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
822 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
824 ulw $8, 32765($9)
825 # CHECK-BE: addiu $1, $9, 32765 # encoding: [0x25,0x21,0x7f,0xfd]
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: addiu $1, $9, 32765 # encoding: [0xfd,0x7f,0x21,0x25]
829 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
830 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
832 ulw $8, 0($8)
833 # CHECK-BE: lwl $1, 0($8) # encoding: [0x89,0x01,0x00,0x00]
834 # CHECK-BE: lwr $1, 3($8) # encoding: [0x99,0x01,0x00,0x03]
835 # CHECK-BE: move $8, $1 # encoding: [0x00,0x20,0x40,0x25]
836 # CHECK-LE: lwl $1, 3($8) # encoding: [0x03,0x00,0x01,0x89]
837 # CHECK-LE: lwr $1, 0($8) # encoding: [0x00,0x00,0x01,0x99]
838 # CHECK-LE: move $8, $1 # encoding: [0x25,0x40,0x20,0x00]
840 ulw $8, 2($8)
841 # CHECK-BE: lwl $1, 2($8) # encoding: [0x89,0x01,0x00,0x02]
842 # CHECK-BE: lwr $1, 5($8) # encoding: [0x99,0x01,0x00,0x05]
843 # CHECK-BE: move $8, $1 # encoding: [0x00,0x20,0x40,0x25]
844 # CHECK-LE: lwl $1, 5($8) # encoding: [0x05,0x00,0x01,0x89]
845 # CHECK-LE: lwr $1, 2($8) # encoding: [0x02,0x00,0x01,0x99]
846 # CHECK-LE: move $8, $1 # encoding: [0x25,0x40,0x20,0x00]
848 ulw $8, 0x8000($8)
849 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
850 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
851 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
852 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
853 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
854 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
855 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
856 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
858 ulw $8, -0x8000($8)
859 # CHECK-BE: lwl $1, -32768($8) # encoding: [0x89,0x01,0x80,0x00]
860 # CHECK-BE: lwr $1, -32765($8) # encoding: [0x99,0x01,0x80,0x03]
861 # CHECK-BE: move $8, $1 # encoding: [0x00,0x20,0x40,0x25]
862 # CHECK-LE: lwl $1, -32765($8) # encoding: [0x03,0x80,0x01,0x89]
863 # CHECK-LE: lwr $1, -32768($8) # encoding: [0x00,0x80,0x01,0x99]
864 # CHECK-LE: move $8, $1 # encoding: [0x25,0x40,0x20,0x00]
866 ulw $8, 0x10000($8)
867 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
868 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
869 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
870 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
871 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
872 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
873 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
874 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
876 ulw $8, 0x18888($8)
877 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
878 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
879 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
880 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
881 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
882 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
883 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
884 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
885 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
886 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
888 ulw $8, -32771($8)
889 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
890 # CHECK-BE: ori $1, $1, 32765 # encoding: [0x34,0x21,0x7f,0xfd]
891 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
892 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
893 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
894 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
895 # CHECK-LE: ori $1, $1, 32765 # encoding: [0xfd,0x7f,0x21,0x34]
896 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
897 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
898 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
900 ulw $8, 32765($8)
901 # CHECK-BE: addiu $1, $8, 32765 # encoding: [0x25,0x01,0x7f,0xfd]
902 # CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00]
903 # CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03]
904 # CHECK-LE: addiu $1, $8, 32765 # encoding: [0xfd,0x7f,0x01,0x25]
905 # CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88]
906 # CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98]
908 ush_imm: # CHECK-LABEL: ush_imm
909 ush $8, 0
910 # CHECK-BE: sb $8, 1($zero) # encoding: [0xa0,0x08,0x00,0x01]
911 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
912 # CHECK-BE: sb $1, 0($zero) # encoding: [0xa0,0x01,0x00,0x00]
913 # CHECK-LE: sb $8, 0($zero) # encoding: [0x00,0x00,0x08,0xa0]
914 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
915 # CHECK-LE: sb $1, 1($zero) # encoding: [0x01,0x00,0x01,0xa0]
917 ush $8, 2
918 # CHECK-BE: sb $8, 3($zero) # encoding: [0xa0,0x08,0x00,0x03]
919 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
920 # CHECK-BE: sb $1, 2($zero) # encoding: [0xa0,0x01,0x00,0x02]
921 # CHECK-LE: sb $8, 2($zero) # encoding: [0x02,0x00,0x08,0xa0]
922 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
923 # CHECK-LE: sb $1, 3($zero) # encoding: [0x03,0x00,0x01,0xa0]
925 # FIXME: Remove the identity moves (move $1, $1) coming from loadImmediate
926 ush $8, 0x8000
927 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
928 # CHECK-BE: move $1, $1 # encoding: [0x00,0x20,0x08,0x21]
929 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
930 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
931 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
932 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
933 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
934 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
935 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
936 # CHECK-LE: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
937 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
938 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
939 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
940 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
941 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
942 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
944 ush $8, -0x8000
945 # CHECK-BE: sb $8, -32767($zero) # encoding: [0xa0,0x08,0x80,0x01]
946 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
947 # CHECK-BE: sb $1, -32768($zero) # encoding: [0xa0,0x01,0x80,0x00]
948 # CHECK-LE: sb $8, -32768($zero) # encoding: [0x00,0x80,0x08,0xa0]
949 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
950 # CHECK-LE: sb $1, -32767($zero) # encoding: [0x01,0x80,0x01,0xa0]
952 # FIXME: Remove the identity moves (move $1, $1) coming from loadImmediate
953 ush $8, 0x10000
954 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
955 # CHECK-BE: move $1, $1 # encoding: [0x00,0x20,0x08,0x21]
956 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
957 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
958 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
959 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
960 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
961 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
962 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
963 # CHECK-LE: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
964 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
965 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
966 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
967 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
968 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
969 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
971 # FIXME: Remove the identity moves (move $1, $1) coming from loadImmediate
972 ush $8, 0x18888
973 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
974 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
975 # CHECK-BE: move $1, $1 # encoding: [0x00,0x20,0x08,0x21]
976 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
977 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
978 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
979 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
980 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
981 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
982 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
983 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
984 # CHECK-LE: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
985 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
986 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
987 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
988 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
989 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
990 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
992 # FIXME: Remove the identity moves (move $1, $1) coming from loadImmediate
993 ush $8, -32769
994 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
995 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
996 # CHECK-BE: move $1, $1 # encoding: [0x00,0x20,0x08,0x21]
997 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
998 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
999 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1000 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1001 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1002 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1003 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
1004 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
1005 # CHECK-LE: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
1006 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1007 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1008 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1009 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1010 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1011 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1013 ush $8, 32767
1014 # CHECK-BE: addiu $1, $zero, 32767 # encoding: [0x24,0x01,0x7f,0xff]
1015 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1016 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1017 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1018 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1019 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1020 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1021 # CHECK-LE: addiu $1, $zero, 32767 # encoding: [0xff,0x7f,0x01,0x24]
1022 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1023 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1024 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1025 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1026 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1027 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1029 ush_reg: # CHECK-LABEL: ush_reg
1030 ush $8, 0($9)
1031 # CHECK-BE: sb $8, 1($9) # encoding: [0xa1,0x28,0x00,0x01]
1032 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
1033 # CHECK-BE: sb $1, 0($9) # encoding: [0xa1,0x21,0x00,0x00]
1034 # CHECK-LE: sb $8, 0($9) # encoding: [0x00,0x00,0x28,0xa1]
1035 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
1036 # CHECK-LE: sb $1, 1($9) # encoding: [0x01,0x00,0x21,0xa1]
1038 ush $8, 2($9)
1039 # CHECK-BE: sb $8, 3($9) # encoding: [0xa1,0x28,0x00,0x03]
1040 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
1041 # CHECK-BE: sb $1, 2($9) # encoding: [0xa1,0x21,0x00,0x02]
1042 # CHECK-LE: sb $8, 2($9) # encoding: [0x02,0x00,0x28,0xa1]
1043 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
1044 # CHECK-LE: sb $1, 3($9) # encoding: [0x03,0x00,0x21,0xa1]
1046 ush $8, 0x8000($9)
1047 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
1048 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
1049 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1050 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1051 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1052 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1053 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1054 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1055 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,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]
1064 ush $8, -0x8000($9)
1065 # CHECK-BE: sb $8, -32767($9) # encoding: [0xa1,0x28,0x80,0x01]
1066 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
1067 # CHECK-BE: sb $1, -32768($9) # encoding: [0xa1,0x21,0x80,0x00]
1068 # CHECK-LE: sb $8, -32768($9) # encoding: [0x00,0x80,0x28,0xa1]
1069 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
1070 # CHECK-LE: sb $1, -32767($9) # encoding: [0x01,0x80,0x21,0xa1]
1072 ush $8, 0x10000($9)
1073 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1074 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
1075 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1076 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1077 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1078 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1079 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1080 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1081 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1082 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
1083 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1084 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1085 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1086 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1087 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1088 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1090 ush $8, 0x18888($9)
1091 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1092 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
1093 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
1094 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1095 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1096 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1097 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1098 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1099 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1100 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1101 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
1102 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
1103 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1104 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1105 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1106 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1107 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1108 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1110 ush $8, -32769($9)
1111 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
1112 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
1113 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
1114 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1115 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1116 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1117 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1118 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1119 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1120 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
1121 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
1122 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
1123 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1124 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1125 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1126 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1127 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1128 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1130 ush $8, 32767($9)
1131 # CHECK-BE: addiu $1, $9, 32767 # encoding: [0x25,0x21,0x7f,0xff]
1132 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1133 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1134 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1135 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1136 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1137 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1138 # CHECK-LE: addiu $1, $9, 32767 # encoding: [0xff,0x7f,0x21,0x25]
1139 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1140 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1141 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1142 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1143 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1144 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1146 ush $8, 0($8)
1147 # CHECK-BE: sb $8, 1($8) # encoding: [0xa1,0x08,0x00,0x01]
1148 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
1149 # CHECK-BE: sb $1, 0($8) # encoding: [0xa1,0x01,0x00,0x00]
1150 # CHECK-LE: sb $8, 0($8) # encoding: [0x00,0x00,0x08,0xa1]
1151 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
1152 # CHECK-LE: sb $1, 1($8) # encoding: [0x01,0x00,0x01,0xa1]
1154 ush $8, 2($8)
1155 # CHECK-BE: sb $8, 3($8) # encoding: [0xa1,0x08,0x00,0x03]
1156 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
1157 # CHECK-BE: sb $1, 2($8) # encoding: [0xa1,0x01,0x00,0x02]
1158 # CHECK-LE: sb $8, 2($8) # encoding: [0x02,0x00,0x08,0xa1]
1159 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
1160 # CHECK-LE: sb $1, 3($8) # encoding: [0x03,0x00,0x01,0xa1]
1162 ush $8, 0x8000($8)
1163 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
1164 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
1165 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1166 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1167 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1168 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1169 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1170 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1171 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,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]
1180 ush $8, -0x8000($8)
1181 # CHECK-BE: sb $8, -32767($8) # encoding: [0xa1,0x08,0x80,0x01]
1182 # CHECK-BE: srl $1, $8, 8 # encoding: [0x00,0x08,0x0a,0x02]
1183 # CHECK-BE: sb $1, -32768($8) # encoding: [0xa1,0x01,0x80,0x00]
1184 # CHECK-LE: sb $8, -32768($8) # encoding: [0x00,0x80,0x08,0xa1]
1185 # CHECK-LE: srl $1, $8, 8 # encoding: [0x02,0x0a,0x08,0x00]
1186 # CHECK-LE: sb $1, -32767($8) # encoding: [0x01,0x80,0x01,0xa1]
1188 ush $8, 0x10000($8)
1189 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1190 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
1191 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1192 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1193 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1194 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1195 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1196 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1197 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1198 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
1199 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1200 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1201 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1202 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1203 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1204 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1206 ush $8, 0x18888($8)
1207 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1208 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
1209 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
1210 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1211 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1212 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1213 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1214 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1215 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1216 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1217 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
1218 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
1219 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1220 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1221 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1222 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1223 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1224 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1226 ush $8, -32769($8)
1227 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
1228 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
1229 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
1230 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1231 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1232 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1233 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1234 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1235 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1236 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
1237 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
1238 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
1239 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1240 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1241 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1242 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1243 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1244 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1246 ush $8, 32767($8)
1247 # CHECK-BE: addiu $1, $8, 32767 # encoding: [0x25,0x01,0x7f,0xff]
1248 # CHECK-BE: sb $8, 1($1) # encoding: [0xa0,0x28,0x00,0x01]
1249 # CHECK-BE: srl $8, $8, 8 # encoding: [0x00,0x08,0x42,0x02]
1250 # CHECK-BE: sb $8, 0($1) # encoding: [0xa0,0x28,0x00,0x00]
1251 # CHECK-BE: lbu $1, 0($1) # encoding: [0x90,0x21,0x00,0x00]
1252 # CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00]
1253 # CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25]
1254 # CHECK-LE: addiu $1, $8, 32767 # encoding: [0xff,0x7f,0x01,0x25]
1255 # CHECK-LE: sb $8, 0($1) # encoding: [0x00,0x00,0x28,0xa0]
1256 # CHECK-LE: srl $8, $8, 8 # encoding: [0x02,0x42,0x08,0x00]
1257 # CHECK-LE: sb $8, 1($1) # encoding: [0x01,0x00,0x28,0xa0]
1258 # CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90]
1259 # CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00]
1260 # CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01]
1262 usw_imm: # CHECK-LABEL: usw_imm:
1263 usw $8, 0
1264 # CHECK-BE: swl $8, 0($zero) # encoding: [0xa8,0x08,0x00,0x00]
1265 # CHECK-BE: swr $8, 3($zero) # encoding: [0xb8,0x08,0x00,0x03]
1266 # CHECK-LE: swl $8, 3($zero) # encoding: [0x03,0x00,0x08,0xa8]
1267 # CHECK-LE: swr $8, 0($zero) # encoding: [0x00,0x00,0x08,0xb8]
1269 usw $8, 2
1270 # CHECK-BE: swl $8, 2($zero) # encoding: [0xa8,0x08,0x00,0x02]
1271 # CHECK-BE: swr $8, 5($zero) # encoding: [0xb8,0x08,0x00,0x05]
1272 # CHECK-LE: swl $8, 5($zero) # encoding: [0x05,0x00,0x08,0xa8]
1273 # CHECK-LE: swr $8, 2($zero) # encoding: [0x02,0x00,0x08,0xb8]
1275 # FIXME: Remove the identity moves (move $1, $1) coming from loadImmediate
1276 usw $8, 0x8000
1277 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
1278 # CHECK-BE: move $1, $1 # encoding: [0x00,0x20,0x08,0x21]
1279 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1280 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1281 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
1282 # CHECK-LE: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
1283 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1284 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1286 usw $8, -0x8000
1287 # CHECK-BE: swl $8, -32768($zero) # encoding: [0xa8,0x08,0x80,0x00]
1288 # CHECK-BE: swr $8, -32765($zero) # encoding: [0xb8,0x08,0x80,0x03]
1289 # CHECK-LE: swl $8, -32765($zero) # encoding: [0x03,0x80,0x08,0xa8]
1290 # CHECK-LE: swr $8, -32768($zero) # encoding: [0x00,0x80,0x08,0xb8]
1292 # FIXME: Remove the identity moves (move $1, $1) coming from loadImmediate
1293 usw $8, 0x10000
1294 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1295 # CHECK-BE: move $1, $1 # encoding: [0x00,0x20,0x08,0x21]
1296 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1297 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1298 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1299 # CHECK-LE: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
1300 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1301 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1303 # FIXME: Remove the identity moves (move $1, $1) coming from loadImmediate
1304 usw $8, 0x18888
1305 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1306 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
1307 # CHECK-BE: move $1, $1 # encoding: [0x00,0x20,0x08,0x21]
1308 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1309 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1310 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1311 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
1312 # CHECK-LE: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
1313 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1314 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1316 # FIXME: Remove the identity moves (move $1, $1) coming from loadImmediate
1317 usw $8, -32769
1318 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
1319 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
1320 # CHECK-BE: move $1, $1 # encoding: [0x00,0x20,0x08,0x21]
1321 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1322 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1323 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
1324 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
1325 # CHECK-LE: move $1, $1 # encoding: [0x21,0x08,0x20,0x00]
1326 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1327 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1329 usw $8, 32767
1330 # CHECK-BE: addiu $1, $zero, 32767 # encoding: [0x24,0x01,0x7f,0xff]
1331 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1332 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1333 # CHECK-LE: addiu $1, $zero, 32767 # encoding: [0xff,0x7f,0x01,0x24]
1334 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1335 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1337 usw_reg: # CHECK-LABEL: usw_reg:
1338 usw $8, 0($9)
1339 # CHECK-BE: swl $8, 0($9) # encoding: [0xa9,0x28,0x00,0x00]
1340 # CHECK-BE: swr $8, 3($9) # encoding: [0xb9,0x28,0x00,0x03]
1341 # CHECK-LE: swl $8, 3($9) # encoding: [0x03,0x00,0x28,0xa9]
1342 # CHECK-LE: swr $8, 0($9) # encoding: [0x00,0x00,0x28,0xb9]
1344 usw $8, 2($9)
1345 # CHECK-BE: swl $8, 2($9) # encoding: [0xa9,0x28,0x00,0x02]
1346 # CHECK-BE: swr $8, 5($9) # encoding: [0xb9,0x28,0x00,0x05]
1347 # CHECK-LE: swl $8, 5($9) # encoding: [0x05,0x00,0x28,0xa9]
1348 # CHECK-LE: swr $8, 2($9) # encoding: [0x02,0x00,0x28,0xb9]
1350 usw $8, 0x8000($9)
1351 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
1352 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
1353 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1354 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1355 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
1356 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
1357 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1358 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1360 usw $8, -0x8000($9)
1361 # CHECK-BE: swl $8, -32768($9) # encoding: [0xa9,0x28,0x80,0x00]
1362 # CHECK-BE: swr $8, -32765($9) # encoding: [0xb9,0x28,0x80,0x03]
1363 # CHECK-LE: swl $8, -32765($9) # encoding: [0x03,0x80,0x28,0xa9]
1364 # CHECK-LE: swr $8, -32768($9) # encoding: [0x00,0x80,0x28,0xb9]
1366 usw $8, 0x10000($9)
1367 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1368 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
1369 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1370 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1371 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1372 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
1373 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1374 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1376 usw $8, 0x18888($9)
1377 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1378 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
1379 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
1380 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1381 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1382 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1383 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
1384 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
1385 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1386 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1388 usw $8, -32769($9)
1389 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
1390 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
1391 # CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21]
1392 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1393 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1394 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
1395 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
1396 # CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
1397 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1398 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1400 usw $8, 32767($9)
1401 # CHECK-BE: addiu $1, $9, 32767 # encoding: [0x25,0x21,0x7f,0xff]
1402 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1403 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1404 # CHECK-LE: addiu $1, $9, 32767 # encoding: [0xff,0x7f,0x21,0x25]
1405 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1406 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1408 usw $8, 0($8)
1409 # CHECK-BE: swl $8, 0($8) # encoding: [0xa9,0x08,0x00,0x00]
1410 # CHECK-BE: swr $8, 3($8) # encoding: [0xb9,0x08,0x00,0x03]
1411 # CHECK-LE: swl $8, 3($8) # encoding: [0x03,0x00,0x08,0xa9]
1412 # CHECK-LE: swr $8, 0($8) # encoding: [0x00,0x00,0x08,0xb9]
1414 usw $8, 2($8)
1415 # CHECK-BE: swl $8, 2($8) # encoding: [0xa9,0x08,0x00,0x02]
1416 # CHECK-BE: swr $8, 5($8) # encoding: [0xb9,0x08,0x00,0x05]
1417 # CHECK-LE: swl $8, 5($8) # encoding: [0x05,0x00,0x08,0xa9]
1418 # CHECK-LE: swr $8, 2($8) # encoding: [0x02,0x00,0x08,0xb9]
1420 usw $8, 0x8000($8)
1421 # CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
1422 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
1423 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1424 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1425 # CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
1426 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
1427 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1428 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1430 usw $8, -0x8000($8)
1431 # CHECK-BE: swl $8, -32768($8) # encoding: [0xa9,0x08,0x80,0x00]
1432 # CHECK-BE: swr $8, -32765($8) # encoding: [0xb9,0x08,0x80,0x03]
1433 # CHECK-LE: swl $8, -32765($8) # encoding: [0x03,0x80,0x08,0xa9]
1434 # CHECK-LE: swr $8, -32768($8) # encoding: [0x00,0x80,0x08,0xb9]
1436 usw $8, 0x10000($8)
1437 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1438 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
1439 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1440 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1441 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1442 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
1443 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1444 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1446 usw $8, 0x18888($8)
1447 # CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
1448 # CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88]
1449 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
1450 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1451 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1452 # CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
1453 # CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34]
1454 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
1455 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1456 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1458 usw $8, -32769($8)
1459 # CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
1460 # CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff]
1461 # CHECK-BE: addu $1, $1, $8 # encoding: [0x00,0x28,0x08,0x21]
1462 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1463 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1464 # CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c]
1465 # CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34]
1466 # CHECK-LE: addu $1, $1, $8 # encoding: [0x21,0x08,0x28,0x00]
1467 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1468 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1470 usw $8, 32767($8)
1471 # CHECK-BE: addiu $1, $8, 32767 # encoding: [0x25,0x01,0x7f,0xff]
1472 # CHECK-BE: swl $8, 0($1) # encoding: [0xa8,0x28,0x00,0x00]
1473 # CHECK-BE: swr $8, 3($1) # encoding: [0xb8,0x28,0x00,0x03]
1474 # CHECK-LE: addiu $1, $8, 32767 # encoding: [0xff,0x7f,0x01,0x25]
1475 # CHECK-LE: swl $8, 3($1) # encoding: [0x03,0x00,0x28,0xa8]
1476 # CHECK-LE: swr $8, 0($1) # encoding: [0x00,0x00,0x28,0xb8]
1479 add $4, $4, $4