1# RUN: llvm-mc -triple powerpc64-unknown-unknown --show-encoding %s | FileCheck -check-prefix=CHECK-BE %s 2# RUN: llvm-mc -triple powerpc64le-unknown-unknown --show-encoding %s | FileCheck -check-prefix=CHECK-LE %s 3 4# CHECK-BE: hrfid # encoding: [0x4c,0x00,0x02,0x24] 5# CHECK-LE: hrfid # encoding: [0x24,0x02,0x00,0x4c] 6 hrfid 7 8# CHECK-BE: nap # encoding: [0x4c,0x00,0x03,0x64] 9# CHECK-LE: nap # encoding: [0x64,0x03,0x00,0x4c] 10 nap 11 12# CHECK-BE: mtmsr 4 # encoding: [0x7c,0x80,0x01,0x24] 13# CHECK-LE: mtmsr 4 # encoding: [0x24,0x01,0x80,0x7c] 14 mtmsr %r4 15 16# CHECK-BE: mtmsr 4, 1 # encoding: [0x7c,0x81,0x01,0x24] 17# CHECK-LE: mtmsr 4, 1 # encoding: [0x24,0x01,0x81,0x7c] 18 mtmsr %r4, 1 19 20# CHECK-BE: mfmsr 4 # encoding: [0x7c,0x80,0x00,0xa6] 21# CHECK-LE: mfmsr 4 # encoding: [0xa6,0x00,0x80,0x7c] 22 mfmsr %r4 23 24# CHECK-BE: mtmsrd 4 # encoding: [0x7c,0x80,0x01,0x64] 25# CHECK-LE: mtmsrd 4 # encoding: [0x64,0x01,0x80,0x7c] 26 mtmsrd %r4 27 28# CHECK-BE: mtmsrd 4, 1 # encoding: [0x7c,0x81,0x01,0x64] 29# CHECK-LE: mtmsrd 4, 1 # encoding: [0x64,0x01,0x81,0x7c] 30 mtmsrd %r4, 1 31 32# CHECK-BE: mfspr 4, 260 # encoding: [0x7c,0x84,0x42,0xa6] 33# CHECK-LE: mfspr 4, 260 # encoding: [0xa6,0x42,0x84,0x7c] 34 mfsprg %r4, 4 35 36# CHECK-BE: mfspr 4, 261 # encoding: [0x7c,0x85,0x42,0xa6] 37# CHECK-LE: mfspr 4, 261 # encoding: [0xa6,0x42,0x85,0x7c] 38 mfsprg %r4, 5 39 40# CHECK-BE: mfspr 4, 262 # encoding: [0x7c,0x86,0x42,0xa6] 41# CHECK-LE: mfspr 4, 262 # encoding: [0xa6,0x42,0x86,0x7c] 42 mfsprg %r4, 6 43 44# CHECK-BE: mfspr 4, 263 # encoding: [0x7c,0x87,0x42,0xa6] 45# CHECK-LE: mfspr 4, 263 # encoding: [0xa6,0x42,0x87,0x7c] 46 mfsprg %r4, 7 47 48# CHECK-BE: mfspr 2, 260 # encoding: [0x7c,0x44,0x42,0xa6] 49# CHECK-LE: mfspr 2, 260 # encoding: [0xa6,0x42,0x44,0x7c] 50 mfsprg4 %r2 51# CHECK-BE: mfspr 2, 261 # encoding: [0x7c,0x45,0x42,0xa6] 52# CHECK-LE: mfspr 2, 261 # encoding: [0xa6,0x42,0x45,0x7c] 53 mfsprg5 %r2 54# CHECK-BE: mfspr 2, 262 # encoding: [0x7c,0x46,0x42,0xa6] 55# CHECK-LE: mfspr 2, 262 # encoding: [0xa6,0x42,0x46,0x7c] 56 mfsprg6 %r2 57# CHECK-BE: mfspr 2, 263 # encoding: [0x7c,0x47,0x42,0xa6] 58# CHECK-LE: mfspr 2, 263 # encoding: [0xa6,0x42,0x47,0x7c] 59 mfsprg7 %r2 60 61# NOT-CHECK-BE: mtspr 260, 4 # encoding: [0x7c,0x90,0x43,0xa6] 62# NOT-CHECK-LE: mtspr 260, 4 # encoding: [0xa6,0x43,0x90,0x7c] 63 mtsprg 4, %r4 64 65# NOT-CHECK-BE: mtspr 261, 4 # encoding: [0x7c,0x91,0x43,0xa6] 66# NOT-CHECK-LE: mtspr 261, 4 # encoding: [0xa6,0x43,0x91,0x7c] 67 mtsprg 5, %r4 68 69# NOT-CHECK-BE: mtspr 262, 4 # encoding: [0x7c,0x92,0x43,0xa6] 70# NOT-CHECK-LE: mtspr 262, 4 # encoding: [0xa6,0x43,0x92,0x7c] 71 mtsprg 6, %r4 72 73# NOT-CHECK-BE: mtspr 263, 4 # encoding: [0x7c,0x93,0x43,0xa6] 74# NOT-CHECK-LE: mtspr 263, 4 # encoding: [0xa6,0x43,0x93,0x7c] 75 mtsprg 7, %r4 76 77# CHECK-BE: mtspr 260, 4 # encoding: [0x7c,0x84,0x43,0xa6] 78# CHECK-LE: mtspr 260, 4 # encoding: [0xa6,0x43,0x84,0x7c] 79 mtsprg4 %r4 80 81# CHECK-BE: mtspr 261, 4 # encoding: [0x7c,0x85,0x43,0xa6] 82# CHECK-LE: mtspr 261, 4 # encoding: [0xa6,0x43,0x85,0x7c] 83 mtsprg5 %r4 84 85# CHECK-BE: mtspr 262, 4 # encoding: [0x7c,0x86,0x43,0xa6] 86# CHECK-LE: mtspr 262, 4 # encoding: [0xa6,0x43,0x86,0x7c] 87 mtsprg6 %r4 88 89# CHECK-BE: mtspr 263, 4 # encoding: [0x7c,0x87,0x43,0xa6] 90# CHECK-LE: mtspr 263, 4 # encoding: [0xa6,0x43,0x87,0x7c] 91 mtsprg7 %r4 92 93# CHECK-BE: mtspr 280, 4 # encoding: [0x7c,0x98,0x43,0xa6] 94# CHECK-LE: mtspr 280, 4 # encoding: [0xa6,0x43,0x98,0x7c] 95 mtasr %r4 96 97# CHECK-BE: mfspr 4, 22 # encoding: [0x7c,0x96,0x02,0xa6] 98# CHECK-LE: mfspr 4, 22 # encoding: [0xa6,0x02,0x96,0x7c] 99 mfdec %r4 100 101# CHECK-BE: mtspr 22, 4 # encoding: [0x7c,0x96,0x03,0xa6] 102# CHECK-LE: mtspr 22, 4 # encoding: [0xa6,0x03,0x96,0x7c] 103 mtdec %r4 104 105# CHECK-BE: mfpvr 4 # encoding: [0x7c,0x9f,0x42,0xa6] 106# CHECK-LE: mfpvr 4 # encoding: [0xa6,0x42,0x9f,0x7c] 107 mfpvr %r4 108 109# CHECK-BE: mfspr 4, 25 # encoding: [0x7c,0x99,0x02,0xa6] 110# CHECK-LE: mfspr 4, 25 # encoding: [0xa6,0x02,0x99,0x7c] 111 mfsdr1 %r4 112 113# CHECK-BE: mtspr 25, 4 # encoding: [0x7c,0x99,0x03,0xa6] 114# CHECK-LE: mtspr 25, 4 # encoding: [0xa6,0x03,0x99,0x7c] 115 mtsdr1 %r4 116 117# CHECK-BE: mfspr 4, 26 # encoding: [0x7c,0x9a,0x02,0xa6] 118# CHECK-LE: mfspr 4, 26 # encoding: [0xa6,0x02,0x9a,0x7c] 119 mfsrr0 %r4 120 121# CHECK-BE: mtspr 26, 4 # encoding: [0x7c,0x9a,0x03,0xa6] 122# CHECK-LE: mtspr 26, 4 # encoding: [0xa6,0x03,0x9a,0x7c] 123 mtsrr0 %r4 124 125# CHECK-BE: mfspr 4, 27 # encoding: [0x7c,0x9b,0x02,0xa6] 126# CHECK-LE: mfspr 4, 27 # encoding: [0xa6,0x02,0x9b,0x7c] 127 mfsrr1 %r4 128 129# CHECK-BE: mtspr 27, 4 # encoding: [0x7c,0x9b,0x03,0xa6] 130# CHECK-LE: mtspr 27, 4 # encoding: [0xa6,0x03,0x9b,0x7c] 131 mtsrr1 %r4 132 133# CHECK-BE: slbie 4 # encoding: [0x7c,0x00,0x23,0x64] 134# CHECK-LE: slbie 4 # encoding: [0x64,0x23,0x00,0x7c] 135 slbie %r4 136 137# CHECK-BE: slbmte 4, 5 # encoding: [0x7c,0x80,0x2b,0x24] 138# CHECK-LE: slbmte 4, 5 # encoding: [0x24,0x2b,0x80,0x7c] 139 slbmte %r4, %r5 140 141# CHECK-BE: slbmfee 4, 5 # encoding: [0x7c,0x80,0x2f,0x26] 142# CHECK-LE: slbmfee 4, 5 # encoding: [0x26,0x2f,0x80,0x7c] 143 slbmfee %r4, %r5 144 145# CHECK-BE: slbmfev 2, 3 # encoding: [0x7c,0x40,0x1e,0xa6] 146# CHECK-LE: slbmfev 2, 3 # encoding: [0xa6,0x1e,0x40,0x7c] 147 slbmfev %r2, %r3 148 149# CHECK-BE: slbia # encoding: [0x7c,0x00,0x03,0xe4] 150# CHECK-LE: slbia # encoding: [0xe4,0x03,0x00,0x7c] 151 slbia 152 153# CHECK-BE: tlbsync # encoding: [0x7c,0x00,0x04,0x6c] 154# CHECK-LE: tlbsync # encoding: [0x6c,0x04,0x00,0x7c] 155 tlbsync 156 157# CHECK-BE: tlbiel 4 # encoding: [0x7c,0x00,0x22,0x24] 158# CHECK-LE: tlbiel 4 # encoding: [0x24,0x22,0x00,0x7c] 159 tlbiel %r4 160 161# CHECK-BE: tlbie 4 # encoding: [0x7c,0x00,0x22,0x64] 162# CHECK-LE: tlbie 4 # encoding: [0x64,0x22,0x00,0x7c] 163 tlbie %r4, 0 164 165# CHECK-BE: tlbie 4 # encoding: [0x7c,0x00,0x22,0x64] 166# CHECK-LE: tlbie 4 # encoding: [0x64,0x22,0x00,0x7c] 167 tlbie %r4 168 169# CHECK-BE: rfi # encoding: [0x4c,0x00,0x00,0x64] 170# CHECK-LE: rfi # encoding: [0x64,0x00,0x00,0x4c] 171 rfi 172# CHECK-BE: rfci # encoding: [0x4c,0x00,0x00,0x66] 173# CHECK-LE: rfci # encoding: [0x66,0x00,0x00,0x4c] 174 rfci 175 176# CHECK-BE: wrtee 12 # encoding: [0x7d,0x80,0x01,0x06] 177# CHECK-LE: wrtee 12 # encoding: [0x06,0x01,0x80,0x7d] 178 wrtee %r12 179 180# CHECK-BE: wrteei 0 # encoding: [0x7c,0x00,0x01,0x46] 181# CHECK-LE: wrteei 0 # encoding: [0x46,0x01,0x00,0x7c] 182 wrteei 0 183 184# CHECK-BE: wrteei 1 # encoding: [0x7c,0x00,0x81,0x46] 185# CHECK-LE: wrteei 1 # encoding: [0x46,0x81,0x00,0x7c] 186 wrteei 1 187 188# CHECK-BE: tlbre # encoding: [0x7c,0x00,0x07,0x64] 189# CHECK-LE: tlbre # encoding: [0x64,0x07,0x00,0x7c] 190 tlbre 191# CHECK-BE: tlbwe # encoding: [0x7c,0x00,0x07,0xa4] 192# CHECK-LE: tlbwe # encoding: [0xa4,0x07,0x00,0x7c] 193 tlbwe 194# CHECK-BE: tlbivax 11, 12 # encoding: [0x7c,0x0b,0x66,0x24] 195# CHECK-LE: tlbivax 11, 12 # encoding: [0x24,0x66,0x0b,0x7c] 196 tlbivax %r11, %r12 197# CHECK-BE: tlbsx 11, 12 # encoding: [0x7c,0x0b,0x67,0x24] 198# CHECK-LE: tlbsx 11, 12 # encoding: [0x24,0x67,0x0b,0x7c] 199 tlbsx %r11, %r12 200 201# CHECK-BE: mfpmr 5, 400 # encoding: [0x7c,0xb0,0x62,0x9c] 202# CHECK-LE: mfpmr 5, 400 # encoding: [0x9c,0x62,0xb0,0x7c] 203 mfpmr 5, 400 204# CHECK-BE: mtpmr 400, 6 # encoding: [0x7c,0xd0,0x63,0x9c] 205# CHECK-LE: mtpmr 400, 6 # encoding: [0x9c,0x63,0xd0,0x7c] 206 mtpmr 400, 6 207# CHECK-BE: icblc 0, 0, 8 # encoding: [0x7c,0x00,0x41,0xcc] 208# CHECK-LE: icblc 0, 0, 8 # encoding: [0xcc,0x41,0x00,0x7c] 209 icblc 0, 0, 8 210# CHECK-BE: icbtls 0, 0, 9 # encoding: [0x7c,0x00,0x4b,0xcc] 211# CHECK-LE: icbtls 0, 0, 9 # encoding: [0xcc,0x4b,0x00,0x7c] 212 icbtls 0, 0, 9 213