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