2 # RUN: llvm-mc -triple powerpc64-unknown-unknown --show-encoding %s | FileCheck -check-prefix=CHECK-BE %s
3 # RUN: llvm-mc -triple powerpc64le-unknown-unknown --show-encoding %s | FileCheck -check-prefix=CHECK-LE %s
9 # CHECK-BE: b target # encoding: [0b010010AA,A,A,0bAAAAAA00]
10 # CHECK-LE: b target # encoding: [0bAAAAAA00,A,A,0b010010AA]
11 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24
12 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24
14 # CHECK-BE: ba target # encoding: [0b010010AA,A,A,0bAAAAAA10]
15 # CHECK-LE: ba target # encoding: [0bAAAAAA10,A,A,0b010010AA]
16 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24abs
17 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24abs
19 # CHECK-BE: bl target # encoding: [0b010010AA,A,A,0bAAAAAA01]
20 # CHECK-LE: bl target # encoding: [0bAAAAAA01,A,A,0b010010AA]
21 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24
22 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24
24 # CHECK-BE: bla target # encoding: [0b010010AA,A,A,0bAAAAAA11]
25 # CHECK-LE: bla target # encoding: [0bAAAAAA11,A,A,0b010010AA]
26 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24abs
27 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24abs
30 # CHECK-BE: bf 10, target # encoding: [0x40,0x8a,A,0bAAAAAA00]
31 # CHECK-LE: bf 10, target # encoding: [0bAAAAAA00,A,0x8a,0x40]
32 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
33 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
35 # CHECK-BE: bfa 10, target # encoding: [0x40,0x8a,A,0bAAAAAA10]
36 # CHECK-LE: bfa 10, target # encoding: [0bAAAAAA10,A,0x8a,0x40]
37 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs
38 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs
40 # CHECK-BE: bfl 10, target # encoding: [0x40,0x8a,A,0bAAAAAA01]
41 # CHECK-LE: bfl 10, target # encoding: [0bAAAAAA01,A,0x8a,0x40]
42 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
43 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
45 # CHECK-BE: bfla 10, target # encoding: [0x40,0x8a,A,0bAAAAAA11]
46 # CHECK-LE: bfla 10, target # encoding: [0bAAAAAA11,A,0x8a,0x40]
47 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs
48 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs
51 # CHECK-BE: bc+ 12, 28, target # encoding: [0x41,0xfc,A,0bAAAAAA00]
52 # CHECK-LE: bc+ 12, 28, target # encoding: [0bAAAAAA00,A,0xfc,0x41]
53 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
54 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
56 # CHECK-BE: bc- 12, 28, target # encoding: [0x41,0xdc,A,0bAAAAAA00]
57 # CHECK-LE: bc- 12, 28, target # encoding: [0bAAAAAA00,A,0xdc,0x41]
58 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
59 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
61 # CHECK-BE: bca+ 12, 28, target # encoding: [0x41,0xfc,A,0bAAAAAA10]
62 # CHECK-LE: bca+ 12, 28, target # encoding: [0bAAAAAA10,A,0xfc,0x41]
63 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs
64 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs
66 # CHECK-BE: bca- 12, 28, target # encoding: [0x41,0xdc,A,0bAAAAAA10]
67 # CHECK-LE: bca- 12, 28, target # encoding: [0bAAAAAA10,A,0xdc,0x41]
68 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs
69 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs
71 # CHECK-BE: bcl+ 12, 28, target # encoding: [0x41,0xfc,A,0bAAAAAA01]
72 # CHECK-LE: bcl+ 12, 28, target # encoding: [0bAAAAAA01,A,0xfc,0x41]
73 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
74 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
76 # CHECK-BE: bcl- 12, 28, target # encoding: [0x41,0xdc,A,0bAAAAAA01]
77 # CHECK-LE: bcl- 12, 28, target # encoding: [0bAAAAAA01,A,0xdc,0x41]
78 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
79 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
81 # CHECK-BE: bcla+ 12, 28, target # encoding: [0x41,0xfc,A,0bAAAAAA11]
82 # CHECK-LE: bcla+ 12, 28, target # encoding: [0bAAAAAA11,A,0xfc,0x41]
83 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs
84 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs
86 # CHECK-BE: bcla- 12, 28, target # encoding: [0x41,0xdc,A,0bAAAAAA11]
87 # CHECK-LE: bcla- 12, 28, target # encoding: [0bAAAAAA11,A,0xdc,0x41]
88 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs
89 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs
92 # CHECK-BE: bclr 4, 10, 3 # encoding: [0x4c,0x8a,0x18,0x20]
93 # CHECK-LE: bclr 4, 10, 3 # encoding: [0x20,0x18,0x8a,0x4c]
95 # CHECK-BE: bclr 4, 10 # encoding: [0x4c,0x8a,0x00,0x20]
96 # CHECK-LE: bclr 4, 10 # encoding: [0x20,0x00,0x8a,0x4c]
98 # CHECK-BE: bclrl 4, 10, 3 # encoding: [0x4c,0x8a,0x18,0x21]
99 # CHECK-LE: bclrl 4, 10, 3 # encoding: [0x21,0x18,0x8a,0x4c]
101 # CHECK-BE: bclrl 4, 10 # encoding: [0x4c,0x8a,0x00,0x21]
102 # CHECK-LE: bclrl 4, 10 # encoding: [0x21,0x00,0x8a,0x4c]
104 # CHECK-BE: bcctr 4, 10, 3 # encoding: [0x4c,0x8a,0x1c,0x20]
105 # CHECK-LE: bcctr 4, 10, 3 # encoding: [0x20,0x1c,0x8a,0x4c]
107 # CHECK-BE: bcctr 4, 10 # encoding: [0x4c,0x8a,0x04,0x20]
108 # CHECK-LE: bcctr 4, 10 # encoding: [0x20,0x04,0x8a,0x4c]
110 # CHECK-BE: bcctrl 4, 10, 3 # encoding: [0x4c,0x8a,0x1c,0x21]
111 # CHECK-LE: bcctrl 4, 10, 3 # encoding: [0x21,0x1c,0x8a,0x4c]
113 # CHECK-BE: bcctrl 4, 10 # encoding: [0x4c,0x8a,0x04,0x21]
114 # CHECK-LE: bcctrl 4, 10 # encoding: [0x21,0x04,0x8a,0x4c]
117 # Condition register instructions
119 # CHECK-BE: crand 2, 3, 4 # encoding: [0x4c,0x43,0x22,0x02]
120 # CHECK-LE: crand 2, 3, 4 # encoding: [0x02,0x22,0x43,0x4c]
122 # CHECK-BE: crnand 2, 3, 4 # encoding: [0x4c,0x43,0x21,0xc2]
123 # CHECK-LE: crnand 2, 3, 4 # encoding: [0xc2,0x21,0x43,0x4c]
125 # CHECK-BE: cror 2, 3, 4 # encoding: [0x4c,0x43,0x23,0x82]
126 # CHECK-LE: cror 2, 3, 4 # encoding: [0x82,0x23,0x43,0x4c]
128 # CHECK-BE: crxor 2, 3, 4 # encoding: [0x4c,0x43,0x21,0x82]
129 # CHECK-LE: crxor 2, 3, 4 # encoding: [0x82,0x21,0x43,0x4c]
131 # CHECK-BE: crnor 2, 3, 4 # encoding: [0x4c,0x43,0x20,0x42]
132 # CHECK-LE: crnor 2, 3, 4 # encoding: [0x42,0x20,0x43,0x4c]
134 # CHECK-BE: creqv 2, 3, 4 # encoding: [0x4c,0x43,0x22,0x42]
135 # CHECK-LE: creqv 2, 3, 4 # encoding: [0x42,0x22,0x43,0x4c]
137 # CHECK-BE: crandc 2, 3, 4 # encoding: [0x4c,0x43,0x21,0x02]
138 # CHECK-LE: crandc 2, 3, 4 # encoding: [0x02,0x21,0x43,0x4c]
140 # CHECK-BE: crorc 2, 3, 4 # encoding: [0x4c,0x43,0x23,0x42]
141 # CHECK-LE: crorc 2, 3, 4 # encoding: [0x42,0x23,0x43,0x4c]
143 # CHECK-BE: mcrf 2, 3 # encoding: [0x4d,0x0c,0x00,0x00]
144 # CHECK-LE: mcrf 2, 3 # encoding: [0x00,0x00,0x0c,0x4d]
147 # System call instruction
149 # CHECK-BE: sc 1 # encoding: [0x44,0x00,0x00,0x22]
150 # CHECK-LE: sc 1 # encoding: [0x22,0x00,0x00,0x44]
152 # CHECK-BE: sc # encoding: [0x44,0x00,0x00,0x02]
153 # CHECK-LE: sc # encoding: [0x02,0x00,0x00,0x44]
156 # Branch history rolling buffer
158 # CHECK-BE: clrbhrb # encoding: [0x7c,0x00,0x03,0x5c]
159 # CHECK-LE: clrbhrb # encoding: [0x5c,0x03,0x00,0x7c]
161 # CHECK-BE: mfbhrbe 9, 983 # encoding: [0x7d,0x3e,0xba,0x5c]
162 # CHECK-LE: mfbhrbe 9, 983 # encoding: [0x5c,0xba,0x3e,0x7d]
164 # CHECK-BE: rfebb 1 # encoding: [0x4c,0x00,0x09,0x24]
165 # CHECK-LE: rfebb 1 # encoding: [0x24,0x09,0x00,0x4c]
168 # Fixed-point facility
170 # Fixed-point load instructions
172 # CHECK-BE: lbz 2, 128(4) # encoding: [0x88,0x44,0x00,0x80]
173 # CHECK-LE: lbz 2, 128(4) # encoding: [0x80,0x00,0x44,0x88]
175 # CHECK-BE: lbzx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0xae]
176 # CHECK-LE: lbzx 2, 3, 4 # encoding: [0xae,0x20,0x43,0x7c]
178 # CHECK-BE: lbzu 2, 128(4) # encoding: [0x8c,0x44,0x00,0x80]
179 # CHECK-LE: lbzu 2, 128(4) # encoding: [0x80,0x00,0x44,0x8c]
181 # CHECK-BE: lbzux 2, 3, 4 # encoding: [0x7c,0x43,0x20,0xee]
182 # CHECK-LE: lbzux 2, 3, 4 # encoding: [0xee,0x20,0x43,0x7c]
184 # CHECK-BE: lhz 2, 128(4) # encoding: [0xa0,0x44,0x00,0x80]
185 # CHECK-LE: lhz 2, 128(4) # encoding: [0x80,0x00,0x44,0xa0]
187 # CHECK-BE: lhzx 2, 3, 4 # encoding: [0x7c,0x43,0x22,0x2e]
188 # CHECK-LE: lhzx 2, 3, 4 # encoding: [0x2e,0x22,0x43,0x7c]
190 # CHECK-BE: lhzu 2, 128(4) # encoding: [0xa4,0x44,0x00,0x80]
191 # CHECK-LE: lhzu 2, 128(4) # encoding: [0x80,0x00,0x44,0xa4]
193 # CHECK-BE: lhzux 2, 3, 4 # encoding: [0x7c,0x43,0x22,0x6e]
194 # CHECK-LE: lhzux 2, 3, 4 # encoding: [0x6e,0x22,0x43,0x7c]
196 # CHECK-BE: lha 2, 128(4) # encoding: [0xa8,0x44,0x00,0x80]
197 # CHECK-LE: lha 2, 128(4) # encoding: [0x80,0x00,0x44,0xa8]
199 # CHECK-BE: lhax 2, 3, 4 # encoding: [0x7c,0x43,0x22,0xae]
200 # CHECK-LE: lhax 2, 3, 4 # encoding: [0xae,0x22,0x43,0x7c]
202 # CHECK-BE: lhau 2, 128(4) # encoding: [0xac,0x44,0x00,0x80]
203 # CHECK-LE: lhau 2, 128(4) # encoding: [0x80,0x00,0x44,0xac]
205 # CHECK-BE: lhaux 2, 3, 4 # encoding: [0x7c,0x43,0x22,0xee]
206 # CHECK-LE: lhaux 2, 3, 4 # encoding: [0xee,0x22,0x43,0x7c]
208 # CHECK-BE: lwz 2, 128(4) # encoding: [0x80,0x44,0x00,0x80]
209 # CHECK-LE: lwz 2, 128(4) # encoding: [0x80,0x00,0x44,0x80]
211 # CHECK-BE: lwzx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x2e]
212 # CHECK-LE: lwzx 2, 3, 4 # encoding: [0x2e,0x20,0x43,0x7c]
214 # CHECK-BE: lwzu 2, 128(4) # encoding: [0x84,0x44,0x00,0x80]
215 # CHECK-LE: lwzu 2, 128(4) # encoding: [0x80,0x00,0x44,0x84]
217 # CHECK-BE: lwzux 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x6e]
218 # CHECK-LE: lwzux 2, 3, 4 # encoding: [0x6e,0x20,0x43,0x7c]
220 # CHECK-BE: lwa 2, 128(4) # encoding: [0xe8,0x44,0x00,0x82]
221 # CHECK-LE: lwa 2, 128(4) # encoding: [0x82,0x00,0x44,0xe8]
223 # CHECK-BE: lwax 2, 3, 4 # encoding: [0x7c,0x43,0x22,0xaa]
224 # CHECK-LE: lwax 2, 3, 4 # encoding: [0xaa,0x22,0x43,0x7c]
226 # CHECK-BE: lwaux 2, 3, 4 # encoding: [0x7c,0x43,0x22,0xea]
227 # CHECK-LE: lwaux 2, 3, 4 # encoding: [0xea,0x22,0x43,0x7c]
229 # CHECK-BE: ld 2, 128(4) # encoding: [0xe8,0x44,0x00,0x80]
230 # CHECK-LE: ld 2, 128(4) # encoding: [0x80,0x00,0x44,0xe8]
232 # CHECK-BE: ldx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x2a]
233 # CHECK-LE: ldx 2, 3, 4 # encoding: [0x2a,0x20,0x43,0x7c]
235 # CHECK-BE: ldu 2, 128(4) # encoding: [0xe8,0x44,0x00,0x81]
236 # CHECK-LE: ldu 2, 128(4) # encoding: [0x81,0x00,0x44,0xe8]
238 # CHECK-BE: ldux 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x6a]
239 # CHECK-LE: ldux 2, 3, 4 # encoding: [0x6a,0x20,0x43,0x7c]
241 # CHECK-BE: ldmx 2, 3, 4 # encoding: [0x7c,0x43,0x22,0x6a]
242 # CHECK-LE: ldmx 2, 3, 4 # encoding: [0x6a,0x22,0x43,0x7c]
245 # Fixed-point store instructions
247 # CHECK-BE: stb 2, 128(4) # encoding: [0x98,0x44,0x00,0x80]
248 # CHECK-LE: stb 2, 128(4) # encoding: [0x80,0x00,0x44,0x98]
250 # CHECK-BE: stbx 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xae]
251 # CHECK-LE: stbx 2, 3, 4 # encoding: [0xae,0x21,0x43,0x7c]
253 # CHECK-BE: stbu 2, 128(4) # encoding: [0x9c,0x44,0x00,0x80]
254 # CHECK-LE: stbu 2, 128(4) # encoding: [0x80,0x00,0x44,0x9c]
256 # CHECK-BE: stbux 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xee]
257 # CHECK-LE: stbux 2, 3, 4 # encoding: [0xee,0x21,0x43,0x7c]
259 # CHECK-BE: sth 2, 128(4) # encoding: [0xb0,0x44,0x00,0x80]
260 # CHECK-LE: sth 2, 128(4) # encoding: [0x80,0x00,0x44,0xb0]
262 # CHECK-BE: sthx 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x2e]
263 # CHECK-LE: sthx 2, 3, 4 # encoding: [0x2e,0x23,0x43,0x7c]
265 # CHECK-BE: sthu 2, 128(4) # encoding: [0xb4,0x44,0x00,0x80]
266 # CHECK-LE: sthu 2, 128(4) # encoding: [0x80,0x00,0x44,0xb4]
268 # CHECK-BE: sthux 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x6e]
269 # CHECK-LE: sthux 2, 3, 4 # encoding: [0x6e,0x23,0x43,0x7c]
271 # CHECK-BE: stw 2, 128(4) # encoding: [0x90,0x44,0x00,0x80]
272 # CHECK-LE: stw 2, 128(4) # encoding: [0x80,0x00,0x44,0x90]
274 # CHECK-BE: stwx 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x2e]
275 # CHECK-LE: stwx 2, 3, 4 # encoding: [0x2e,0x21,0x43,0x7c]
277 # CHECK-BE: stwu 2, 128(4) # encoding: [0x94,0x44,0x00,0x80]
278 # CHECK-LE: stwu 2, 128(4) # encoding: [0x80,0x00,0x44,0x94]
280 # CHECK-BE: stwux 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x6e]
281 # CHECK-LE: stwux 2, 3, 4 # encoding: [0x6e,0x21,0x43,0x7c]
283 # CHECK-BE: std 2, 128(4) # encoding: [0xf8,0x44,0x00,0x80]
284 # CHECK-LE: std 2, 128(4) # encoding: [0x80,0x00,0x44,0xf8]
286 # CHECK-BE: stdx 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x2a]
287 # CHECK-LE: stdx 2, 3, 4 # encoding: [0x2a,0x21,0x43,0x7c]
289 # CHECK-BE: stdu 2, 128(4) # encoding: [0xf8,0x44,0x00,0x81]
290 # CHECK-LE: stdu 2, 128(4) # encoding: [0x81,0x00,0x44,0xf8]
292 # CHECK-BE: stdux 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x6a]
293 # CHECK-LE: stdux 2, 3, 4 # encoding: [0x6a,0x21,0x43,0x7c]
296 # Fixed-point load and store with byte reversal instructions
298 # CHECK-BE: lhbrx 2, 3, 4 # encoding: [0x7c,0x43,0x26,0x2c]
299 # CHECK-LE: lhbrx 2, 3, 4 # encoding: [0x2c,0x26,0x43,0x7c]
301 # CHECK-BE: sthbrx 2, 3, 4 # encoding: [0x7c,0x43,0x27,0x2c]
302 # CHECK-LE: sthbrx 2, 3, 4 # encoding: [0x2c,0x27,0x43,0x7c]
304 # CHECK-BE: lwbrx 2, 3, 4 # encoding: [0x7c,0x43,0x24,0x2c]
305 # CHECK-LE: lwbrx 2, 3, 4 # encoding: [0x2c,0x24,0x43,0x7c]
307 # CHECK-BE: stwbrx 2, 3, 4 # encoding: [0x7c,0x43,0x25,0x2c]
308 # CHECK-LE: stwbrx 2, 3, 4 # encoding: [0x2c,0x25,0x43,0x7c]
310 # CHECK-BE: ldbrx 2, 3, 4 # encoding: [0x7c,0x43,0x24,0x28]
311 # CHECK-LE: ldbrx 2, 3, 4 # encoding: [0x28,0x24,0x43,0x7c]
313 # CHECK-BE: stdbrx 2, 3, 4 # encoding: [0x7c,0x43,0x25,0x28]
314 # CHECK-LE: stdbrx 2, 3, 4 # encoding: [0x28,0x25,0x43,0x7c]
317 # Fixed-point load and store multiple instructions
319 # CHECK-BE: lmw 2, 128(1) # encoding: [0xb8,0x41,0x00,0x80]
320 # CHECK-LE: lmw 2, 128(1) # encoding: [0x80,0x00,0x41,0xb8]
322 # CHECK-BE: stmw 2, 128(1) # encoding: [0xbc,0x41,0x00,0x80]
323 # CHECK-LE: stmw 2, 128(1) # encoding: [0x80,0x00,0x41,0xbc]
326 # FIXME: Fixed-point move assist instructions
328 # Fixed-point arithmetic instructions
330 # CHECK-BE: addi 2, 3, 128 # encoding: [0x38,0x43,0x00,0x80]
331 # CHECK-LE: addi 2, 3, 128 # encoding: [0x80,0x00,0x43,0x38]
333 # CHECK-BE: addis 2, 3, 128 # encoding: [0x3c,0x43,0x00,0x80]
334 # CHECK-LE: addis 2, 3, 128 # encoding: [0x80,0x00,0x43,0x3c]
336 # CHECK-BE: add 2, 3, 4 # encoding: [0x7c,0x43,0x22,0x14]
337 # CHECK-LE: add 2, 3, 4 # encoding: [0x14,0x22,0x43,0x7c]
339 # CHECK-BE: add. 2, 3, 4 # encoding: [0x7c,0x43,0x22,0x15]
340 # CHECK-LE: add. 2, 3, 4 # encoding: [0x15,0x22,0x43,0x7c]
342 # FIXME: addo 2, 3, 4
343 # FIXME: addo. 2, 3, 4
344 # CHECK-BE: subf 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x50]
345 # CHECK-LE: subf 2, 3, 4 # encoding: [0x50,0x20,0x43,0x7c]
347 # CHECK-BE: subf. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x51]
348 # CHECK-LE: subf. 2, 3, 4 # encoding: [0x51,0x20,0x43,0x7c]
350 # FIXME: subfo 2, 3, 4
351 # FIXME: subfo. 2, 3, 4
352 # CHECK-BE: addic 2, 3, 128 # encoding: [0x30,0x43,0x00,0x80]
353 # CHECK-LE: addic 2, 3, 128 # encoding: [0x80,0x00,0x43,0x30]
355 # CHECK-BE: addic. 2, 3, 128 # encoding: [0x34,0x43,0x00,0x80]
356 # CHECK-LE: addic. 2, 3, 128 # encoding: [0x80,0x00,0x43,0x34]
358 # CHECK-BE: subfic 2, 3, 4 # encoding: [0x20,0x43,0x00,0x04]
359 # CHECK-LE: subfic 2, 3, 4 # encoding: [0x04,0x00,0x43,0x20]
362 # CHECK-BE: addc 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x14]
363 # CHECK-LE: addc 2, 3, 4 # encoding: [0x14,0x20,0x43,0x7c]
365 # CHECK-BE: addc. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x15]
366 # CHECK-LE: addc. 2, 3, 4 # encoding: [0x15,0x20,0x43,0x7c]
368 # FIXME: addco 2, 3, 4
369 # FIXME: addco. 2, 3, 4
370 # CHECK-BE: subfc 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x10]
371 # CHECK-LE: subfc 2, 3, 4 # encoding: [0x10,0x20,0x43,0x7c]
373 # CHECK-BE: subfc 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x10]
374 # CHECK-LE: subfc 2, 3, 4 # encoding: [0x10,0x20,0x43,0x7c]
376 # FIXME: subfco 2, 3, 4
377 # FIXME: subfco. 2, 3, 4
379 # CHECK-BE: adde 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x14]
380 # CHECK-LE: adde 2, 3, 4 # encoding: [0x14,0x21,0x43,0x7c]
382 # CHECK-BE: adde. 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x15]
383 # CHECK-LE: adde. 2, 3, 4 # encoding: [0x15,0x21,0x43,0x7c]
385 # FIXME: addeo 2, 3, 4
386 # FIXME: addeo. 2, 3, 4
387 # CHECK-BE: subfe 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x10]
388 # CHECK-LE: subfe 2, 3, 4 # encoding: [0x10,0x21,0x43,0x7c]
390 # CHECK-BE: subfe. 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x11]
391 # CHECK-LE: subfe. 2, 3, 4 # encoding: [0x11,0x21,0x43,0x7c]
393 # FIXME: subfeo 2, 3, 4
394 # FIXME: subfeo. 2, 3, 4
396 # CHECK-BE: addme 2, 3 # encoding: [0x7c,0x43,0x01,0xd4]
397 # CHECK-LE: addme 2, 3 # encoding: [0xd4,0x01,0x43,0x7c]
399 # CHECK-BE: addme. 2, 3 # encoding: [0x7c,0x43,0x01,0xd5]
400 # CHECK-LE: addme. 2, 3 # encoding: [0xd5,0x01,0x43,0x7c]
403 # FIXME: addmeo. 2, 3
404 # CHECK-BE: subfme 2, 3 # encoding: [0x7c,0x43,0x01,0xd0]
405 # CHECK-LE: subfme 2, 3 # encoding: [0xd0,0x01,0x43,0x7c]
407 # CHECK-BE: subfme. 2, 3 # encoding: [0x7c,0x43,0x01,0xd1]
408 # CHECK-LE: subfme. 2, 3 # encoding: [0xd1,0x01,0x43,0x7c]
410 # FIXME: subfmeo 2, 3
411 # FIXME: subfmeo. 2, 3
413 # CHECK-BE: addze 2, 3 # encoding: [0x7c,0x43,0x01,0x94]
414 # CHECK-LE: addze 2, 3 # encoding: [0x94,0x01,0x43,0x7c]
416 # CHECK-BE: addze. 2, 3 # encoding: [0x7c,0x43,0x01,0x95]
417 # CHECK-LE: addze. 2, 3 # encoding: [0x95,0x01,0x43,0x7c]
420 # FIXME: addzeo. 2, 3
421 # CHECK-BE: subfze 2, 3 # encoding: [0x7c,0x43,0x01,0x90]
422 # CHECK-LE: subfze 2, 3 # encoding: [0x90,0x01,0x43,0x7c]
424 # CHECK-BE: subfze. 2, 3 # encoding: [0x7c,0x43,0x01,0x91]
425 # CHECK-LE: subfze. 2, 3 # encoding: [0x91,0x01,0x43,0x7c]
427 # FIXME: subfzeo 2, 3
428 # FIXME: subfzeo. 2, 3
430 # CHECK-BE: neg 2, 3 # encoding: [0x7c,0x43,0x00,0xd0]
431 # CHECK-LE: neg 2, 3 # encoding: [0xd0,0x00,0x43,0x7c]
433 # CHECK-BE: neg. 2, 3 # encoding: [0x7c,0x43,0x00,0xd1]
434 # CHECK-LE: neg. 2, 3 # encoding: [0xd1,0x00,0x43,0x7c]
439 # CHECK-BE: mulli 2, 3, 128 # encoding: [0x1c,0x43,0x00,0x80]
440 # CHECK-LE: mulli 2, 3, 128 # encoding: [0x80,0x00,0x43,0x1c]
442 # CHECK-BE: mulhw 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x96]
443 # CHECK-LE: mulhw 2, 3, 4 # encoding: [0x96,0x20,0x43,0x7c]
445 # CHECK-BE: mulhw. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x97]
446 # CHECK-LE: mulhw. 2, 3, 4 # encoding: [0x97,0x20,0x43,0x7c]
448 # CHECK-BE: mullw 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xd6]
449 # CHECK-LE: mullw 2, 3, 4 # encoding: [0xd6,0x21,0x43,0x7c]
451 # CHECK-BE: mullw. 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xd7]
452 # CHECK-LE: mullw. 2, 3, 4 # encoding: [0xd7,0x21,0x43,0x7c]
454 # FIXME: mullwo 2, 3, 4
455 # FIXME: mullwo. 2, 3, 4
456 # CHECK-BE: mulhwu 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x16]
457 # CHECK-LE: mulhwu 2, 3, 4 # encoding: [0x16,0x20,0x43,0x7c]
459 # CHECK-BE: mulhwu. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x17]
460 # CHECK-LE: mulhwu. 2, 3, 4 # encoding: [0x17,0x20,0x43,0x7c]
463 # CHECK-BE: maddhd 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x70]
464 # CHECK-LE: maddhd 2, 3, 4, 5 # encoding: [0x70,0x21,0x43,0x10]
467 # CHECK-BE: maddhdu 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x71]
468 # CHECK-LE: maddhdu 2, 3, 4, 5 # encoding: [0x71,0x21,0x43,0x10]
471 # CHECK-BE: maddld 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x73]
472 # CHECK-LE: maddld 2, 3, 4, 5 # encoding: [0x73,0x21,0x43,0x10]
475 # CHECK-BE: setb 2, 3 # encoding: [0x7c,0x4c,0x01,0x00]
476 # CHECK-LE: setb 2, 3 # encoding: [0x00,0x01,0x4c,0x7c]
479 # CHECK-BE: darn 2, 3 # encoding: [0x7c,0x43,0x05,0xe6]
480 # CHECK-LE: darn 2, 3 # encoding: [0xe6,0x05,0x43,0x7c]
483 # CHECK-BE: addpcis 3, 22627 # encoding: [0x4c,0x71,0x58,0x45]
484 # CHECK-LE: addpcis 3, 22627 # encoding: [0x45,0x58,0x71,0x4c]
487 # CHECK-BE: addpcis 3, 22627 # encoding: [0x4c,0x71,0x58,0x45]
488 # CHECK-LE: addpcis 3, 22627 # encoding: [0x45,0x58,0x71,0x4c]
491 # CHECK-BE: lnia 3 # encoding: [0x4c,0x60,0x00,0x04]
492 # CHECK-LE: lnia 3 # encoding: [0x04,0x00,0x60,0x4c]
495 # CHECK-BE: divw 2, 3, 4 # encoding: [0x7c,0x43,0x23,0xd6]
496 # CHECK-LE: divw 2, 3, 4 # encoding: [0xd6,0x23,0x43,0x7c]
498 # CHECK-BE: divw. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0xd7]
499 # CHECK-LE: divw. 2, 3, 4 # encoding: [0xd7,0x23,0x43,0x7c]
501 # FIXME: divwo 2, 3, 4
502 # FIXME: divwo. 2, 3, 4
503 # CHECK-BE: divwu 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x96]
504 # CHECK-LE: divwu 2, 3, 4 # encoding: [0x96,0x23,0x43,0x7c]
506 # CHECK-BE: divwu. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x97]
507 # CHECK-LE: divwu. 2, 3, 4 # encoding: [0x97,0x23,0x43,0x7c]
509 # FIXME: divwuo 2, 3, 4
510 # FIXME: divwuo. 2, 3, 4
511 # CHECK-BE: divwe 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x56]
512 # CHECK-LE: divwe 2, 3, 4 # encoding: [0x56,0x23,0x43,0x7c]
514 # CHECK-BE: divwe. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x57]
515 # CHECK-LE: divwe. 2, 3, 4 # encoding: [0x57,0x23,0x43,0x7c]
517 # FIXME: divweo 2, 3, 4
518 # FIXME: divweo. 2, 3, 4
519 # CHECK-BE: divweu 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x16]
520 # CHECK-LE: divweu 2, 3, 4 # encoding: [0x16,0x23,0x43,0x7c]
522 # CHECK-BE: divweu. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x17]
523 # CHECK-LE: divweu. 2, 3, 4 # encoding: [0x17,0x23,0x43,0x7c]
525 # FIXME: divweuo 2, 3, 4
526 # FIXME: divweuo. 2, 3, 4
528 # CHECK-BE: modsw 2, 3, 4 # encoding: [0x7c,0x43,0x26,0x16]
529 # CHECK-LE: modsw 2, 3, 4 # encoding: [0x16,0x26,0x43,0x7c]
531 # CHECK-BE: moduw 2, 3, 4 # encoding: [0x7c,0x43,0x22,0x16]
532 # CHECK-LE: moduw 2, 3, 4 # encoding: [0x16,0x22,0x43,0x7c]
534 # CHECK-BE: modsd 2, 3, 4 # encoding: [0x7c,0x43,0x26,0x12]
535 # CHECK-LE: modsd 2, 3, 4 # encoding: [0x12,0x26,0x43,0x7c]
537 # CHECK-BE: modud 2, 3, 4 # encoding: [0x7c,0x43,0x22,0x12]
538 # CHECK-LE: modud 2, 3, 4 # encoding: [0x12,0x22,0x43,0x7c]
541 # CHECK-BE: mulld 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xd2]
542 # CHECK-LE: mulld 2, 3, 4 # encoding: [0xd2,0x21,0x43,0x7c]
544 # CHECK-BE: mulld. 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xd3]
545 # CHECK-LE: mulld. 2, 3, 4 # encoding: [0xd3,0x21,0x43,0x7c]
547 # FIXME: mulldo 2, 3, 4
548 # FIXME: mulldo. 2, 3, 4
549 # CHECK-BE: mulhd 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x92]
550 # CHECK-LE: mulhd 2, 3, 4 # encoding: [0x92,0x20,0x43,0x7c]
552 # CHECK-BE: mulhd. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x93]
553 # CHECK-LE: mulhd. 2, 3, 4 # encoding: [0x93,0x20,0x43,0x7c]
555 # CHECK-BE: mulhdu 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x12]
556 # CHECK-LE: mulhdu 2, 3, 4 # encoding: [0x12,0x20,0x43,0x7c]
558 # CHECK-BE: mulhdu. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x13]
559 # CHECK-LE: mulhdu. 2, 3, 4 # encoding: [0x13,0x20,0x43,0x7c]
562 # CHECK-BE: divd 2, 3, 4 # encoding: [0x7c,0x43,0x23,0xd2]
563 # CHECK-LE: divd 2, 3, 4 # encoding: [0xd2,0x23,0x43,0x7c]
565 # CHECK-BE: divd. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0xd3]
566 # CHECK-LE: divd. 2, 3, 4 # encoding: [0xd3,0x23,0x43,0x7c]
568 # FIXME: divdo 2, 3, 4
569 # FIXME: divdo. 2, 3, 4
570 # CHECK-BE: divdu 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x92]
571 # CHECK-LE: divdu 2, 3, 4 # encoding: [0x92,0x23,0x43,0x7c]
573 # CHECK-BE: divdu. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x93]
574 # CHECK-LE: divdu. 2, 3, 4 # encoding: [0x93,0x23,0x43,0x7c]
576 # FIXME: divduo 2, 3, 4
577 # FIXME: divduo. 2, 3, 4
578 # CHECK-BE: divde 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x52]
579 # CHECK-LE: divde 2, 3, 4 # encoding: [0x52,0x23,0x43,0x7c]
581 # CHECK-BE: divde. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x53]
582 # CHECK-LE: divde. 2, 3, 4 # encoding: [0x53,0x23,0x43,0x7c]
584 # FIXME: divdeo 2, 3, 4
585 # FIXME: divdeo. 2, 3, 4
586 # CHECK-BE: divdeu 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x12]
587 # CHECK-LE: divdeu 2, 3, 4 # encoding: [0x12,0x23,0x43,0x7c]
589 # CHECK-BE: divdeu. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x13]
590 # CHECK-LE: divdeu. 2, 3, 4 # encoding: [0x13,0x23,0x43,0x7c]
592 # FIXME: divdeuo 2, 3, 4
593 # FIXME: divdeuo. 2, 3, 4
595 # Fixed-point compare instructions
597 # CHECK-BE: cmpdi 2, 3, 128 # encoding: [0x2d,0x23,0x00,0x80]
598 # CHECK-LE: cmpdi 2, 3, 128 # encoding: [0x80,0x00,0x23,0x2d]
600 # CHECK-BE: cmpd 2, 3, 4 # encoding: [0x7d,0x23,0x20,0x00]
601 # CHECK-LE: cmpd 2, 3, 4 # encoding: [0x00,0x20,0x23,0x7d]
603 # CHECK-BE: cmpldi 2, 3, 128 # encoding: [0x29,0x23,0x00,0x80]
604 # CHECK-LE: cmpldi 2, 3, 128 # encoding: [0x80,0x00,0x23,0x29]
606 # CHECK-BE: cmpld 2, 3, 4 # encoding: [0x7d,0x23,0x20,0x40]
607 # CHECK-LE: cmpld 2, 3, 4 # encoding: [0x40,0x20,0x23,0x7d]
610 # CHECK-BE: cmpwi 2, 3, 128 # encoding: [0x2d,0x03,0x00,0x80]
611 # CHECK-LE: cmpwi 2, 3, 128 # encoding: [0x80,0x00,0x03,0x2d]
613 # CHECK-BE: cmpw 2, 3, 4 # encoding: [0x7d,0x03,0x20,0x00]
614 # CHECK-LE: cmpw 2, 3, 4 # encoding: [0x00,0x20,0x03,0x7d]
616 # CHECK-BE: cmplwi 2, 3, 128 # encoding: [0x29,0x03,0x00,0x80]
617 # CHECK-LE: cmplwi 2, 3, 128 # encoding: [0x80,0x00,0x03,0x29]
619 # CHECK-BE: cmplw 2, 3, 4 # encoding: [0x7d,0x03,0x20,0x40]
620 # CHECK-LE: cmplw 2, 3, 4 # encoding: [0x40,0x20,0x03,0x7d]
622 # CHECK-BE: cmprb 3, 1, 7, 17 # encoding: [0x7d,0xa7,0x89,0x80]
623 # CHECK-LE: cmprb 3, 1, 7, 17 # encoding: [0x80,0x89,0xa7,0x7d]
625 # CHECK-BE: cmpeqb 3, 7, 17 # encoding: [0x7d,0x87,0x89,0xc0]
626 # CHECK-LE: cmpeqb 3, 7, 17 # encoding: [0xc0,0x89,0x87,0x7d]
628 # CHECK-BE: cnttzw 7, 17 # encoding: [0x7e,0x27,0x04,0x34]
629 # CHECK-LE: cnttzw 7, 17 # encoding: [0x34,0x04,0x27,0x7e]
631 # CHECK-BE: cnttzw. 7, 17 # encoding: [0x7e,0x27,0x04,0x35]
632 # CHECK-LE: cnttzw. 7, 17 # encoding: [0x35,0x04,0x27,0x7e]
634 # CHECK-BE: cnttzd 7, 17 # encoding: [0x7e,0x27,0x04,0x74]
635 # CHECK-LE: cnttzd 7, 17 # encoding: [0x74,0x04,0x27,0x7e]
637 # CHECK-BE: cnttzd. 7, 17 # encoding: [0x7e,0x27,0x04,0x75]
638 # CHECK-LE: cnttzd. 7, 17 # encoding: [0x75,0x04,0x27,0x7e]
641 # Fixed-point trap instructions
643 # CHECK-BE: twllti 3, 4 # encoding: [0x0c,0x43,0x00,0x04]
644 # CHECK-LE: twllti 3, 4 # encoding: [0x04,0x00,0x43,0x0c]
646 # CHECK-BE: twllt 3, 4 # encoding: [0x7c,0x43,0x20,0x08]
647 # CHECK-LE: twllt 3, 4 # encoding: [0x08,0x20,0x43,0x7c]
649 # CHECK-BE: tdllti 3, 4 # encoding: [0x08,0x43,0x00,0x04]
650 # CHECK-LE: tdllti 3, 4 # encoding: [0x04,0x00,0x43,0x08]
652 # CHECK-BE: tdllt 3, 4 # encoding: [0x7c,0x43,0x20,0x88]
653 # CHECK-LE: tdllt 3, 4 # encoding: [0x88,0x20,0x43,0x7c]
658 # CHECK-BE: isel 2, 3, 4, 5 # encoding: [0x7c,0x43,0x21,0x5e]
659 # CHECK-LE: isel 2, 3, 4, 5 # encoding: [0x5e,0x21,0x43,0x7c]
662 # Fixed-point logical instructions
664 # CHECK-BE: andi. 2, 3, 128 # encoding: [0x70,0x62,0x00,0x80]
665 # CHECK-LE: andi. 2, 3, 128 # encoding: [0x80,0x00,0x62,0x70]
667 # CHECK-BE: andis. 2, 3, 128 # encoding: [0x74,0x62,0x00,0x80]
668 # CHECK-LE: andis. 2, 3, 128 # encoding: [0x80,0x00,0x62,0x74]
670 # CHECK-BE: ori 2, 3, 128 # encoding: [0x60,0x62,0x00,0x80]
671 # CHECK-LE: ori 2, 3, 128 # encoding: [0x80,0x00,0x62,0x60]
673 # CHECK-BE: oris 2, 3, 128 # encoding: [0x64,0x62,0x00,0x80]
674 # CHECK-LE: oris 2, 3, 128 # encoding: [0x80,0x00,0x62,0x64]
676 # CHECK-BE: xori 2, 3, 128 # encoding: [0x68,0x62,0x00,0x80]
677 # CHECK-LE: xori 2, 3, 128 # encoding: [0x80,0x00,0x62,0x68]
679 # CHECK-BE: xoris 2, 3, 128 # encoding: [0x6c,0x62,0x00,0x80]
680 # CHECK-LE: xoris 2, 3, 128 # encoding: [0x80,0x00,0x62,0x6c]
682 # CHECK-BE: and 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x38]
683 # CHECK-LE: and 2, 3, 4 # encoding: [0x38,0x20,0x62,0x7c]
685 # CHECK-BE: and. 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x39]
686 # CHECK-LE: and. 2, 3, 4 # encoding: [0x39,0x20,0x62,0x7c]
688 # CHECK-BE: xor 2, 3, 4 # encoding: [0x7c,0x62,0x22,0x78]
689 # CHECK-LE: xor 2, 3, 4 # encoding: [0x78,0x22,0x62,0x7c]
691 # CHECK-BE: xor. 2, 3, 4 # encoding: [0x7c,0x62,0x22,0x79]
692 # CHECK-LE: xor. 2, 3, 4 # encoding: [0x79,0x22,0x62,0x7c]
694 # CHECK-BE: nand 2, 3, 4 # encoding: [0x7c,0x62,0x23,0xb8]
695 # CHECK-LE: nand 2, 3, 4 # encoding: [0xb8,0x23,0x62,0x7c]
697 # CHECK-BE: nand. 2, 3, 4 # encoding: [0x7c,0x62,0x23,0xb9]
698 # CHECK-LE: nand. 2, 3, 4 # encoding: [0xb9,0x23,0x62,0x7c]
700 # CHECK-BE: or 2, 3, 4 # encoding: [0x7c,0x62,0x23,0x78]
701 # CHECK-LE: or 2, 3, 4 # encoding: [0x78,0x23,0x62,0x7c]
703 # CHECK-BE: or. 2, 3, 4 # encoding: [0x7c,0x62,0x23,0x79]
704 # CHECK-LE: or. 2, 3, 4 # encoding: [0x79,0x23,0x62,0x7c]
706 # CHECK-BE: nor 2, 3, 4 # encoding: [0x7c,0x62,0x20,0xf8]
707 # CHECK-LE: nor 2, 3, 4 # encoding: [0xf8,0x20,0x62,0x7c]
709 # CHECK-BE: nor. 2, 3, 4 # encoding: [0x7c,0x62,0x20,0xf9]
710 # CHECK-LE: nor. 2, 3, 4 # encoding: [0xf9,0x20,0x62,0x7c]
712 # CHECK-BE: eqv 2, 3, 4 # encoding: [0x7c,0x62,0x22,0x38]
713 # CHECK-LE: eqv 2, 3, 4 # encoding: [0x38,0x22,0x62,0x7c]
715 # CHECK-BE: eqv. 2, 3, 4 # encoding: [0x7c,0x62,0x22,0x39]
716 # CHECK-LE: eqv. 2, 3, 4 # encoding: [0x39,0x22,0x62,0x7c]
718 # CHECK-BE: andc 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x78]
719 # CHECK-LE: andc 2, 3, 4 # encoding: [0x78,0x20,0x62,0x7c]
721 # CHECK-BE: andc. 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x79]
722 # CHECK-LE: andc. 2, 3, 4 # encoding: [0x79,0x20,0x62,0x7c]
724 # CHECK-BE: orc 2, 3, 4 # encoding: [0x7c,0x62,0x23,0x38]
725 # CHECK-LE: orc 2, 3, 4 # encoding: [0x38,0x23,0x62,0x7c]
727 # CHECK-BE: orc. 2, 3, 4 # encoding: [0x7c,0x62,0x23,0x39]
728 # CHECK-LE: orc. 2, 3, 4 # encoding: [0x39,0x23,0x62,0x7c]
731 # CHECK-BE: extsb 2, 3 # encoding: [0x7c,0x62,0x07,0x74]
732 # CHECK-LE: extsb 2, 3 # encoding: [0x74,0x07,0x62,0x7c]
734 # CHECK-BE: extsb. 2, 3 # encoding: [0x7c,0x62,0x07,0x75]
735 # CHECK-LE: extsb. 2, 3 # encoding: [0x75,0x07,0x62,0x7c]
737 # CHECK-BE: extsh 2, 3 # encoding: [0x7c,0x62,0x07,0x34]
738 # CHECK-LE: extsh 2, 3 # encoding: [0x34,0x07,0x62,0x7c]
740 # CHECK-BE: extsh. 2, 3 # encoding: [0x7c,0x62,0x07,0x35]
741 # CHECK-LE: extsh. 2, 3 # encoding: [0x35,0x07,0x62,0x7c]
744 # CHECK-BE: cntlzw 2, 3 # encoding: [0x7c,0x62,0x00,0x34]
745 # CHECK-LE: cntlzw 2, 3 # encoding: [0x34,0x00,0x62,0x7c]
747 # CHECK-BE: cntlzw. 2, 3 # encoding: [0x7c,0x62,0x00,0x35]
748 # CHECK-LE: cntlzw. 2, 3 # encoding: [0x35,0x00,0x62,0x7c]
751 # The POWER variant of cntlzw
752 # CHECK-BE: cntlzw 2, 3 # encoding: [0x7c,0x62,0x00,0x34]
753 # CHECK-LE: cntlzw 2, 3 # encoding: [0x34,0x00,0x62,0x7c]
755 # CHECK-BE: cntlzw. 2, 3 # encoding: [0x7c,0x62,0x00,0x35]
756 # CHECK-LE: cntlzw. 2, 3 # encoding: [0x35,0x00,0x62,0x7c]
759 # CHECK-BE: cmpb 7, 21, 4 # encoding: [0x7e,0xa7,0x23,0xf8]
760 # CHECK-LE: cmpb 7, 21, 4 # encoding: [0xf8,0x23,0xa7,0x7e]
761 # CHECK-BE: popcntb 2, 3 # encoding: [0x7c,0x62,0x00,0xf4]
762 # CHECK-LE: popcntb 2, 3 # encoding: [0xf4,0x00,0x62,0x7c]
764 # CHECK-BE: popcntw 2, 3 # encoding: [0x7c,0x62,0x02,0xf4]
765 # CHECK-LE: popcntw 2, 3 # encoding: [0xf4,0x02,0x62,0x7c]
770 # CHECK-BE: extsw 2, 3 # encoding: [0x7c,0x62,0x07,0xb4]
771 # CHECK-LE: extsw 2, 3 # encoding: [0xb4,0x07,0x62,0x7c]
773 # CHECK-BE: extsw. 2, 3 # encoding: [0x7c,0x62,0x07,0xb5]
774 # CHECK-LE: extsw. 2, 3 # encoding: [0xb5,0x07,0x62,0x7c]
777 # CHECK-BE: cntlzd 2, 3 # encoding: [0x7c,0x62,0x00,0x74]
778 # CHECK-LE: cntlzd 2, 3 # encoding: [0x74,0x00,0x62,0x7c]
780 # CHECK-BE: cntlzd. 2, 3 # encoding: [0x7c,0x62,0x00,0x75]
781 # CHECK-LE: cntlzd. 2, 3 # encoding: [0x75,0x00,0x62,0x7c]
783 # CHECK-BE: popcntd 2, 3 # encoding: [0x7c,0x62,0x03,0xf4]
784 # CHECK-LE: popcntd 2, 3 # encoding: [0xf4,0x03,0x62,0x7c]
786 # CHECK-BE: bpermd 2, 3, 4 # encoding: [0x7c,0x62,0x21,0xf8]
787 # CHECK-LE: bpermd 2, 3, 4 # encoding: [0xf8,0x21,0x62,0x7c]
790 # Fixed-point rotate and shift instructions
792 # CHECK-BE: rlwinm 2, 3, 4, 5, 6 # encoding: [0x54,0x62,0x21,0x4c]
793 # CHECK-LE: rlwinm 2, 3, 4, 5, 6 # encoding: [0x4c,0x21,0x62,0x54]
795 # CHECK-BE: rlwinm. 2, 3, 4, 5, 6 # encoding: [0x54,0x62,0x21,0x4d]
796 # CHECK-LE: rlwinm. 2, 3, 4, 5, 6 # encoding: [0x4d,0x21,0x62,0x54]
797 rlwinm. 2, 3, 4, 5, 6
798 # CHECK-BE: rlwnm 2, 3, 4, 5, 6 # encoding: [0x5c,0x62,0x21,0x4c]
799 # CHECK-LE: rlwnm 2, 3, 4, 5, 6 # encoding: [0x4c,0x21,0x62,0x5c]
801 # CHECK-BE: rlwnm. 2, 3, 4, 5, 6 # encoding: [0x5c,0x62,0x21,0x4d]
802 # CHECK-LE: rlwnm. 2, 3, 4, 5, 6 # encoding: [0x4d,0x21,0x62,0x5c]
804 # CHECK-BE: rlwimi 2, 3, 4, 5, 6 # encoding: [0x50,0x62,0x21,0x4c]
805 # CHECK-LE: rlwimi 2, 3, 4, 5, 6 # encoding: [0x4c,0x21,0x62,0x50]
807 # CHECK-BE: rlwimi. 2, 3, 4, 5, 6 # encoding: [0x50,0x62,0x21,0x4d]
808 # CHECK-LE: rlwimi. 2, 3, 4, 5, 6 # encoding: [0x4d,0x21,0x62,0x50]
809 rlwimi. 2, 3, 4, 5, 6
810 # CHECK-BE: rldicl 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x40]
811 # CHECK-LE: rldicl 2, 3, 4, 5 # encoding: [0x40,0x21,0x62,0x78]
813 # CHECK-BE: rldicl. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x41]
814 # CHECK-LE: rldicl. 2, 3, 4, 5 # encoding: [0x41,0x21,0x62,0x78]
816 # CHECK-BE: rldicr 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x44]
817 # CHECK-LE: rldicr 2, 3, 4, 5 # encoding: [0x44,0x21,0x62,0x78]
819 # CHECK-BE: rldicr. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x45]
820 # CHECK-LE: rldicr. 2, 3, 4, 5 # encoding: [0x45,0x21,0x62,0x78]
822 # CHECK-BE: rldic 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x48]
823 # CHECK-LE: rldic 2, 3, 4, 5 # encoding: [0x48,0x21,0x62,0x78]
825 # CHECK-BE: rldic. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x49]
826 # CHECK-LE: rldic. 2, 3, 4, 5 # encoding: [0x49,0x21,0x62,0x78]
828 # CHECK-BE: rldcl 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x50]
829 # CHECK-LE: rldcl 2, 3, 4, 5 # encoding: [0x50,0x21,0x62,0x78]
831 # CHECK-BE: rldcl. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x51]
832 # CHECK-LE: rldcl. 2, 3, 4, 5 # encoding: [0x51,0x21,0x62,0x78]
834 # CHECK-BE: rldcr 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x52]
835 # CHECK-LE: rldcr 2, 3, 4, 5 # encoding: [0x52,0x21,0x62,0x78]
837 # CHECK-BE: rldcr. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x53]
838 # CHECK-LE: rldcr. 2, 3, 4, 5 # encoding: [0x53,0x21,0x62,0x78]
840 # CHECK-BE: rldimi 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x4c]
841 # CHECK-LE: rldimi 2, 3, 4, 5 # encoding: [0x4c,0x21,0x62,0x78]
843 # CHECK-BE: rldimi. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x4d]
844 # CHECK-LE: rldimi. 2, 3, 4, 5 # encoding: [0x4d,0x21,0x62,0x78]
847 # Aliases that take bit masks...
849 # CHECK-BE: rlwinm 0, 0, 30, 31, 31 # encoding: [0x54,0x00,0xf7,0xfe]
851 # CHECK-BE: rlwinm. 0, 0, 30, 31, 31 # encoding: [0x54,0x00,0xf7,0xff]
853 # CHECK-BE: rlwinm 0, 0, 30, 31, 0 # encoding: [0x54,0x00,0xf7,0xc0]
854 rlwinm 0, 0, 30, 2147483649
855 # CHECK-BE: rlwinm. 0, 0, 30, 31, 0 # encoding: [0x54,0x00,0xf7,0xc1]
856 rlwinm. 0, 0, 30, 2147483649
857 # CHECK-BE: rlwimi 0, 0, 30, 31, 31 # encoding: [0x50,0x00,0xf7,0xfe]
859 # CHECK-BE: rlwimi. 0, 0, 30, 31, 31 # encoding: [0x50,0x00,0xf7,0xff]
861 # CHECK-BE: rlwimi 0, 0, 30, 31, 0 # encoding: [0x50,0x00,0xf7,0xc0]
862 rlwimi 0, 0, 30, 2147483649
863 # CHECK-BE: rlwimi. 0, 0, 30, 31, 0 # encoding: [0x50,0x00,0xf7,0xc1]
864 rlwimi. 0, 0, 30, 2147483649
865 # CHECK-BE: rlwnm 0, 0, 30, 31, 31 # encoding: [0x5c,0x00,0xf7,0xfe]
867 # CHECK-BE: rlwnm. 0, 0, 30, 31, 31 # encoding: [0x5c,0x00,0xf7,0xff]
869 # CHECK-BE: rlwnm 0, 0, 30, 31, 0 # encoding: [0x5c,0x00,0xf7,0xc0]
870 rlwnm 0, 0, 30, 2147483649
871 # CHECK-BE: rlwnm. 0, 0, 30, 31, 0 # encoding: [0x5c,0x00,0xf7,0xc1]
872 rlwnm. 0, 0, 30, 2147483649
874 # CHECK-BE: slw 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x30]
875 # CHECK-LE: slw 2, 3, 4 # encoding: [0x30,0x20,0x62,0x7c]
877 # CHECK-BE: slw. 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x31]
878 # CHECK-LE: slw. 2, 3, 4 # encoding: [0x31,0x20,0x62,0x7c]
880 # CHECK-BE: srw 2, 3, 4 # encoding: [0x7c,0x62,0x24,0x30]
881 # CHECK-LE: srw 2, 3, 4 # encoding: [0x30,0x24,0x62,0x7c]
883 # CHECK-BE: srw. 2, 3, 4 # encoding: [0x7c,0x62,0x24,0x31]
884 # CHECK-LE: srw. 2, 3, 4 # encoding: [0x31,0x24,0x62,0x7c]
886 # CHECK-BE: srawi 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x70]
887 # CHECK-LE: srawi 2, 3, 4 # encoding: [0x70,0x26,0x62,0x7c]
889 # CHECK-BE: srawi. 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x71]
890 # CHECK-LE: srawi. 2, 3, 4 # encoding: [0x71,0x26,0x62,0x7c]
892 # CHECK-BE: sraw 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x30]
893 # CHECK-LE: sraw 2, 3, 4 # encoding: [0x30,0x26,0x62,0x7c]
895 # CHECK-BE: sraw. 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x31]
896 # CHECK-LE: sraw. 2, 3, 4 # encoding: [0x31,0x26,0x62,0x7c]
898 # CHECK-BE: sld 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x36]
899 # CHECK-LE: sld 2, 3, 4 # encoding: [0x36,0x20,0x62,0x7c]
901 # CHECK-BE: sld. 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x37]
902 # CHECK-LE: sld. 2, 3, 4 # encoding: [0x37,0x20,0x62,0x7c]
904 # CHECK-BE: srd 2, 3, 4 # encoding: [0x7c,0x62,0x24,0x36]
905 # CHECK-LE: srd 2, 3, 4 # encoding: [0x36,0x24,0x62,0x7c]
907 # CHECK-BE: srd. 2, 3, 4 # encoding: [0x7c,0x62,0x24,0x37]
908 # CHECK-LE: srd. 2, 3, 4 # encoding: [0x37,0x24,0x62,0x7c]
910 # CHECK-BE: sradi 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x74]
911 # CHECK-LE: sradi 2, 3, 4 # encoding: [0x74,0x26,0x62,0x7c]
913 # CHECK-BE: sradi. 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x75]
914 # CHECK-LE: sradi. 2, 3, 4 # encoding: [0x75,0x26,0x62,0x7c]
916 # CHECK-BE: srad 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x34]
917 # CHECK-LE: srad 2, 3, 4 # encoding: [0x34,0x26,0x62,0x7c]
919 # CHECK-BE: srad. 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x35]
920 # CHECK-LE: srad. 2, 3, 4 # encoding: [0x35,0x26,0x62,0x7c]
922 # CHECK-BE: extswsli 2, 3, 4 # encoding: [0x7c,0x62,0x26,0xf4]
923 # CHECK-LE: extswsli 2, 3, 4 # encoding: [0xf4,0x26,0x62,0x7c]
925 # CHECK-BE: extswsli. 2, 3, 4 # encoding: [0x7c,0x62,0x26,0xf5]
926 # CHECK-LE: extswsli. 2, 3, 4 # encoding: [0xf5,0x26,0x62,0x7c]
930 # FIXME: BCD assist instructions
932 # Move to/from system register instructions
934 # CHECK-BE: mtspr 600, 2 # encoding: [0x7c,0x58,0x93,0xa6]
935 # CHECK-LE: mtspr 600, 2 # encoding: [0xa6,0x93,0x58,0x7c]
937 # CHECK-BE: mfspr 2, 600 # encoding: [0x7c,0x58,0x92,0xa6]
938 # CHECK-LE: mfspr 2, 600 # encoding: [0xa6,0x92,0x58,0x7c]
940 # CHECK-BE: mtcrf 123, 2 # encoding: [0x7c,0x47,0xb1,0x20]
941 # CHECK-LE: mtcrf 123, 2 # encoding: [0x20,0xb1,0x47,0x7c]
943 # CHECK-BE: mfcr 2 # encoding: [0x7c,0x40,0x00,0x26]
944 # CHECK-LE: mfcr 2 # encoding: [0x26,0x00,0x40,0x7c]
946 # CHECK-BE: mtocrf 16, 2 # encoding: [0x7c,0x51,0x01,0x20]
947 # CHECK-LE: mtocrf 16, 2 # encoding: [0x20,0x01,0x51,0x7c]
949 # CHECK-BE: mfocrf 16, 8 # encoding: [0x7e,0x10,0x80,0x26]
950 # CHECK-LE: mfocrf 16, 8 # encoding: [0x26,0x80,0x10,0x7e]
952 # CHECK-BE: mcrxrx 7 # encoding: [0x7f,0x80,0x04,0x80]
953 # CHECK-LE: mcrxrx 7 # encoding: [0x80,0x04,0x80,0x7f]
956 # Move to/from segment register
957 # CHECK-BE: mtsr 12, 10 # encoding: [0x7d,0x4c,0x01,0xa4]
958 # CHECK-LE: mtsr 12, 10 # encoding: [0xa4,0x01,0x4c,0x7d]
960 # CHECK-BE: mfsr 10, 12 # encoding: [0x7d,0x4c,0x04,0xa6]
961 # CHECK-LE: mfsr 10, 12 # encoding: [0xa6,0x04,0x4c,0x7d]
964 # CHECK-BE: mtsrin 10, 12 # encoding: [0x7d,0x40,0x61,0xe4]
965 # CHECK-LE: mtsrin 10, 12 # encoding: [0xe4,0x61,0x40,0x7d]
967 # CHECK-BE: mfsrin 10, 12 # encoding: [0x7d,0x40,0x65,0x26]
968 # CHECK-LE: mfsrin 10, 12 # encoding: [0x26,0x65,0x40,0x7d]
971 # Copy-Paste Facility
972 # CHECK-BE: copy 2, 19, 1 # encoding: [0x7c,0x22,0x9e,0x0c]
973 # CHECK-LE: copy 2, 19, 1 # encoding: [0x0c,0x9e,0x22,0x7c]
975 # CHECK-BE: paste 17, 1, 1 # encoding: [0x7c,0x31,0x0f,0x0c]
976 # CHECK-LE: paste 17, 1, 1 # encoding: [0x0c,0x0f,0x31,0x7c]
978 # CHECK-BE: cp_abort # encoding: [0x7c,0x00,0x06,0x8c]
979 # CHECK-LE: cp_abort # encoding: [0x8c,0x06,0x00,0x7c]
982 # Message Synchronize
983 # CHECK-BE: msgsync # encoding: [0x7c,0x00,0x06,0xec]
984 # CHECK-LE: msgsync # encoding: [0xec,0x06,0x00,0x7c]
987 # SLB Invalidate Entry Global
988 # CHECK-BE: slbieg 6, 21 # encoding: [0x7c,0xc0,0xab,0xa4]
989 # CHECK-LE: slbieg 6, 21 # encoding: [0xa4,0xab,0xc0,0x7c]
993 # CHECK-BE: slbsync # encoding: [0x7c,0x00,0x02,0xa4]
994 # CHECK-LE: slbsync # encoding: [0xa4,0x02,0x00,0x7c]
997 # Power-Saving Mode Instruction
998 # CHECK-BE: stop # encoding: [0x4c,0x00,0x02,0xe4]
999 # CHECK-LE: stop # encoding: [0xe4,0x02,0x00,0x4c]