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 # Instructions specific to the PowerPC 4xx embedded controllers: 5 6 # CHECK-BE: mfdcr 3, 178 # encoding: [0x7c,0x72,0x2a,0x86] 7 # CHECK-LE: mfdcr 3, 178 # encoding: [0x86,0x2a,0x72,0x7c] 8 mfdcr 3,178 9 # CHECK-BE: mtdcr 178, 3 # encoding: [0x7c,0x72,0x2b,0x86] 10 # CHECK-LE: mtdcr 178, 3 # encoding: [0x86,0x2b,0x72,0x7c] 11 mtdcr 178,3 12 13 # CHECK-BE: tlbre 2, 3, 0 # encoding: [0x7c,0x43,0x07,0x64] 14 # CHECK-LE: tlbre 2, 3, 0 # encoding: [0x64,0x07,0x43,0x7c] 15 tlbre %r2, %r3, 0 16 # CHECK-BE: tlbre 2, 3, 1 # encoding: [0x7c,0x43,0x0f,0x64] 17 # CHECK-LE: tlbre 2, 3, 1 # encoding: [0x64,0x0f,0x43,0x7c] 18 tlbre %r2, %r3, 1 19 # CHECK-BE: tlbre 2, 3, 0 # encoding: [0x7c,0x43,0x07,0x64] 20 # CHECK-LE: tlbre 2, 3, 0 # encoding: [0x64,0x07,0x43,0x7c] 21 tlbrehi %r2, %r3 22 # CHECK-BE: tlbre 2, 3, 1 # encoding: [0x7c,0x43,0x0f,0x64] 23 # CHECK-LE: tlbre 2, 3, 1 # encoding: [0x64,0x0f,0x43,0x7c] 24 tlbrelo %r2, %r3 25 26 # CHECK-BE: tlbwe 2, 3, 0 # encoding: [0x7c,0x43,0x07,0xa4] 27 # CHECK-LE: tlbwe 2, 3, 0 # encoding: [0xa4,0x07,0x43,0x7c] 28 tlbwe %r2, %r3, 0 29 # CHECK-BE: tlbwe 2, 3, 1 # encoding: [0x7c,0x43,0x0f,0xa4] 30 # CHECK-LE: tlbwe 2, 3, 1 # encoding: [0xa4,0x0f,0x43,0x7c] 31 tlbwe %r2, %r3, 1 32 # CHECK-BE: tlbwe 2, 3, 0 # encoding: [0x7c,0x43,0x07,0xa4] 33 # CHECK-LE: tlbwe 2, 3, 0 # encoding: [0xa4,0x07,0x43,0x7c] 34 tlbwehi %r2, %r3 35 # CHECK-BE: tlbwe 2, 3, 1 # encoding: [0x7c,0x43,0x0f,0xa4] 36 # CHECK-LE: tlbwe 2, 3, 1 # encoding: [0xa4,0x0f,0x43,0x7c] 37 tlbwelo %r2, %r3 38 39 # CHECK-BE: tlbsx 2, 3, 1 # encoding: [0x7c,0x43,0x0f,0x24] 40 # CHECK-LE: tlbsx 2, 3, 1 # encoding: [0x24,0x0f,0x43,0x7c] 41 tlbsx %r2, %r3, %r1 42 # CHECK-BE: tlbsx. 2, 3, 1 # encoding: [0x7c,0x43,0x0f,0x25] 43 # CHECK-LE: tlbsx. 2, 3, 1 # encoding: [0x25,0x0f,0x43,0x7c] 44 tlbsx. %r2, %r3, %r1 45 46 # CHECK-BE: mfspr 2, 1018 # encoding: [0x7c,0x5a,0xfa,0xa6] 47 # CHECK-LE: mfspr 2, 1018 # encoding: [0xa6,0xfa,0x5a,0x7c] 48 mfdccr %r2 49 # CHECK-BE: mtspr 1018, 2 # encoding: [0x7c,0x5a,0xfb,0xa6] 50 # CHECK-LE: mtspr 1018, 2 # encoding: [0xa6,0xfb,0x5a,0x7c] 51 mtdccr %r2 52 53 # CHECK-BE: mfspr 2, 1019 # encoding: [0x7c,0x5b,0xfa,0xa6] 54 # CHECK-LE: mfspr 2, 1019 # encoding: [0xa6,0xfa,0x5b,0x7c] 55 mficcr %r2 56 # CHECK-BE: mtspr 1019, 2 # encoding: [0x7c,0x5b,0xfb,0xa6] 57 # CHECK-LE: mtspr 1019, 2 # encoding: [0xa6,0xfb,0x5b,0x7c] 58 mticcr %r2 59 60 # CHECK-BE: mfspr 2, 981 # encoding: [0x7c,0x55,0xf2,0xa6] 61 # CHECK-LE: mfspr 2, 981 # encoding: [0xa6,0xf2,0x55,0x7c] 62 mfdear %r2 63 # CHECK-BE: mtspr 981, 2 # encoding: [0x7c,0x55,0xf3,0xa6] 64 # CHECK-LE: mtspr 981, 2 # encoding: [0xa6,0xf3,0x55,0x7c] 65 mtdear %r2 66 67 # CHECK-BE: mfspr 2, 980 # encoding: [0x7c,0x54,0xf2,0xa6] 68 # CHECK-LE: mfspr 2, 980 # encoding: [0xa6,0xf2,0x54,0x7c] 69 mfesr %r2 70 # CHECK-BE: mtspr 980, 2 # encoding: [0x7c,0x54,0xf3,0xa6] 71 # CHECK-LE: mtspr 980, 2 # encoding: [0xa6,0xf3,0x54,0x7c] 72 mtesr %r2 73 74 # CHECK-BE: mfspr 2, 986 # encoding: [0x7c,0x5a,0xf2,0xa6] 75 # CHECK-LE: mfspr 2, 986 # encoding: [0xa6,0xf2,0x5a,0x7c] 76 mftcr %r2 77 # CHECK-BE: mtspr 986, 2 # encoding: [0x7c,0x5a,0xf3,0xa6] 78 # CHECK-LE: mtspr 986, 2 # encoding: [0xa6,0xf3,0x5a,0x7c] 79 mttcr %r2 80 81 # CHECK-BE: mfspr 2, 989 # encoding: [0x7c,0x5d,0xf2,0xa6] 82 # CHECK-LE: mfspr 2, 989 # encoding: [0xa6,0xf2,0x5d,0x7c] 83 mftblo %r2 84 # CHECK-BE: mtspr 989, 2 # encoding: [0x7c,0x5d,0xf3,0xa6] 85 # CHECK-LE: mtspr 989, 2 # encoding: [0xa6,0xf3,0x5d,0x7c] 86 mttblo %r2 87 # CHECK-BE: mfspr 2, 988 # encoding: [0x7c,0x5c,0xf2,0xa6] 88 # CHECK-LE: mfspr 2, 988 # encoding: [0xa6,0xf2,0x5c,0x7c] 89 mftbhi %r2 90 # CHECK-BE: mtspr 988, 2 # encoding: [0x7c,0x5c,0xf3,0xa6] 91 # CHECK-LE: mtspr 988, 2 # encoding: [0xa6,0xf3,0x5c,0x7c] 92 mttbhi %r2 93 94 # CHECK-BE: dccci 5, 6 # encoding: [0x7c,0x05,0x33,0x8c] 95 # CHECK-LE: dccci 5, 6 # encoding: [0x8c,0x33,0x05,0x7c] 96 dccci %r5,%r6 97 # CHECK-BE: iccci 5, 6 # encoding: [0x7c,0x05,0x37,0x8c] 98 # CHECK-LE: iccci 5, 6 # encoding: [0x8c,0x37,0x05,0x7c] 99 iccci %r5,%r6 100 # CHECK-BE: dccci 0, 0 # encoding: [0x7c,0x00,0x03,0x8c] 101 # CHECK-LE: dccci 0, 0 # encoding: [0x8c,0x03,0x00,0x7c] 102 dci %r0 103 # CHECK-BE: iccci 0, 0 # encoding: [0x7c,0x00,0x07,0x8c] 104 # CHECK-LE: iccci 0, 0 # encoding: [0x8c,0x07,0x00,0x7c] 105 ici 0 106 107 # CHECK-BE: mfspr 2, 990 # encoding: [0x7c,0x5e,0xf2,0xa6] 108 # CHECK-LE: mfspr 2, 990 # encoding: [0xa6,0xf2,0x5e,0x7c] 109 mfsrr2 2 110 # CHECK-BE: mtspr 990, 2 # encoding: [0x7c,0x5e,0xf3,0xa6] 111 # CHECK-LE: mtspr 990, 2 # encoding: [0xa6,0xf3,0x5e,0x7c] 112 mtsrr2 2 113 # CHECK-BE: mfspr 2, 991 # encoding: [0x7c,0x5f,0xf2,0xa6] 114 # CHECK-LE: mfspr 2, 991 # encoding: [0xa6,0xf2,0x5f,0x7c] 115 mfsrr3 2 116 # CHECK-BE: mtspr 991, 2 # encoding: [0x7c,0x5f,0xf3,0xa6] 117 # CHECK-LE: mtspr 991, 2 # encoding: [0xa6,0xf3,0x5f,0x7c] 118 mtsrr3 2 119 120 # CHECK-BE: mfdcr 5, 128 # encoding: [0x7c,0xa0,0x22,0x86] 121 # CHECK-LE: mfdcr 5, 128 # encoding: [0x86,0x22,0xa0,0x7c] 122 mfbr0 %r5 123 # CHECK-BE: mtdcr 128, 5 # encoding: [0x7c,0xa0,0x23,0x86] 124 # CHECK-LE: mtdcr 128, 5 # encoding: [0x86,0x23,0xa0,0x7c] 125 mtbr0 %r5 126 # CHECK-BE: mfdcr 5, 129 # encoding: [0x7c,0xa1,0x22,0x86] 127 # CHECK-LE: mfdcr 5, 129 # encoding: [0x86,0x22,0xa1,0x7c] 128 mfbr1 %r5 129 # CHECK-BE: mtdcr 129, 5 # encoding: [0x7c,0xa1,0x23,0x86] 130 # CHECK-LE: mtdcr 129, 5 # encoding: [0x86,0x23,0xa1,0x7c] 131 mtbr1 %r5 132 # CHECK-BE: mfdcr 5, 130 # encoding: [0x7c,0xa2,0x22,0x86] 133 # CHECK-LE: mfdcr 5, 130 # encoding: [0x86,0x22,0xa2,0x7c] 134 mfbr2 %r5 135 # CHECK-BE: mtdcr 130, 5 # encoding: [0x7c,0xa2,0x23,0x86] 136 # CHECK-LE: mtdcr 130, 5 # encoding: [0x86,0x23,0xa2,0x7c] 137 mtbr2 %r5 138 # CHECK-BE: mfdcr 5, 131 # encoding: [0x7c,0xa3,0x22,0x86] 139 # CHECK-LE: mfdcr 5, 131 # encoding: [0x86,0x22,0xa3,0x7c] 140 mfbr3 %r5 141 # CHECK-BE: mtdcr 131, 5 # encoding: [0x7c,0xa3,0x23,0x86] 142 # CHECK-LE: mtdcr 131, 5 # encoding: [0x86,0x23,0xa3,0x7c] 143 mtbr3 %r5 144 # CHECK-BE: mfdcr 5, 132 # encoding: [0x7c,0xa4,0x22,0x86] 145 # CHECK-LE: mfdcr 5, 132 # encoding: [0x86,0x22,0xa4,0x7c] 146 mfbr4 %r5 147 # CHECK-BE: mtdcr 132, 5 # encoding: [0x7c,0xa4,0x23,0x86] 148 # CHECK-LE: mtdcr 132, 5 # encoding: [0x86,0x23,0xa4,0x7c] 149 mtbr4 %r5 150 # CHECK-BE: mfdcr 5, 133 # encoding: [0x7c,0xa5,0x22,0x86] 151 # CHECK-LE: mfdcr 5, 133 # encoding: [0x86,0x22,0xa5,0x7c] 152 mfbr5 %r5 153 # CHECK-BE: mtdcr 133, 5 # encoding: [0x7c,0xa5,0x23,0x86] 154 # CHECK-LE: mtdcr 133, 5 # encoding: [0x86,0x23,0xa5,0x7c] 155 mtbr5 %r5 156 # CHECK-BE: mfdcr 5, 134 # encoding: [0x7c,0xa6,0x22,0x86] 157 # CHECK-LE: mfdcr 5, 134 # encoding: [0x86,0x22,0xa6,0x7c] 158 mfbr6 %r5 159 # CHECK-BE: mtdcr 134, 5 # encoding: [0x7c,0xa6,0x23,0x86] 160 # CHECK-LE: mtdcr 134, 5 # encoding: [0x86,0x23,0xa6,0x7c] 161 mtbr6 %r5 162 # CHECK-BE: mfdcr 5, 135 # encoding: [0x7c,0xa7,0x22,0x86] 163 # CHECK-LE: mfdcr 5, 135 # encoding: [0x86,0x22,0xa7,0x7c] 164 mfbr7 %r5 165 # CHECK-BE: mtdcr 135, 5 # encoding: [0x7c,0xa7,0x23,0x86] 166 # CHECK-LE: mtdcr 135, 5 # encoding: [0x86,0x23,0xa7,0x7c] 167 mtbr7 %r5 168