1 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 4 5# Branch facility 6 7# Branch instructions 8 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 13 b target 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 18 ba target 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 23 bl target 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 28 bla target 29 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 34 bc 4, 10, target 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 39 bca 4, 10, target 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 44 bcl 4, 10, target 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 49 bcla 4, 10, target 50 51# CHECK-BE: bclr 4, 10, 3 # encoding: [0x4c,0x8a,0x18,0x20] 52# CHECK-LE: bclr 4, 10, 3 # encoding: [0x20,0x18,0x8a,0x4c] 53 bclr 4, 10, 3 54# CHECK-BE: bclr 4, 10 # encoding: [0x4c,0x8a,0x00,0x20] 55# CHECK-LE: bclr 4, 10 # encoding: [0x20,0x00,0x8a,0x4c] 56 bclr 4, 10 57# CHECK-BE: bclrl 4, 10, 3 # encoding: [0x4c,0x8a,0x18,0x21] 58# CHECK-LE: bclrl 4, 10, 3 # encoding: [0x21,0x18,0x8a,0x4c] 59 bclrl 4, 10, 3 60# CHECK-BE: bclrl 4, 10 # encoding: [0x4c,0x8a,0x00,0x21] 61# CHECK-LE: bclrl 4, 10 # encoding: [0x21,0x00,0x8a,0x4c] 62 bclrl 4, 10 63# CHECK-BE: bcctr 4, 10, 3 # encoding: [0x4c,0x8a,0x1c,0x20] 64# CHECK-LE: bcctr 4, 10, 3 # encoding: [0x20,0x1c,0x8a,0x4c] 65 bcctr 4, 10, 3 66# CHECK-BE: bcctr 4, 10 # encoding: [0x4c,0x8a,0x04,0x20] 67# CHECK-LE: bcctr 4, 10 # encoding: [0x20,0x04,0x8a,0x4c] 68 bcctr 4, 10 69# CHECK-BE: bcctrl 4, 10, 3 # encoding: [0x4c,0x8a,0x1c,0x21] 70# CHECK-LE: bcctrl 4, 10, 3 # encoding: [0x21,0x1c,0x8a,0x4c] 71 bcctrl 4, 10, 3 72# CHECK-BE: bcctrl 4, 10 # encoding: [0x4c,0x8a,0x04,0x21] 73# CHECK-LE: bcctrl 4, 10 # encoding: [0x21,0x04,0x8a,0x4c] 74 bcctrl 4, 10 75 76# Condition register instructions 77 78# CHECK-BE: crand 2, 3, 4 # encoding: [0x4c,0x43,0x22,0x02] 79# CHECK-LE: crand 2, 3, 4 # encoding: [0x02,0x22,0x43,0x4c] 80 crand 2, 3, 4 81# CHECK-BE: crnand 2, 3, 4 # encoding: [0x4c,0x43,0x21,0xc2] 82# CHECK-LE: crnand 2, 3, 4 # encoding: [0xc2,0x21,0x43,0x4c] 83 crnand 2, 3, 4 84# CHECK-BE: cror 2, 3, 4 # encoding: [0x4c,0x43,0x23,0x82] 85# CHECK-LE: cror 2, 3, 4 # encoding: [0x82,0x23,0x43,0x4c] 86 cror 2, 3, 4 87# CHECK-BE: crxor 2, 3, 4 # encoding: [0x4c,0x43,0x21,0x82] 88# CHECK-LE: crxor 2, 3, 4 # encoding: [0x82,0x21,0x43,0x4c] 89 crxor 2, 3, 4 90# CHECK-BE: crnor 2, 3, 4 # encoding: [0x4c,0x43,0x20,0x42] 91# CHECK-LE: crnor 2, 3, 4 # encoding: [0x42,0x20,0x43,0x4c] 92 crnor 2, 3, 4 93# CHECK-BE: creqv 2, 3, 4 # encoding: [0x4c,0x43,0x22,0x42] 94# CHECK-LE: creqv 2, 3, 4 # encoding: [0x42,0x22,0x43,0x4c] 95 creqv 2, 3, 4 96# CHECK-BE: crandc 2, 3, 4 # encoding: [0x4c,0x43,0x21,0x02] 97# CHECK-LE: crandc 2, 3, 4 # encoding: [0x02,0x21,0x43,0x4c] 98 crandc 2, 3, 4 99# CHECK-BE: crorc 2, 3, 4 # encoding: [0x4c,0x43,0x23,0x42] 100# CHECK-LE: crorc 2, 3, 4 # encoding: [0x42,0x23,0x43,0x4c] 101 crorc 2, 3, 4 102# CHECK-BE: mcrf 2, 3 # encoding: [0x4d,0x0c,0x00,0x00] 103# CHECK-LE: mcrf 2, 3 # encoding: [0x00,0x00,0x0c,0x4d] 104 mcrf 2, 3 105 106# System call instruction 107 108# CHECK-BE: sc 1 # encoding: [0x44,0x00,0x00,0x22] 109# CHECK-LE: sc 1 # encoding: [0x22,0x00,0x00,0x44] 110 sc 1 111# CHECK-BE: sc # encoding: [0x44,0x00,0x00,0x02] 112# CHECK-LE: sc # encoding: [0x02,0x00,0x00,0x44] 113 sc 114 115# Branch history rolling buffer 116 117# CHECK-BE: clrbhrb # encoding: [0x7c,0x00,0x03,0x5c] 118# CHECK-LE: clrbhrb # encoding: [0x5c,0x03,0x00,0x7c] 119 clrbhrb 120# CHECK-BE: mfbhrbe 9, 983 # encoding: [0x7d,0x3e,0xba,0x5c] 121# CHECK-LE: mfbhrbe 9, 983 # encoding: [0x5c,0xba,0x3e,0x7d] 122 mfbhrbe 9, 983 123# CHECK-BE: rfebb 1 # encoding: [0x4c,0x00,0x09,0x24] 124# CHECK-LE: rfebb 1 # encoding: [0x24,0x09,0x00,0x4c] 125 rfebb 1 126 127# Fixed-point facility 128 129# Fixed-point load instructions 130 131# CHECK-BE: lbz 2, 128(4) # encoding: [0x88,0x44,0x00,0x80] 132# CHECK-LE: lbz 2, 128(4) # encoding: [0x80,0x00,0x44,0x88] 133 lbz 2, 128(4) 134# CHECK-BE: lbzx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0xae] 135# CHECK-LE: lbzx 2, 3, 4 # encoding: [0xae,0x20,0x43,0x7c] 136 lbzx 2, 3, 4 137# CHECK-BE: lbzu 2, 128(4) # encoding: [0x8c,0x44,0x00,0x80] 138# CHECK-LE: lbzu 2, 128(4) # encoding: [0x80,0x00,0x44,0x8c] 139 lbzu 2, 128(4) 140# CHECK-BE: lbzux 2, 3, 4 # encoding: [0x7c,0x43,0x20,0xee] 141# CHECK-LE: lbzux 2, 3, 4 # encoding: [0xee,0x20,0x43,0x7c] 142 lbzux 2, 3, 4 143# CHECK-BE: lhz 2, 128(4) # encoding: [0xa0,0x44,0x00,0x80] 144# CHECK-LE: lhz 2, 128(4) # encoding: [0x80,0x00,0x44,0xa0] 145 lhz 2, 128(4) 146# CHECK-BE: lhzx 2, 3, 4 # encoding: [0x7c,0x43,0x22,0x2e] 147# CHECK-LE: lhzx 2, 3, 4 # encoding: [0x2e,0x22,0x43,0x7c] 148 lhzx 2, 3, 4 149# CHECK-BE: lhzu 2, 128(4) # encoding: [0xa4,0x44,0x00,0x80] 150# CHECK-LE: lhzu 2, 128(4) # encoding: [0x80,0x00,0x44,0xa4] 151 lhzu 2, 128(4) 152# CHECK-BE: lhzux 2, 3, 4 # encoding: [0x7c,0x43,0x22,0x6e] 153# CHECK-LE: lhzux 2, 3, 4 # encoding: [0x6e,0x22,0x43,0x7c] 154 lhzux 2, 3, 4 155# CHECK-BE: lha 2, 128(4) # encoding: [0xa8,0x44,0x00,0x80] 156# CHECK-LE: lha 2, 128(4) # encoding: [0x80,0x00,0x44,0xa8] 157 lha 2, 128(4) 158# CHECK-BE: lhax 2, 3, 4 # encoding: [0x7c,0x43,0x22,0xae] 159# CHECK-LE: lhax 2, 3, 4 # encoding: [0xae,0x22,0x43,0x7c] 160 lhax 2, 3, 4 161# CHECK-BE: lhau 2, 128(4) # encoding: [0xac,0x44,0x00,0x80] 162# CHECK-LE: lhau 2, 128(4) # encoding: [0x80,0x00,0x44,0xac] 163 lhau 2, 128(4) 164# CHECK-BE: lhaux 2, 3, 4 # encoding: [0x7c,0x43,0x22,0xee] 165# CHECK-LE: lhaux 2, 3, 4 # encoding: [0xee,0x22,0x43,0x7c] 166 lhaux 2, 3, 4 167# CHECK-BE: lwz 2, 128(4) # encoding: [0x80,0x44,0x00,0x80] 168# CHECK-LE: lwz 2, 128(4) # encoding: [0x80,0x00,0x44,0x80] 169 lwz 2, 128(4) 170# CHECK-BE: lwzx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x2e] 171# CHECK-LE: lwzx 2, 3, 4 # encoding: [0x2e,0x20,0x43,0x7c] 172 lwzx 2, 3, 4 173# CHECK-BE: lwzu 2, 128(4) # encoding: [0x84,0x44,0x00,0x80] 174# CHECK-LE: lwzu 2, 128(4) # encoding: [0x80,0x00,0x44,0x84] 175 lwzu 2, 128(4) 176# CHECK-BE: lwzux 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x6e] 177# CHECK-LE: lwzux 2, 3, 4 # encoding: [0x6e,0x20,0x43,0x7c] 178 lwzux 2, 3, 4 179# CHECK-BE: lwa 2, 128(4) # encoding: [0xe8,0x44,0x00,0x82] 180# CHECK-LE: lwa 2, 128(4) # encoding: [0x82,0x00,0x44,0xe8] 181 lwa 2, 128(4) 182# CHECK-BE: lwax 2, 3, 4 # encoding: [0x7c,0x43,0x22,0xaa] 183# CHECK-LE: lwax 2, 3, 4 # encoding: [0xaa,0x22,0x43,0x7c] 184 lwax 2, 3, 4 185# CHECK-BE: lwaux 2, 3, 4 # encoding: [0x7c,0x43,0x22,0xea] 186# CHECK-LE: lwaux 2, 3, 4 # encoding: [0xea,0x22,0x43,0x7c] 187 lwaux 2, 3, 4 188# CHECK-BE: ld 2, 128(4) # encoding: [0xe8,0x44,0x00,0x80] 189# CHECK-LE: ld 2, 128(4) # encoding: [0x80,0x00,0x44,0xe8] 190 ld 2, 128(4) 191# CHECK-BE: ldx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x2a] 192# CHECK-LE: ldx 2, 3, 4 # encoding: [0x2a,0x20,0x43,0x7c] 193 ldx 2, 3, 4 194# CHECK-BE: ldu 2, 128(4) # encoding: [0xe8,0x44,0x00,0x81] 195# CHECK-LE: ldu 2, 128(4) # encoding: [0x81,0x00,0x44,0xe8] 196 ldu 2, 128(4) 197# CHECK-BE: ldux 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x6a] 198# CHECK-LE: ldux 2, 3, 4 # encoding: [0x6a,0x20,0x43,0x7c] 199 ldux 2, 3, 4 200# CHECK-BE: ldmx 2, 3, 4 # encoding: [0x7c,0x43,0x22,0x6a] 201# CHECK-LE: ldmx 2, 3, 4 # encoding: [0x6a,0x22,0x43,0x7c] 202 ldmx 2, 3, 4 203 204# Fixed-point store instructions 205 206# CHECK-BE: stb 2, 128(4) # encoding: [0x98,0x44,0x00,0x80] 207# CHECK-LE: stb 2, 128(4) # encoding: [0x80,0x00,0x44,0x98] 208 stb 2, 128(4) 209# CHECK-BE: stbx 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xae] 210# CHECK-LE: stbx 2, 3, 4 # encoding: [0xae,0x21,0x43,0x7c] 211 stbx 2, 3, 4 212# CHECK-BE: stbu 2, 128(4) # encoding: [0x9c,0x44,0x00,0x80] 213# CHECK-LE: stbu 2, 128(4) # encoding: [0x80,0x00,0x44,0x9c] 214 stbu 2, 128(4) 215# CHECK-BE: stbux 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xee] 216# CHECK-LE: stbux 2, 3, 4 # encoding: [0xee,0x21,0x43,0x7c] 217 stbux 2, 3, 4 218# CHECK-BE: sth 2, 128(4) # encoding: [0xb0,0x44,0x00,0x80] 219# CHECK-LE: sth 2, 128(4) # encoding: [0x80,0x00,0x44,0xb0] 220 sth 2, 128(4) 221# CHECK-BE: sthx 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x2e] 222# CHECK-LE: sthx 2, 3, 4 # encoding: [0x2e,0x23,0x43,0x7c] 223 sthx 2, 3, 4 224# CHECK-BE: sthu 2, 128(4) # encoding: [0xb4,0x44,0x00,0x80] 225# CHECK-LE: sthu 2, 128(4) # encoding: [0x80,0x00,0x44,0xb4] 226 sthu 2, 128(4) 227# CHECK-BE: sthux 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x6e] 228# CHECK-LE: sthux 2, 3, 4 # encoding: [0x6e,0x23,0x43,0x7c] 229 sthux 2, 3, 4 230# CHECK-BE: stw 2, 128(4) # encoding: [0x90,0x44,0x00,0x80] 231# CHECK-LE: stw 2, 128(4) # encoding: [0x80,0x00,0x44,0x90] 232 stw 2, 128(4) 233# CHECK-BE: stwx 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x2e] 234# CHECK-LE: stwx 2, 3, 4 # encoding: [0x2e,0x21,0x43,0x7c] 235 stwx 2, 3, 4 236# CHECK-BE: stwu 2, 128(4) # encoding: [0x94,0x44,0x00,0x80] 237# CHECK-LE: stwu 2, 128(4) # encoding: [0x80,0x00,0x44,0x94] 238 stwu 2, 128(4) 239# CHECK-BE: stwux 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x6e] 240# CHECK-LE: stwux 2, 3, 4 # encoding: [0x6e,0x21,0x43,0x7c] 241 stwux 2, 3, 4 242# CHECK-BE: std 2, 128(4) # encoding: [0xf8,0x44,0x00,0x80] 243# CHECK-LE: std 2, 128(4) # encoding: [0x80,0x00,0x44,0xf8] 244 std 2, 128(4) 245# CHECK-BE: stdx 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x2a] 246# CHECK-LE: stdx 2, 3, 4 # encoding: [0x2a,0x21,0x43,0x7c] 247 stdx 2, 3, 4 248# CHECK-BE: stdu 2, 128(4) # encoding: [0xf8,0x44,0x00,0x81] 249# CHECK-LE: stdu 2, 128(4) # encoding: [0x81,0x00,0x44,0xf8] 250 stdu 2, 128(4) 251# CHECK-BE: stdux 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x6a] 252# CHECK-LE: stdux 2, 3, 4 # encoding: [0x6a,0x21,0x43,0x7c] 253 stdux 2, 3, 4 254 255# Fixed-point load and store with byte reversal instructions 256 257# CHECK-BE: lhbrx 2, 3, 4 # encoding: [0x7c,0x43,0x26,0x2c] 258# CHECK-LE: lhbrx 2, 3, 4 # encoding: [0x2c,0x26,0x43,0x7c] 259 lhbrx 2, 3, 4 260# CHECK-BE: sthbrx 2, 3, 4 # encoding: [0x7c,0x43,0x27,0x2c] 261# CHECK-LE: sthbrx 2, 3, 4 # encoding: [0x2c,0x27,0x43,0x7c] 262 sthbrx 2, 3, 4 263# CHECK-BE: lwbrx 2, 3, 4 # encoding: [0x7c,0x43,0x24,0x2c] 264# CHECK-LE: lwbrx 2, 3, 4 # encoding: [0x2c,0x24,0x43,0x7c] 265 lwbrx 2, 3, 4 266# CHECK-BE: stwbrx 2, 3, 4 # encoding: [0x7c,0x43,0x25,0x2c] 267# CHECK-LE: stwbrx 2, 3, 4 # encoding: [0x2c,0x25,0x43,0x7c] 268 stwbrx 2, 3, 4 269# CHECK-BE: ldbrx 2, 3, 4 # encoding: [0x7c,0x43,0x24,0x28] 270# CHECK-LE: ldbrx 2, 3, 4 # encoding: [0x28,0x24,0x43,0x7c] 271 ldbrx 2, 3, 4 272# CHECK-BE: stdbrx 2, 3, 4 # encoding: [0x7c,0x43,0x25,0x28] 273# CHECK-LE: stdbrx 2, 3, 4 # encoding: [0x28,0x25,0x43,0x7c] 274 stdbrx 2, 3, 4 275 276# Fixed-point load and store multiple instructions 277 278# CHECK-BE: lmw 2, 128(1) # encoding: [0xb8,0x41,0x00,0x80] 279# CHECK-LE: lmw 2, 128(1) # encoding: [0x80,0x00,0x41,0xb8] 280 lmw 2, 128(1) 281# CHECK-BE: stmw 2, 128(1) # encoding: [0xbc,0x41,0x00,0x80] 282# CHECK-LE: stmw 2, 128(1) # encoding: [0x80,0x00,0x41,0xbc] 283 stmw 2, 128(1) 284 285# FIXME: Fixed-point move assist instructions 286 287# Fixed-point arithmetic instructions 288 289# CHECK-BE: addi 2, 3, 128 # encoding: [0x38,0x43,0x00,0x80] 290# CHECK-LE: addi 2, 3, 128 # encoding: [0x80,0x00,0x43,0x38] 291 addi 2, 3, 128 292# CHECK-BE: addis 2, 3, 128 # encoding: [0x3c,0x43,0x00,0x80] 293# CHECK-LE: addis 2, 3, 128 # encoding: [0x80,0x00,0x43,0x3c] 294 addis 2, 3, 128 295# CHECK-BE: add 2, 3, 4 # encoding: [0x7c,0x43,0x22,0x14] 296# CHECK-LE: add 2, 3, 4 # encoding: [0x14,0x22,0x43,0x7c] 297 add 2, 3, 4 298# CHECK-BE: add. 2, 3, 4 # encoding: [0x7c,0x43,0x22,0x15] 299# CHECK-LE: add. 2, 3, 4 # encoding: [0x15,0x22,0x43,0x7c] 300 add. 2, 3, 4 301# FIXME: addo 2, 3, 4 302# FIXME: addo. 2, 3, 4 303# CHECK-BE: subf 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x50] 304# CHECK-LE: subf 2, 3, 4 # encoding: [0x50,0x20,0x43,0x7c] 305 subf 2, 3, 4 306# CHECK-BE: subf. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x51] 307# CHECK-LE: subf. 2, 3, 4 # encoding: [0x51,0x20,0x43,0x7c] 308 subf. 2, 3, 4 309# FIXME: subfo 2, 3, 4 310# FIXME: subfo. 2, 3, 4 311# CHECK-BE: addic 2, 3, 128 # encoding: [0x30,0x43,0x00,0x80] 312# CHECK-LE: addic 2, 3, 128 # encoding: [0x80,0x00,0x43,0x30] 313 addic 2, 3, 128 314# CHECK-BE: addic. 2, 3, 128 # encoding: [0x34,0x43,0x00,0x80] 315# CHECK-LE: addic. 2, 3, 128 # encoding: [0x80,0x00,0x43,0x34] 316 addic. 2, 3, 128 317# CHECK-BE: subfic 2, 3, 4 # encoding: [0x20,0x43,0x00,0x04] 318# CHECK-LE: subfic 2, 3, 4 # encoding: [0x04,0x00,0x43,0x20] 319 subfic 2, 3, 4 320 321# CHECK-BE: addc 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x14] 322# CHECK-LE: addc 2, 3, 4 # encoding: [0x14,0x20,0x43,0x7c] 323 addc 2, 3, 4 324# CHECK-BE: addc. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x15] 325# CHECK-LE: addc. 2, 3, 4 # encoding: [0x15,0x20,0x43,0x7c] 326 addc. 2, 3, 4 327# FIXME: addco 2, 3, 4 328# FIXME: addco. 2, 3, 4 329# CHECK-BE: subfc 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x10] 330# CHECK-LE: subfc 2, 3, 4 # encoding: [0x10,0x20,0x43,0x7c] 331 subfc 2, 3, 4 332# CHECK-BE: subfc 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x10] 333# CHECK-LE: subfc 2, 3, 4 # encoding: [0x10,0x20,0x43,0x7c] 334 subfc 2, 3, 4 335# FIXME: subfco 2, 3, 4 336# FIXME: subfco. 2, 3, 4 337 338# CHECK-BE: adde 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x14] 339# CHECK-LE: adde 2, 3, 4 # encoding: [0x14,0x21,0x43,0x7c] 340 adde 2, 3, 4 341# CHECK-BE: adde. 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x15] 342# CHECK-LE: adde. 2, 3, 4 # encoding: [0x15,0x21,0x43,0x7c] 343 adde. 2, 3, 4 344# FIXME: addeo 2, 3, 4 345# FIXME: addeo. 2, 3, 4 346# CHECK-BE: subfe 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x10] 347# CHECK-LE: subfe 2, 3, 4 # encoding: [0x10,0x21,0x43,0x7c] 348 subfe 2, 3, 4 349# CHECK-BE: subfe. 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x11] 350# CHECK-LE: subfe. 2, 3, 4 # encoding: [0x11,0x21,0x43,0x7c] 351 subfe. 2, 3, 4 352# FIXME: subfeo 2, 3, 4 353# FIXME: subfeo. 2, 3, 4 354 355# CHECK-BE: addme 2, 3 # encoding: [0x7c,0x43,0x01,0xd4] 356# CHECK-LE: addme 2, 3 # encoding: [0xd4,0x01,0x43,0x7c] 357 addme 2, 3 358# CHECK-BE: addme. 2, 3 # encoding: [0x7c,0x43,0x01,0xd5] 359# CHECK-LE: addme. 2, 3 # encoding: [0xd5,0x01,0x43,0x7c] 360 addme. 2, 3 361# FIXME: addmeo 2, 3 362# FIXME: addmeo. 2, 3 363# CHECK-BE: subfme 2, 3 # encoding: [0x7c,0x43,0x01,0xd0] 364# CHECK-LE: subfme 2, 3 # encoding: [0xd0,0x01,0x43,0x7c] 365 subfme 2, 3 366# CHECK-BE: subfme. 2, 3 # encoding: [0x7c,0x43,0x01,0xd1] 367# CHECK-LE: subfme. 2, 3 # encoding: [0xd1,0x01,0x43,0x7c] 368 subfme. 2, 3 369# FIXME: subfmeo 2, 3 370# FIXME: subfmeo. 2, 3 371 372# CHECK-BE: addze 2, 3 # encoding: [0x7c,0x43,0x01,0x94] 373# CHECK-LE: addze 2, 3 # encoding: [0x94,0x01,0x43,0x7c] 374 addze 2, 3 375# CHECK-BE: addze. 2, 3 # encoding: [0x7c,0x43,0x01,0x95] 376# CHECK-LE: addze. 2, 3 # encoding: [0x95,0x01,0x43,0x7c] 377 addze. 2, 3 378# FIXME: addzeo 2, 3 379# FIXME: addzeo. 2, 3 380# CHECK-BE: subfze 2, 3 # encoding: [0x7c,0x43,0x01,0x90] 381# CHECK-LE: subfze 2, 3 # encoding: [0x90,0x01,0x43,0x7c] 382 subfze 2, 3 383# CHECK-BE: subfze. 2, 3 # encoding: [0x7c,0x43,0x01,0x91] 384# CHECK-LE: subfze. 2, 3 # encoding: [0x91,0x01,0x43,0x7c] 385 subfze. 2, 3 386# FIXME: subfzeo 2, 3 387# FIXME: subfzeo. 2, 3 388 389# CHECK-BE: neg 2, 3 # encoding: [0x7c,0x43,0x00,0xd0] 390# CHECK-LE: neg 2, 3 # encoding: [0xd0,0x00,0x43,0x7c] 391 neg 2, 3 392# CHECK-BE: neg. 2, 3 # encoding: [0x7c,0x43,0x00,0xd1] 393# CHECK-LE: neg. 2, 3 # encoding: [0xd1,0x00,0x43,0x7c] 394 neg. 2, 3 395# FIXME: nego 2, 3 396# FIXME: nego. 2, 3 397 398# CHECK-BE: mulli 2, 3, 128 # encoding: [0x1c,0x43,0x00,0x80] 399# CHECK-LE: mulli 2, 3, 128 # encoding: [0x80,0x00,0x43,0x1c] 400 mulli 2, 3, 128 401# CHECK-BE: mulhw 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x96] 402# CHECK-LE: mulhw 2, 3, 4 # encoding: [0x96,0x20,0x43,0x7c] 403 mulhw 2, 3, 4 404# CHECK-BE: mulhw. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x97] 405# CHECK-LE: mulhw. 2, 3, 4 # encoding: [0x97,0x20,0x43,0x7c] 406 mulhw. 2, 3, 4 407# CHECK-BE: mullw 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xd6] 408# CHECK-LE: mullw 2, 3, 4 # encoding: [0xd6,0x21,0x43,0x7c] 409 mullw 2, 3, 4 410# CHECK-BE: mullw. 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xd7] 411# CHECK-LE: mullw. 2, 3, 4 # encoding: [0xd7,0x21,0x43,0x7c] 412 mullw. 2, 3, 4 413# FIXME: mullwo 2, 3, 4 414# FIXME: mullwo. 2, 3, 4 415# CHECK-BE: mulhwu 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x16] 416# CHECK-LE: mulhwu 2, 3, 4 # encoding: [0x16,0x20,0x43,0x7c] 417 mulhwu 2, 3, 4 418# CHECK-BE: mulhwu. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x17] 419# CHECK-LE: mulhwu. 2, 3, 4 # encoding: [0x17,0x20,0x43,0x7c] 420 mulhwu. 2, 3, 4 421 422# CHECK-BE: divw 2, 3, 4 # encoding: [0x7c,0x43,0x23,0xd6] 423# CHECK-LE: divw 2, 3, 4 # encoding: [0xd6,0x23,0x43,0x7c] 424 divw 2, 3, 4 425# CHECK-BE: divw. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0xd7] 426# CHECK-LE: divw. 2, 3, 4 # encoding: [0xd7,0x23,0x43,0x7c] 427 divw. 2, 3, 4 428# FIXME: divwo 2, 3, 4 429# FIXME: divwo. 2, 3, 4 430# CHECK-BE: divwu 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x96] 431# CHECK-LE: divwu 2, 3, 4 # encoding: [0x96,0x23,0x43,0x7c] 432 divwu 2, 3, 4 433# CHECK-BE: divwu. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x97] 434# CHECK-LE: divwu. 2, 3, 4 # encoding: [0x97,0x23,0x43,0x7c] 435 divwu. 2, 3, 4 436# FIXME: divwuo 2, 3, 4 437# FIXME: divwuo. 2, 3, 4 438# CHECK-BE: divwe 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x56] 439# CHECK-LE: divwe 2, 3, 4 # encoding: [0x56,0x23,0x43,0x7c] 440 divwe 2, 3, 4 441# CHECK-BE: divwe. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x57] 442# CHECK-LE: divwe. 2, 3, 4 # encoding: [0x57,0x23,0x43,0x7c] 443 divwe. 2, 3, 4 444# FIXME: divweo 2, 3, 4 445# FIXME: divweo. 2, 3, 4 446# CHECK-BE: divweu 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x16] 447# CHECK-LE: divweu 2, 3, 4 # encoding: [0x16,0x23,0x43,0x7c] 448 divweu 2, 3, 4 449# CHECK-BE: divweu. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x17] 450# CHECK-LE: divweu. 2, 3, 4 # encoding: [0x17,0x23,0x43,0x7c] 451 divweu. 2, 3, 4 452# FIXME: divweuo 2, 3, 4 453# FIXME: divweuo. 2, 3, 4 454 455# CHECK-BE: mulld 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xd2] 456# CHECK-LE: mulld 2, 3, 4 # encoding: [0xd2,0x21,0x43,0x7c] 457 mulld 2, 3, 4 458# CHECK-BE: mulld. 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xd3] 459# CHECK-LE: mulld. 2, 3, 4 # encoding: [0xd3,0x21,0x43,0x7c] 460 mulld. 2, 3, 4 461# FIXME: mulldo 2, 3, 4 462# FIXME: mulldo. 2, 3, 4 463# CHECK-BE: mulhd 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x92] 464# CHECK-LE: mulhd 2, 3, 4 # encoding: [0x92,0x20,0x43,0x7c] 465 mulhd 2, 3, 4 466# CHECK-BE: mulhd. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x93] 467# CHECK-LE: mulhd. 2, 3, 4 # encoding: [0x93,0x20,0x43,0x7c] 468 mulhd. 2, 3, 4 469# CHECK-BE: mulhdu 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x12] 470# CHECK-LE: mulhdu 2, 3, 4 # encoding: [0x12,0x20,0x43,0x7c] 471 mulhdu 2, 3, 4 472# CHECK-BE: mulhdu. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x13] 473# CHECK-LE: mulhdu. 2, 3, 4 # encoding: [0x13,0x20,0x43,0x7c] 474 mulhdu. 2, 3, 4 475 476# CHECK-BE: divd 2, 3, 4 # encoding: [0x7c,0x43,0x23,0xd2] 477# CHECK-LE: divd 2, 3, 4 # encoding: [0xd2,0x23,0x43,0x7c] 478 divd 2, 3, 4 479# CHECK-BE: divd. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0xd3] 480# CHECK-LE: divd. 2, 3, 4 # encoding: [0xd3,0x23,0x43,0x7c] 481 divd. 2, 3, 4 482# FIXME: divdo 2, 3, 4 483# FIXME: divdo. 2, 3, 4 484# CHECK-BE: divdu 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x92] 485# CHECK-LE: divdu 2, 3, 4 # encoding: [0x92,0x23,0x43,0x7c] 486 divdu 2, 3, 4 487# CHECK-BE: divdu. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x93] 488# CHECK-LE: divdu. 2, 3, 4 # encoding: [0x93,0x23,0x43,0x7c] 489 divdu. 2, 3, 4 490# FIXME: divduo 2, 3, 4 491# FIXME: divduo. 2, 3, 4 492# CHECK-BE: divde 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x52] 493# CHECK-LE: divde 2, 3, 4 # encoding: [0x52,0x23,0x43,0x7c] 494 divde 2, 3, 4 495# CHECK-BE: divde. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x53] 496# CHECK-LE: divde. 2, 3, 4 # encoding: [0x53,0x23,0x43,0x7c] 497 divde. 2, 3, 4 498# FIXME: divdeo 2, 3, 4 499# FIXME: divdeo. 2, 3, 4 500# CHECK-BE: divdeu 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x12] 501# CHECK-LE: divdeu 2, 3, 4 # encoding: [0x12,0x23,0x43,0x7c] 502 divdeu 2, 3, 4 503# CHECK-BE: divdeu. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x13] 504# CHECK-LE: divdeu. 2, 3, 4 # encoding: [0x13,0x23,0x43,0x7c] 505 divdeu. 2, 3, 4 506# FIXME: divdeuo 2, 3, 4 507# FIXME: divdeuo. 2, 3, 4 508 509# Fixed-point compare instructions 510 511# CHECK-BE: cmpdi 2, 3, 128 # encoding: [0x2d,0x23,0x00,0x80] 512# CHECK-LE: cmpdi 2, 3, 128 # encoding: [0x80,0x00,0x23,0x2d] 513 cmpi 2, 1, 3, 128 514# CHECK-BE: cmpd 2, 3, 4 # encoding: [0x7d,0x23,0x20,0x00] 515# CHECK-LE: cmpd 2, 3, 4 # encoding: [0x00,0x20,0x23,0x7d] 516 cmp 2, 1, 3, 4 517# CHECK-BE: cmpldi 2, 3, 128 # encoding: [0x29,0x23,0x00,0x80] 518# CHECK-LE: cmpldi 2, 3, 128 # encoding: [0x80,0x00,0x23,0x29] 519 cmpli 2, 1, 3, 128 520# CHECK-BE: cmpld 2, 3, 4 # encoding: [0x7d,0x23,0x20,0x40] 521# CHECK-LE: cmpld 2, 3, 4 # encoding: [0x40,0x20,0x23,0x7d] 522 cmpl 2, 1, 3, 4 523 524# CHECK-BE: cmpwi 2, 3, 128 # encoding: [0x2d,0x03,0x00,0x80] 525# CHECK-LE: cmpwi 2, 3, 128 # encoding: [0x80,0x00,0x03,0x2d] 526 cmpi 2, 0, 3, 128 527# CHECK-BE: cmpw 2, 3, 4 # encoding: [0x7d,0x03,0x20,0x00] 528# CHECK-LE: cmpw 2, 3, 4 # encoding: [0x00,0x20,0x03,0x7d] 529 cmp 2, 0, 3, 4 530# CHECK-BE: cmplwi 2, 3, 128 # encoding: [0x29,0x03,0x00,0x80] 531# CHECK-LE: cmplwi 2, 3, 128 # encoding: [0x80,0x00,0x03,0x29] 532 cmpli 2, 0, 3, 128 533# CHECK-BE: cmplw 2, 3, 4 # encoding: [0x7d,0x03,0x20,0x40] 534# CHECK-LE: cmplw 2, 3, 4 # encoding: [0x40,0x20,0x03,0x7d] 535 cmpl 2, 0, 3, 4 536# CHECK-BE: cmprb 3, 1, 7, 17 # encoding: [0x7d,0xa7,0x89,0x80] 537# CHECK-LE: cmprb 3, 1, 7, 17 # encoding: [0x80,0x89,0xa7,0x7d] 538 cmprb 3, 1, 7, 17 539# CHECK-BE: cmpeqb 3, 7, 17 # encoding: [0x7d,0x87,0x89,0xc0] 540# CHECK-LE: cmpeqb 3, 7, 17 # encoding: [0xc0,0x89,0x87,0x7d] 541 cmpeqb 3, 7, 17 542# CHECK-BE: cnttzw 7, 17 # encoding: [0x7e,0x27,0x04,0x34] 543# CHECK-LE: cnttzw 7, 17 # encoding: [0x34,0x04,0x27,0x7e] 544 cnttzw 7, 17 545# CHECK-BE: cnttzw. 7, 17 # encoding: [0x7e,0x27,0x04,0x35] 546# CHECK-LE: cnttzw. 7, 17 # encoding: [0x35,0x04,0x27,0x7e] 547 cnttzw. 7, 17 548# CHECK-BE: cnttzd 7, 17 # encoding: [0x7e,0x27,0x04,0x74] 549# CHECK-LE: cnttzd 7, 17 # encoding: [0x74,0x04,0x27,0x7e] 550 cnttzd 7, 17 551# CHECK-BE: cnttzd. 7, 17 # encoding: [0x7e,0x27,0x04,0x75] 552# CHECK-LE: cnttzd. 7, 17 # encoding: [0x75,0x04,0x27,0x7e] 553 cnttzd. 7, 17 554 555# Fixed-point trap instructions 556 557# CHECK-BE: twllti 3, 4 # encoding: [0x0c,0x43,0x00,0x04] 558# CHECK-LE: twllti 3, 4 # encoding: [0x04,0x00,0x43,0x0c] 559 twi 2, 3, 4 560# CHECK-BE: twllt 3, 4 # encoding: [0x7c,0x43,0x20,0x08] 561# CHECK-LE: twllt 3, 4 # encoding: [0x08,0x20,0x43,0x7c] 562 tw 2, 3, 4 563# CHECK-BE: tdllti 3, 4 # encoding: [0x08,0x43,0x00,0x04] 564# CHECK-LE: tdllti 3, 4 # encoding: [0x04,0x00,0x43,0x08] 565 tdi 2, 3, 4 566# CHECK-BE: tdllt 3, 4 # encoding: [0x7c,0x43,0x20,0x88] 567# CHECK-LE: tdllt 3, 4 # encoding: [0x88,0x20,0x43,0x7c] 568 td 2, 3, 4 569 570# Fixed-point select 571 572# CHECK-BE: isel 2, 3, 4, 5 # encoding: [0x7c,0x43,0x21,0x5e] 573# CHECK-LE: isel 2, 3, 4, 5 # encoding: [0x5e,0x21,0x43,0x7c] 574 isel 2, 3, 4, 5 575 576# Fixed-point logical instructions 577 578# CHECK-BE: andi. 2, 3, 128 # encoding: [0x70,0x62,0x00,0x80] 579# CHECK-LE: andi. 2, 3, 128 # encoding: [0x80,0x00,0x62,0x70] 580 andi. 2, 3, 128 581# CHECK-BE: andis. 2, 3, 128 # encoding: [0x74,0x62,0x00,0x80] 582# CHECK-LE: andis. 2, 3, 128 # encoding: [0x80,0x00,0x62,0x74] 583 andis. 2, 3, 128 584# CHECK-BE: ori 2, 3, 128 # encoding: [0x60,0x62,0x00,0x80] 585# CHECK-LE: ori 2, 3, 128 # encoding: [0x80,0x00,0x62,0x60] 586 ori 2, 3, 128 587# CHECK-BE: oris 2, 3, 128 # encoding: [0x64,0x62,0x00,0x80] 588# CHECK-LE: oris 2, 3, 128 # encoding: [0x80,0x00,0x62,0x64] 589 oris 2, 3, 128 590# CHECK-BE: xori 2, 3, 128 # encoding: [0x68,0x62,0x00,0x80] 591# CHECK-LE: xori 2, 3, 128 # encoding: [0x80,0x00,0x62,0x68] 592 xori 2, 3, 128 593# CHECK-BE: xoris 2, 3, 128 # encoding: [0x6c,0x62,0x00,0x80] 594# CHECK-LE: xoris 2, 3, 128 # encoding: [0x80,0x00,0x62,0x6c] 595 xoris 2, 3, 128 596# CHECK-BE: and 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x38] 597# CHECK-LE: and 2, 3, 4 # encoding: [0x38,0x20,0x62,0x7c] 598 and 2, 3, 4 599# CHECK-BE: and. 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x39] 600# CHECK-LE: and. 2, 3, 4 # encoding: [0x39,0x20,0x62,0x7c] 601 and. 2, 3, 4 602# CHECK-BE: xor 2, 3, 4 # encoding: [0x7c,0x62,0x22,0x78] 603# CHECK-LE: xor 2, 3, 4 # encoding: [0x78,0x22,0x62,0x7c] 604 xor 2, 3, 4 605# CHECK-BE: xor. 2, 3, 4 # encoding: [0x7c,0x62,0x22,0x79] 606# CHECK-LE: xor. 2, 3, 4 # encoding: [0x79,0x22,0x62,0x7c] 607 xor. 2, 3, 4 608# CHECK-BE: nand 2, 3, 4 # encoding: [0x7c,0x62,0x23,0xb8] 609# CHECK-LE: nand 2, 3, 4 # encoding: [0xb8,0x23,0x62,0x7c] 610 nand 2, 3, 4 611# CHECK-BE: nand. 2, 3, 4 # encoding: [0x7c,0x62,0x23,0xb9] 612# CHECK-LE: nand. 2, 3, 4 # encoding: [0xb9,0x23,0x62,0x7c] 613 nand. 2, 3, 4 614# CHECK-BE: or 2, 3, 4 # encoding: [0x7c,0x62,0x23,0x78] 615# CHECK-LE: or 2, 3, 4 # encoding: [0x78,0x23,0x62,0x7c] 616 or 2, 3, 4 617# CHECK-BE: or. 2, 3, 4 # encoding: [0x7c,0x62,0x23,0x79] 618# CHECK-LE: or. 2, 3, 4 # encoding: [0x79,0x23,0x62,0x7c] 619 or. 2, 3, 4 620# CHECK-BE: nor 2, 3, 4 # encoding: [0x7c,0x62,0x20,0xf8] 621# CHECK-LE: nor 2, 3, 4 # encoding: [0xf8,0x20,0x62,0x7c] 622 nor 2, 3, 4 623# CHECK-BE: nor. 2, 3, 4 # encoding: [0x7c,0x62,0x20,0xf9] 624# CHECK-LE: nor. 2, 3, 4 # encoding: [0xf9,0x20,0x62,0x7c] 625 nor. 2, 3, 4 626# CHECK-BE: eqv 2, 3, 4 # encoding: [0x7c,0x62,0x22,0x38] 627# CHECK-LE: eqv 2, 3, 4 # encoding: [0x38,0x22,0x62,0x7c] 628 eqv 2, 3, 4 629# CHECK-BE: eqv. 2, 3, 4 # encoding: [0x7c,0x62,0x22,0x39] 630# CHECK-LE: eqv. 2, 3, 4 # encoding: [0x39,0x22,0x62,0x7c] 631 eqv. 2, 3, 4 632# CHECK-BE: andc 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x78] 633# CHECK-LE: andc 2, 3, 4 # encoding: [0x78,0x20,0x62,0x7c] 634 andc 2, 3, 4 635# CHECK-BE: andc. 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x79] 636# CHECK-LE: andc. 2, 3, 4 # encoding: [0x79,0x20,0x62,0x7c] 637 andc. 2, 3, 4 638# CHECK-BE: orc 2, 3, 4 # encoding: [0x7c,0x62,0x23,0x38] 639# CHECK-LE: orc 2, 3, 4 # encoding: [0x38,0x23,0x62,0x7c] 640 orc 2, 3, 4 641# CHECK-BE: orc. 2, 3, 4 # encoding: [0x7c,0x62,0x23,0x39] 642# CHECK-LE: orc. 2, 3, 4 # encoding: [0x39,0x23,0x62,0x7c] 643 orc. 2, 3, 4 644 645# CHECK-BE: extsb 2, 3 # encoding: [0x7c,0x62,0x07,0x74] 646# CHECK-LE: extsb 2, 3 # encoding: [0x74,0x07,0x62,0x7c] 647 extsb 2, 3 648# CHECK-BE: extsb. 2, 3 # encoding: [0x7c,0x62,0x07,0x75] 649# CHECK-LE: extsb. 2, 3 # encoding: [0x75,0x07,0x62,0x7c] 650 extsb. 2, 3 651# CHECK-BE: extsh 2, 3 # encoding: [0x7c,0x62,0x07,0x34] 652# CHECK-LE: extsh 2, 3 # encoding: [0x34,0x07,0x62,0x7c] 653 extsh 2, 3 654# CHECK-BE: extsh. 2, 3 # encoding: [0x7c,0x62,0x07,0x35] 655# CHECK-LE: extsh. 2, 3 # encoding: [0x35,0x07,0x62,0x7c] 656 extsh. 2, 3 657 658# CHECK-BE: cntlzw 2, 3 # encoding: [0x7c,0x62,0x00,0x34] 659# CHECK-LE: cntlzw 2, 3 # encoding: [0x34,0x00,0x62,0x7c] 660 cntlzw 2, 3 661# CHECK-BE: cntlzw. 2, 3 # encoding: [0x7c,0x62,0x00,0x35] 662# CHECK-LE: cntlzw. 2, 3 # encoding: [0x35,0x00,0x62,0x7c] 663 cntlzw. 2, 3 664# 665# The POWER variant of cntlzw 666# CHECK-BE: cntlzw 2, 3 # encoding: [0x7c,0x62,0x00,0x34] 667# CHECK-LE: cntlzw 2, 3 # encoding: [0x34,0x00,0x62,0x7c] 668 cntlz 2, 3 669# CHECK-BE: cntlzw. 2, 3 # encoding: [0x7c,0x62,0x00,0x35] 670# CHECK-LE: cntlzw. 2, 3 # encoding: [0x35,0x00,0x62,0x7c] 671 cntlz. 2, 3 672 cmpb 7, 21, 4 673# CHECK-BE: cmpb 7, 21, 4 # encoding: [0x7e,0xa7,0x23,0xf8] 674# CHECK-LE: cmpb 7, 21, 4 # encoding: [0xf8,0x23,0xa7,0x7e] 675# FIXME: popcntb 2, 3 676# CHECK-BE: popcntw 2, 3 # encoding: [0x7c,0x62,0x02,0xf4] 677# CHECK-LE: popcntw 2, 3 # encoding: [0xf4,0x02,0x62,0x7c] 678 popcntw 2, 3 679# FIXME: prtyd 2, 3 680# FIXME: prtyw 2, 3 681 682# CHECK-BE: extsw 2, 3 # encoding: [0x7c,0x62,0x07,0xb4] 683# CHECK-LE: extsw 2, 3 # encoding: [0xb4,0x07,0x62,0x7c] 684 extsw 2, 3 685# CHECK-BE: extsw. 2, 3 # encoding: [0x7c,0x62,0x07,0xb5] 686# CHECK-LE: extsw. 2, 3 # encoding: [0xb5,0x07,0x62,0x7c] 687 extsw. 2, 3 688 689# CHECK-BE: cntlzd 2, 3 # encoding: [0x7c,0x62,0x00,0x74] 690# CHECK-LE: cntlzd 2, 3 # encoding: [0x74,0x00,0x62,0x7c] 691 cntlzd 2, 3 692# CHECK-BE: cntlzd. 2, 3 # encoding: [0x7c,0x62,0x00,0x75] 693# CHECK-LE: cntlzd. 2, 3 # encoding: [0x75,0x00,0x62,0x7c] 694 cntlzd. 2, 3 695# CHECK-BE: popcntd 2, 3 # encoding: [0x7c,0x62,0x03,0xf4] 696# CHECK-LE: popcntd 2, 3 # encoding: [0xf4,0x03,0x62,0x7c] 697 popcntd 2, 3 698# CHECK-BE: bpermd 2, 3, 4 # encoding: [0x7c,0x62,0x21,0xf8] 699# CHECK-LE: bpermd 2, 3, 4 # encoding: [0xf8,0x21,0x62,0x7c] 700 bpermd 2, 3, 4 701 702# Fixed-point rotate and shift instructions 703 704# CHECK-BE: rlwinm 2, 3, 4, 5, 6 # encoding: [0x54,0x62,0x21,0x4c] 705# CHECK-LE: rlwinm 2, 3, 4, 5, 6 # encoding: [0x4c,0x21,0x62,0x54] 706 rlwinm 2, 3, 4, 5, 6 707# CHECK-BE: rlwinm. 2, 3, 4, 5, 6 # encoding: [0x54,0x62,0x21,0x4d] 708# CHECK-LE: rlwinm. 2, 3, 4, 5, 6 # encoding: [0x4d,0x21,0x62,0x54] 709 rlwinm. 2, 3, 4, 5, 6 710# CHECK-BE: rlwnm 2, 3, 4, 5, 6 # encoding: [0x5c,0x62,0x21,0x4c] 711# CHECK-LE: rlwnm 2, 3, 4, 5, 6 # encoding: [0x4c,0x21,0x62,0x5c] 712 rlwnm 2, 3, 4, 5, 6 713# CHECK-BE: rlwnm. 2, 3, 4, 5, 6 # encoding: [0x5c,0x62,0x21,0x4d] 714# CHECK-LE: rlwnm. 2, 3, 4, 5, 6 # encoding: [0x4d,0x21,0x62,0x5c] 715 rlwnm. 2, 3, 4, 5, 6 716# CHECK-BE: rlwimi 2, 3, 4, 5, 6 # encoding: [0x50,0x62,0x21,0x4c] 717# CHECK-LE: rlwimi 2, 3, 4, 5, 6 # encoding: [0x4c,0x21,0x62,0x50] 718 rlwimi 2, 3, 4, 5, 6 719# CHECK-BE: rlwimi. 2, 3, 4, 5, 6 # encoding: [0x50,0x62,0x21,0x4d] 720# CHECK-LE: rlwimi. 2, 3, 4, 5, 6 # encoding: [0x4d,0x21,0x62,0x50] 721 rlwimi. 2, 3, 4, 5, 6 722# CHECK-BE: rldicl 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x40] 723# CHECK-LE: rldicl 2, 3, 4, 5 # encoding: [0x40,0x21,0x62,0x78] 724 rldicl 2, 3, 4, 5 725# CHECK-BE: rldicl. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x41] 726# CHECK-LE: rldicl. 2, 3, 4, 5 # encoding: [0x41,0x21,0x62,0x78] 727 rldicl. 2, 3, 4, 5 728# CHECK-BE: rldicr 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x44] 729# CHECK-LE: rldicr 2, 3, 4, 5 # encoding: [0x44,0x21,0x62,0x78] 730 rldicr 2, 3, 4, 5 731# CHECK-BE: rldicr. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x45] 732# CHECK-LE: rldicr. 2, 3, 4, 5 # encoding: [0x45,0x21,0x62,0x78] 733 rldicr. 2, 3, 4, 5 734# CHECK-BE: rldic 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x48] 735# CHECK-LE: rldic 2, 3, 4, 5 # encoding: [0x48,0x21,0x62,0x78] 736 rldic 2, 3, 4, 5 737# CHECK-BE: rldic. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x49] 738# CHECK-LE: rldic. 2, 3, 4, 5 # encoding: [0x49,0x21,0x62,0x78] 739 rldic. 2, 3, 4, 5 740# CHECK-BE: rldcl 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x50] 741# CHECK-LE: rldcl 2, 3, 4, 5 # encoding: [0x50,0x21,0x62,0x78] 742 rldcl 2, 3, 4, 5 743# CHECK-BE: rldcl. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x51] 744# CHECK-LE: rldcl. 2, 3, 4, 5 # encoding: [0x51,0x21,0x62,0x78] 745 rldcl. 2, 3, 4, 5 746# CHECK-BE: rldcr 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x52] 747# CHECK-LE: rldcr 2, 3, 4, 5 # encoding: [0x52,0x21,0x62,0x78] 748 rldcr 2, 3, 4, 5 749# CHECK-BE: rldcr. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x53] 750# CHECK-LE: rldcr. 2, 3, 4, 5 # encoding: [0x53,0x21,0x62,0x78] 751 rldcr. 2, 3, 4, 5 752# CHECK-BE: rldimi 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x4c] 753# CHECK-LE: rldimi 2, 3, 4, 5 # encoding: [0x4c,0x21,0x62,0x78] 754 rldimi 2, 3, 4, 5 755# CHECK-BE: rldimi. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x4d] 756# CHECK-LE: rldimi. 2, 3, 4, 5 # encoding: [0x4d,0x21,0x62,0x78] 757 rldimi. 2, 3, 4, 5 758 759# Aliases that take bit masks... 760 761# CHECK-BE: rlwinm 0, 0, 30, 31, 31 # encoding: [0x54,0x00,0xf7,0xfe] 762 rlwinm 0, 0, 30, 1 763# CHECK-BE: rlwinm. 0, 0, 30, 31, 31 # encoding: [0x54,0x00,0xf7,0xff] 764 rlwinm. 0, 0, 30, 1 765# CHECK-BE: rlwinm 0, 0, 30, 31, 0 # encoding: [0x54,0x00,0xf7,0xc0] 766 rlwinm 0, 0, 30, 2147483649 767# CHECK-BE: rlwinm. 0, 0, 30, 31, 0 # encoding: [0x54,0x00,0xf7,0xc1] 768 rlwinm. 0, 0, 30, 2147483649 769# CHECK-BE: rlwimi 0, 0, 30, 31, 31 # encoding: [0x50,0x00,0xf7,0xfe] 770 rlwimi 0, 0, 30, 1 771# CHECK-BE: rlwimi. 0, 0, 30, 31, 31 # encoding: [0x50,0x00,0xf7,0xff] 772 rlwimi. 0, 0, 30, 1 773# CHECK-BE: rlwimi 0, 0, 30, 31, 0 # encoding: [0x50,0x00,0xf7,0xc0] 774 rlwimi 0, 0, 30, 2147483649 775# CHECK-BE: rlwimi. 0, 0, 30, 31, 0 # encoding: [0x50,0x00,0xf7,0xc1] 776 rlwimi. 0, 0, 30, 2147483649 777# CHECK-BE: rlwnm 0, 0, 30, 31, 31 # encoding: [0x5c,0x00,0xf7,0xfe] 778 rlwnm 0, 0, 30, 1 779# CHECK-BE: rlwnm. 0, 0, 30, 31, 31 # encoding: [0x5c,0x00,0xf7,0xff] 780 rlwnm. 0, 0, 30, 1 781# CHECK-BE: rlwnm 0, 0, 30, 31, 0 # encoding: [0x5c,0x00,0xf7,0xc0] 782 rlwnm 0, 0, 30, 2147483649 783# CHECK-BE: rlwnm. 0, 0, 30, 31, 0 # encoding: [0x5c,0x00,0xf7,0xc1] 784 rlwnm. 0, 0, 30, 2147483649 785 786# CHECK-BE: slw 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x30] 787# CHECK-LE: slw 2, 3, 4 # encoding: [0x30,0x20,0x62,0x7c] 788 slw 2, 3, 4 789# CHECK-BE: slw. 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x31] 790# CHECK-LE: slw. 2, 3, 4 # encoding: [0x31,0x20,0x62,0x7c] 791 slw. 2, 3, 4 792# CHECK-BE: srw 2, 3, 4 # encoding: [0x7c,0x62,0x24,0x30] 793# CHECK-LE: srw 2, 3, 4 # encoding: [0x30,0x24,0x62,0x7c] 794 srw 2, 3, 4 795# CHECK-BE: srw. 2, 3, 4 # encoding: [0x7c,0x62,0x24,0x31] 796# CHECK-LE: srw. 2, 3, 4 # encoding: [0x31,0x24,0x62,0x7c] 797 srw. 2, 3, 4 798# CHECK-BE: srawi 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x70] 799# CHECK-LE: srawi 2, 3, 4 # encoding: [0x70,0x26,0x62,0x7c] 800 srawi 2, 3, 4 801# CHECK-BE: srawi. 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x71] 802# CHECK-LE: srawi. 2, 3, 4 # encoding: [0x71,0x26,0x62,0x7c] 803 srawi. 2, 3, 4 804# CHECK-BE: sraw 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x30] 805# CHECK-LE: sraw 2, 3, 4 # encoding: [0x30,0x26,0x62,0x7c] 806 sraw 2, 3, 4 807# CHECK-BE: sraw. 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x31] 808# CHECK-LE: sraw. 2, 3, 4 # encoding: [0x31,0x26,0x62,0x7c] 809 sraw. 2, 3, 4 810# CHECK-BE: sld 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x36] 811# CHECK-LE: sld 2, 3, 4 # encoding: [0x36,0x20,0x62,0x7c] 812 sld 2, 3, 4 813# CHECK-BE: sld. 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x37] 814# CHECK-LE: sld. 2, 3, 4 # encoding: [0x37,0x20,0x62,0x7c] 815 sld. 2, 3, 4 816# CHECK-BE: srd 2, 3, 4 # encoding: [0x7c,0x62,0x24,0x36] 817# CHECK-LE: srd 2, 3, 4 # encoding: [0x36,0x24,0x62,0x7c] 818 srd 2, 3, 4 819# CHECK-BE: srd. 2, 3, 4 # encoding: [0x7c,0x62,0x24,0x37] 820# CHECK-LE: srd. 2, 3, 4 # encoding: [0x37,0x24,0x62,0x7c] 821 srd. 2, 3, 4 822# CHECK-BE: sradi 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x74] 823# CHECK-LE: sradi 2, 3, 4 # encoding: [0x74,0x26,0x62,0x7c] 824 sradi 2, 3, 4 825# CHECK-BE: sradi. 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x75] 826# CHECK-LE: sradi. 2, 3, 4 # encoding: [0x75,0x26,0x62,0x7c] 827 sradi. 2, 3, 4 828# CHECK-BE: srad 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x34] 829# CHECK-LE: srad 2, 3, 4 # encoding: [0x34,0x26,0x62,0x7c] 830 srad 2, 3, 4 831# CHECK-BE: srad. 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x35] 832# CHECK-LE: srad. 2, 3, 4 # encoding: [0x35,0x26,0x62,0x7c] 833 srad. 2, 3, 4 834 835# FIXME: BCD assist instructions 836 837# Move to/from system register instructions 838 839# CHECK-BE: mtspr 600, 2 # encoding: [0x7c,0x58,0x93,0xa6] 840# CHECK-LE: mtspr 600, 2 # encoding: [0xa6,0x93,0x58,0x7c] 841 mtspr 600, 2 842# CHECK-BE: mfspr 2, 600 # encoding: [0x7c,0x58,0x92,0xa6] 843# CHECK-LE: mfspr 2, 600 # encoding: [0xa6,0x92,0x58,0x7c] 844 mfspr 2, 600 845# CHECK-BE: mtcrf 123, 2 # encoding: [0x7c,0x47,0xb1,0x20] 846# CHECK-LE: mtcrf 123, 2 # encoding: [0x20,0xb1,0x47,0x7c] 847 mtcrf 123, 2 848# CHECK-BE: mfcr 2 # encoding: [0x7c,0x40,0x00,0x26] 849# CHECK-LE: mfcr 2 # encoding: [0x26,0x00,0x40,0x7c] 850 mfcr 2 851# CHECK-BE: mtocrf 16, 2 # encoding: [0x7c,0x51,0x01,0x20] 852# CHECK-LE: mtocrf 16, 2 # encoding: [0x20,0x01,0x51,0x7c] 853 mtocrf 16, 2 854# CHECK-BE: mfocrf 16, 8 # encoding: [0x7e,0x10,0x80,0x26] 855# CHECK-LE: mfocrf 16, 8 # encoding: [0x26,0x80,0x10,0x7e] 856 mfocrf 16, 8 857# CHECK-BE: mcrxrx 7 # encoding: [0x7f,0x80,0x04,0x80] 858# CHECK-LE: mcrxrx 7 # encoding: [0x80,0x04,0x80,0x7f] 859 mcrxrx 7 860 861# Move to/from segment register 862# CHECK-BE: mtsr 12, 10 # encoding: [0x7d,0x4c,0x01,0xa4] 863# CHECK-LE: mtsr 12, 10 # encoding: [0xa4,0x01,0x4c,0x7d] 864 mtsr 12,%r10 865# CHECK-BE: mfsr 10, 12 # encoding: [0x7d,0x4c,0x04,0xa6] 866# CHECK-LE: mfsr 10, 12 # encoding: [0xa6,0x04,0x4c,0x7d] 867 mfsr %r10,12 868 869# CHECK-BE: mtsrin 10, 12 # encoding: [0x7d,0x40,0x61,0xe4] 870# CHECK-LE: mtsrin 10, 12 # encoding: [0xe4,0x61,0x40,0x7d] 871 mtsrin %r10,%r12 872# CHECK-BE: mfsrin 10, 12 # encoding: [0x7d,0x40,0x65,0x26] 873# CHECK-LE: mfsrin 10, 12 # encoding: [0x26,0x65,0x40,0x7d] 874 mfsrin %r10,%r12 875 876# Copy-Paste Facility 877# CHECK-BE: copy 2, 19, 1 # encoding: [0x7c,0x22,0x9e,0x0c] 878# CHECK-LE: copy 2, 19, 1 # encoding: [0x0c,0x9e,0x22,0x7c] 879 copy 2, 19, 1 880# CHECK-BE: paste 17, 1, 1 # encoding: [0x7c,0x31,0x0f,0x0c] 881# CHECK-LE: paste 17, 1, 1 # encoding: [0x0c,0x0f,0x31,0x7c] 882 paste 17, 1, 1 883# CHECK-BE: cp_abort # encoding: [0x7c,0x00,0x06,0x8c] 884# CHECK-LE: cp_abort # encoding: [0x8c,0x06,0x00,0x7c] 885 cp_abort 886 887# Message Synchronize 888# CHECK-BE: msgsync # encoding: [0x7c,0x00,0x06,0xec] 889# CHECK-LE: msgsync # encoding: [0xec,0x06,0x00,0x7c] 890 msgsync 891 892# SLB Invalidate Entry Global 893# CHECK-BE: slbieg 6, 21 # encoding: [0x7c,0xc0,0xab,0xa4] 894# CHECK-LE: slbieg 6, 21 # encoding: [0xa4,0xab,0xc0,0x7c] 895 slbieg 6, 21 896 897# SLB Synchronize 898# CHECK-BE: slbsync # encoding: [0x7c,0x00,0x02,0xa4] 899# CHECK-LE: slbsync # encoding: [0xa4,0x02,0x00,0x7c] 900 slbsync 901 902# Power-Saving Mode Instruction 903# CHECK-BE: stop # encoding: [0x4c,0x00,0x02,0xe4] 904# CHECK-LE: stop # encoding: [0xe4,0x02,0x00,0x4c] 905 stop 906