1 # RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t 2 # RUN: FileCheck < %t %s 3 4 # Test GR32 operands 5 # 6 #CHECK: error: invalid operand for instruction 7 #CHECK: lr %f0,%r1 8 #CHECK: error: invalid operand for instruction 9 #CHECK: lr %a0,%r1 10 #CHECK: error: invalid operand for instruction 11 #CHECK: lr %r0,%f1 12 #CHECK: error: invalid operand for instruction 13 #CHECK: lr %r0,%a1 14 #CHECK: error: invalid operand for instruction 15 #CHECK: lr %r0,0 16 #CHECK: error: invalid operand for instruction 17 #CHECK: lr %r0,0(%r1) 18 19 lr %f0,%r1 20 lr %a0,%r1 21 lr %r0,%f1 22 lr %r0,%a1 23 lr %r0,0 24 lr %r0,0(%r1) 25 26 # Test GR64 operands 27 # 28 #CHECK: error: invalid operand for instruction 29 #CHECK: lgr %f0,%r1 30 #CHECK: error: invalid operand for instruction 31 #CHECK: lgr %a0,%r1 32 #CHECK: error: invalid operand for instruction 33 #CHECK: lgr %r0,%f1 34 #CHECK: error: invalid operand for instruction 35 #CHECK: lgr %r0,%a1 36 #CHECK: error: invalid operand for instruction 37 #CHECK: lgr %r0,0 38 #CHECK: error: invalid operand for instruction 39 #CHECK: lgr %r0,0(%r1) 40 41 lgr %f0,%r1 42 lgr %a0,%r1 43 lgr %r0,%f1 44 lgr %r0,%a1 45 lgr %r0,0 46 lgr %r0,0(%r1) 47 48 # Test GR128 operands 49 # 50 #CHECK: error: invalid register pair 51 #CHECK: dlr %r1,%r0 52 #CHECK: error: invalid register pair 53 #CHECK: dlr %r3,%r0 54 #CHECK: error: invalid register pair 55 #CHECK: dlr %r5,%r0 56 #CHECK: error: invalid register pair 57 #CHECK: dlr %r7,%r0 58 #CHECK: error: invalid register pair 59 #CHECK: dlr %r9,%r0 60 #CHECK: error: invalid register pair 61 #CHECK: dlr %r11,%r0 62 #CHECK: error: invalid register pair 63 #CHECK: dlr %r13,%r0 64 #CHECK: error: invalid register pair 65 #CHECK: dlr %r15,%r0 66 #CHECK: error: invalid operand for instruction 67 #CHECK: dlr %f0,%r1 68 #CHECK: error: invalid operand for instruction 69 #CHECK: dlr %a0,%r1 70 #CHECK: error: invalid operand for instruction 71 #CHECK: dlr %r0,%f1 72 #CHECK: error: invalid operand for instruction 73 #CHECK: dlr %r0,%a1 74 #CHECK: error: invalid operand for instruction 75 #CHECK: dlr %r0,0 76 #CHECK: error: invalid operand for instruction 77 #CHECK: dlr %r0,0(%r1) 78 79 dlr %r1,%r0 80 dlr %r3,%r0 81 dlr %r5,%r0 82 dlr %r7,%r0 83 dlr %r9,%r0 84 dlr %r11,%r0 85 dlr %r13,%r0 86 dlr %r15,%r0 87 dlr %f0,%r1 88 dlr %a0,%r1 89 dlr %r0,%f1 90 dlr %r0,%a1 91 dlr %r0,0 92 dlr %r0,0(%r1) 93 94 # Test FP32 operands 95 # 96 #CHECK: error: invalid operand for instruction 97 #CHECK: ler %r0,%f1 98 #CHECK: error: invalid operand for instruction 99 #CHECK: ler %a0,%f1 100 #CHECK: error: invalid operand for instruction 101 #CHECK: ler %f0,%r1 102 #CHECK: error: invalid operand for instruction 103 #CHECK: ler %f0,%a1 104 #CHECK: error: invalid operand for instruction 105 #CHECK: ler %f0,0 106 #CHECK: error: invalid operand for instruction 107 #CHECK: ler %f0,0(%r1) 108 109 ler %r0,%f1 110 ler %a0,%f1 111 ler %f0,%r1 112 ler %f0,%a1 113 ler %f0,0 114 ler %f0,0(%r1) 115 116 # Test FP64 operands 117 # 118 #CHECK: error: invalid operand for instruction 119 #CHECK: ldr %r0,%f1 120 #CHECK: error: invalid operand for instruction 121 #CHECK: ldr %a0,%f1 122 #CHECK: error: invalid operand for instruction 123 #CHECK: ldr %f0,%r1 124 #CHECK: error: invalid operand for instruction 125 #CHECK: ldr %f0,%a1 126 #CHECK: error: invalid operand for instruction 127 #CHECK: ldr %f0,0 128 #CHECK: error: invalid operand for instruction 129 #CHECK: ldr %f0,0(%r1) 130 131 ldr %r0,%f1 132 ldr %a0,%f1 133 ldr %f0,%r1 134 ldr %f0,%a1 135 ldr %f0,0 136 ldr %f0,0(%r1) 137 138 # Test FP128 operands 139 # 140 #CHECK: error: invalid register pair 141 #CHECK: lxr %f2,%f0 142 #CHECK: error: invalid register pair 143 #CHECK: lxr %f0,%f3 144 #CHECK: error: invalid register pair 145 #CHECK: lxr %f6,%f0 146 #CHECK: error: invalid register pair 147 #CHECK: lxr %f0,%f7 148 #CHECK: error: invalid register pair 149 #CHECK: lxr %f10,%f0 150 #CHECK: error: invalid register pair 151 #CHECK: lxr %f0,%f11 152 #CHECK: error: invalid register pair 153 #CHECK: lxr %f14,%f0 154 #CHECK: error: invalid register pair 155 #CHECK: lxr %f0,%f15 156 #CHECK: error: invalid operand for instruction 157 #CHECK: lxr %r0,%f1 158 #CHECK: error: invalid operand for instruction 159 #CHECK: lxr %a0,%f1 160 #CHECK: error: invalid operand for instruction 161 #CHECK: lxr %f0,%r1 162 #CHECK: error: invalid operand for instruction 163 #CHECK: lxr %f0,%a1 164 #CHECK: error: invalid operand for instruction 165 #CHECK: lxr %f0,0 166 #CHECK: error: invalid operand for instruction 167 #CHECK: lxr %f0,0(%r1) 168 169 lxr %f2,%f0 170 lxr %f0,%f3 171 lxr %f6,%f0 172 lxr %f0,%f7 173 lxr %f10,%f0 174 lxr %f0,%f11 175 lxr %f14,%f0 176 lxr %f0,%f15 177 lxr %r0,%f1 178 lxr %a0,%f1 179 lxr %f0,%r1 180 lxr %f0,%a1 181 lxr %f0,0 182 lxr %f0,0(%r1) 183 184 # Test access register operands 185 # 186 #CHECK: error: invalid operand for instruction 187 #CHECK: ear %r0,%r0 188 #CHECK: error: invalid operand for instruction 189 #CHECK: ear %r0,%f0 190 #CHECK: error: invalid operand for instruction 191 #CHECK: ear %r0,0 192 #CHECK: error: invalid operand for instruction 193 #CHECK: ear %r0,0(%r1) 194 195 ear %r0,%r0 196 ear %r0,%f0 197 ear %r0,0 198 ear %r0,0(%r1) 199 200 .cfi_startproc 201 202 # Test general register parsing, with no predetermined class in mind. 203 # 204 #CHECK: error: register expected 205 #CHECK: .cfi_offset r0,0 206 #CHECK: error: invalid register 207 #CHECK: .cfi_offset %,0 208 #CHECK: error: invalid register 209 #CHECK: .cfi_offset %r,0 210 #CHECK: error: invalid register 211 #CHECK: .cfi_offset %f,0 212 #CHECK: error: invalid register 213 #CHECK: .cfi_offset %a,0 214 #CHECK: error: invalid register 215 #CHECK: .cfi_offset %0,0 216 #CHECK: error: invalid register 217 #CHECK: .cfi_offset %c0,0 218 #CHECK: error: invalid register 219 #CHECK: .cfi_offset %r16,0 220 #CHECK: error: invalid register 221 #CHECK: .cfi_offset %f16,0 222 #CHECK: error: invalid register 223 #CHECK: .cfi_offset %a16,0 224 #CHECK: error: invalid register 225 #CHECK: .cfi_offset %reef,0 226 #CHECK: error: invalid register 227 #CHECK: .cfi_offset %arid,0 228 229 .cfi_offset r0,0 230 .cfi_offset %,0 231 .cfi_offset %r,0 232 .cfi_offset %f,0 233 .cfi_offset %a,0 234 .cfi_offset %0,0 235 .cfi_offset %c0,0 236 .cfi_offset %r16,0 237 .cfi_offset %f16,0 238 .cfi_offset %a16,0 239 .cfi_offset %reef,0 240 .cfi_offset %arid,0 241 242 # Test invalid CFI registers. Will need to be updated once access 243 # registers are modelled as LLVM registers. 244 # 245 #CHECK: error: invalid operand for instruction 246 #CHECK: .cfi_offset %a0,0 247 248 .cfi_offset %a0,0 249 250 .cfi_endproc 251 252 #CHECK: error: %r0 used in an address 253 #CHECK: sll %r2,8(%r0) 254 #CHECK: error: %r0 used in an address 255 #CHECK: br %r0 256 #CHECK: error: %r0 used in an address 257 #CHECK: l %r1,8(%r0) 258 #CHECK: error: %r0 used in an address 259 #CHECK: l %r1,8(%r0,%r15) 260 #CHECK: error: %r0 used in an address 261 #CHECK: l %r1,8(%r15,%r0) 262 263 sll %r2,8(%r0) 264 br %r0 265 l %r1,8(%r0) 266 l %r1,8(%r0,%r15) 267 l %r1,8(%r15,%r0) 268