1# Check the hardware registers 2# 3# FIXME: Use the code generator in order to print the .set directives 4# instead of the instruction printer. 5# 6# RUN: llvm-mc %s -triple=mips-unknown-linux -show-encoding -mcpu=mips32r2 | \ 7# RUN: FileCheck %s 8 .set noat 9 # CHECK: .set push 10 # CHECK-NEXT: .set mips32r2 11 # CHECK-NEXT: rdhwr $4, $hwr_cpunum 12 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x00,0x3b] 13 rdhwr $a0,$hwr_cpunum 14 # CHECK: .set push 15 # CHECK-NEXT: .set mips32r2 16 # CHECK-NEXT: rdhwr $4, $hwr_cpunum 17 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x00,0x3b] 18 rdhwr $a0,$0 19 20 # CHECK: .set push 21 # CHECK-NEXT: .set mips32r2 22 # CHECK-NEXT: rdhwr $5, $hwr_synci_step 23 # CHECK-NEXT: .set pop # encoding: [0x7c,0x05,0x08,0x3b] 24 rdhwr $a1,$hwr_synci_step 25 # CHECK: .set push 26 # CHECK-NEXT: .set mips32r2 27 # CHECK-NEXT: rdhwr $5, $hwr_synci_step 28 # CHECK-NEXT: .set pop # encoding: [0x7c,0x05,0x08,0x3b] 29 rdhwr $a1,$1 30 31 # CHECK: .set push 32 # CHECK-NEXT: .set mips32r2 33 # CHECK-NEXT: rdhwr $6, $hwr_cc 34 # CHECK-NEXT: .set pop # encoding: [0x7c,0x06,0x10,0x3b] 35 rdhwr $a2,$hwr_cc 36 # CHECK: .set push 37 # CHECK-NEXT: .set mips32r2 38 # CHECK-NEXT: rdhwr $6, $hwr_cc 39 # CHECK-NEXT: .set pop # encoding: [0x7c,0x06,0x10,0x3b] 40 rdhwr $a2,$2 41 42 # CHECK: .set push 43 # CHECK-NEXT: .set mips32r2 44 # CHECK-NEXT: rdhwr $7, $hwr_ccres 45 # CHECK-NEXT: .set pop # encoding: [0x7c,0x07,0x18,0x3b] 46 rdhwr $a3,$hwr_ccres 47 # CHECK: .set push 48 # CHECK-NEXT: .set mips32r2 49 # CHECK-NEXT: rdhwr $7, $hwr_ccres 50 # CHECK-NEXT: .set pop # encoding: [0x7c,0x07,0x18,0x3b] 51 rdhwr $a3,$3 52 53 # CHECK: .set push 54 # CHECK-NEXT: .set mips32r2 55 # CHECK-NEXT: rdhwr $4, $4 56 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x20,0x3b] 57 rdhwr $a0,$4 58 # CHECK: .set push 59 # CHECK-NEXT: .set mips32r2 60 # CHECK-NEXT: rdhwr $4, $5 61 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x28,0x3b] 62 rdhwr $a0,$5 63 # CHECK: .set push 64 # CHECK-NEXT: .set mips32r2 65 # CHECK-NEXT: rdhwr $4, $6 66 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x30,0x3b] 67 rdhwr $a0,$6 68 # CHECK: .set push 69 # CHECK-NEXT: .set mips32r2 70 # CHECK-NEXT: rdhwr $4, $7 71 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x38,0x3b] 72 rdhwr $a0,$7 73 # CHECK: .set push 74 # CHECK-NEXT: .set mips32r2 75 # CHECK-NEXT: rdhwr $4, $8 76 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x40,0x3b] 77 rdhwr $a0,$8 78 # CHECK: .set push 79 # CHECK-NEXT: .set mips32r2 80 # CHECK-NEXT: rdhwr $4, $9 81 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x48,0x3b] 82 rdhwr $a0,$9 83 # CHECK: .set push 84 # CHECK-NEXT: .set mips32r2 85 # CHECK-NEXT: rdhwr $4, $10 86 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x50,0x3b] 87 rdhwr $a0,$10 88 # CHECK: .set push 89 # CHECK-NEXT: .set mips32r2 90 # CHECK-NEXT: rdhwr $4, $11 91 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x58,0x3b] 92 rdhwr $a0,$11 93 # CHECK: .set push 94 # CHECK-NEXT: .set mips32r2 95 # CHECK-NEXT: rdhwr $4, $12 96 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x60,0x3b] 97 rdhwr $a0,$12 98 # CHECK: .set push 99 # CHECK-NEXT: .set mips32r2 100 # CHECK-NEXT: rdhwr $4, $13 101 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x68,0x3b] 102 rdhwr $a0,$13 103 # CHECK: .set push 104 # CHECK-NEXT: .set mips32r2 105 # CHECK-NEXT: rdhwr $4, $14 106 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x70,0x3b] 107 rdhwr $a0,$14 108 # CHECK: .set push 109 # CHECK-NEXT: .set mips32r2 110 # CHECK-NEXT: rdhwr $4, $15 111 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x78,0x3b] 112 rdhwr $a0,$15 113 # CHECK: .set push 114 # CHECK-NEXT: .set mips32r2 115 # CHECK-NEXT: rdhwr $4, $16 116 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x80,0x3b] 117 rdhwr $a0,$16 118 # CHECK: .set push 119 # CHECK-NEXT: .set mips32r2 120 # CHECK-NEXT: rdhwr $4, $17 121 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x88,0x3b] 122 rdhwr $a0,$17 123 # CHECK: .set push 124 # CHECK-NEXT: .set mips32r2 125 # CHECK-NEXT: rdhwr $4, $18 126 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x90,0x3b] 127 rdhwr $a0,$18 128 # CHECK: .set push 129 # CHECK-NEXT: .set mips32r2 130 # CHECK-NEXT: rdhwr $4, $19 131 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0x98,0x3b] 132 rdhwr $a0,$19 133 # CHECK: .set push 134 # CHECK-NEXT: .set mips32r2 135 # CHECK-NEXT: rdhwr $4, $20 136 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0xa0,0x3b] 137 rdhwr $a0,$20 138 # CHECK: .set push 139 # CHECK-NEXT: .set mips32r2 140 # CHECK-NEXT: rdhwr $4, $21 141 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0xa8,0x3b] 142 rdhwr $a0,$21 143 # CHECK: .set push 144 # CHECK-NEXT: .set mips32r2 145 # CHECK-NEXT: rdhwr $4, $22 146 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0xb0,0x3b] 147 rdhwr $a0,$22 148 # CHECK: .set push 149 # CHECK-NEXT: .set mips32r2 150 # CHECK-NEXT: rdhwr $4, $23 151 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0xb8,0x3b] 152 rdhwr $a0,$23 153 # CHECK: .set push 154 # CHECK-NEXT: .set mips32r2 155 # CHECK-NEXT: rdhwr $4, $24 156 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0xc0,0x3b] 157 rdhwr $a0,$24 158 # CHECK: .set push 159 # CHECK-NEXT: .set mips32r2 160 # CHECK-NEXT: rdhwr $4, $25 161 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0xc8,0x3b] 162 rdhwr $a0,$25 163 # CHECK: .set push 164 # CHECK-NEXT: .set mips32r2 165 # CHECK-NEXT: rdhwr $4, $26 166 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0xd0,0x3b] 167 rdhwr $a0,$26 168 # CHECK: .set push 169 # CHECK-NEXT: .set mips32r2 170 # CHECK-NEXT: rdhwr $4, $27 171 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0xd8,0x3b] 172 rdhwr $a0,$27 173 # CHECK: .set push 174 # CHECK-NEXT: .set mips32r2 175 # CHECK-NEXT: rdhwr $4, $28 176 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0xe0,0x3b] 177 rdhwr $a0,$28 178 179 # CHECK: .set push 180 # CHECK-NEXT: .set mips32r2 181 # CHECK-NEXT: rdhwr $4, $29 182 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0xe8,0x3b] 183 rdhwr $a0,$29 184 # CHECK: .set push 185 # CHECK-NEXT: .set mips32r2 186 # CHECK-NEXT: rdhwr $4, $29 187 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0xe8,0x3b] 188 rdhwr $a0,$hwr_ulr 189 190 # CHECK: .set push 191 # CHECK-NEXT: .set mips32r2 192 # CHECK-NEXT: rdhwr $4, $30 193 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0xf0,0x3b] 194 rdhwr $a0,$30 195 # CHECK: .set push 196 # CHECK-NEXT: .set mips32r2 197 # CHECK-NEXT: rdhwr $4, $31 198 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0xf8,0x3b] 199 rdhwr $a0,$31 200