477 lines · plain
1# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvmac %s 2>&1 \2# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR3 4cv.mac t0, t1, 05# CHECK-ERROR: invalid operand for instruction6 7cv.mac t0, 0, t28# CHECK-ERROR: invalid operand for instruction9 10cv.mac 0, t1, t211# CHECK-ERROR: invalid operand for instruction12 13cv.mac t0, t114# CHECK-ERROR: too few operands for instruction15 16cv.mac t0, t1, t2, t417# CHECK-ERROR: invalid operand for instruction18 19cv.machhsn t0, t1, t2, -120# CHECK-ERROR: immediate must be an integer in the range [0, 31]21 22cv.machhsn t0, t1, t2, 3223# CHECK-ERROR: immediate must be an integer in the range [0, 31]24 25cv.machhsn t0, t1, t2, a026# CHECK-ERROR: immediate must be an integer in the range [0, 31]27 28cv.machhsn t0, t1, 0, 029# CHECK-ERROR: invalid operand for instruction30 31cv.machhsn t0, 0, t2, 032# CHECK-ERROR: invalid operand for instruction33 34cv.machhsn 0, t1, t2, 035# CHECK-ERROR: invalid operand for instruction36 37cv.machhsn t0, t1, t238# CHECK-ERROR: too few operands for instruction39 40cv.machhsn t0, t1, t2, 0, a041# CHECK-ERROR: invalid operand for instruction42 43cv.machhsrn t0, t1, t2, -144# CHECK-ERROR: immediate must be an integer in the range [0, 31]45 46cv.machhsrn t0, t1, t2, 3247# CHECK-ERROR: immediate must be an integer in the range [0, 31]48 49cv.machhsrn t0, t1, t2, a050# CHECK-ERROR: immediate must be an integer in the range [0, 31]51 52cv.machhsrn t0, t1, 0, 053# CHECK-ERROR: invalid operand for instruction54 55cv.machhsrn t0, 0, t2, 056# CHECK-ERROR: invalid operand for instruction57 58cv.machhsrn 0, t1, t2, 059# CHECK-ERROR: invalid operand for instruction60 61cv.machhsrn t0, t1, t262# CHECK-ERROR: too few operands for instruction63 64cv.machhsrn t0, t1, t2, 0, a065# CHECK-ERROR: invalid operand for instruction66 67cv.machhun t0, t1, t2, -168# CHECK-ERROR: immediate must be an integer in the range [0, 31]69 70cv.machhun t0, t1, t2, 3271# CHECK-ERROR: immediate must be an integer in the range [0, 31]72 73cv.machhun t0, t1, t2, a074# CHECK-ERROR: immediate must be an integer in the range [0, 31]75 76cv.machhun t0, t1, 0, 077# CHECK-ERROR: invalid operand for instruction78 79cv.machhun t0, 0, t2, 080# CHECK-ERROR: invalid operand for instruction81 82cv.machhun 0, t1, t2, 083# CHECK-ERROR: invalid operand for instruction84 85cv.machhun t0, t1, t286# CHECK-ERROR: too few operands for instruction87 88cv.machhun t0, t1, t2, 0, a089# CHECK-ERROR: invalid operand for instruction90 91cv.machhurn t0, t1, t2, -192# CHECK-ERROR: immediate must be an integer in the range [0, 31]93 94cv.machhurn t0, t1, t2, 3295# CHECK-ERROR: immediate must be an integer in the range [0, 31]96 97cv.machhurn t0, t1, t2, a098# CHECK-ERROR: immediate must be an integer in the range [0, 31]99 100cv.machhurn t0, t1, 0, 0101# CHECK-ERROR: invalid operand for instruction102 103cv.machhurn t0, 0, t2, 0104# CHECK-ERROR: invalid operand for instruction105 106cv.machhurn 0, t1, t2, 0107# CHECK-ERROR: invalid operand for instruction108 109cv.machhurn t0, t1, t2110# CHECK-ERROR: too few operands for instruction111 112cv.machhurn t0, t1, t2, 0, a0113# CHECK-ERROR: invalid operand for instruction114 115cv.macsn t0, t1, t2, -1116# CHECK-ERROR: immediate must be an integer in the range [0, 31]117 118cv.macsn t0, t1, t2, 32119# CHECK-ERROR: immediate must be an integer in the range [0, 31]120 121cv.macsn t0, t1, t2, a0122# CHECK-ERROR: immediate must be an integer in the range [0, 31]123 124cv.macsn t0, t1, 0, 0125# CHECK-ERROR: invalid operand for instruction126 127cv.macsn t0, 0, t2, 0128# CHECK-ERROR: invalid operand for instruction129 130cv.macsn 0, t1, t2, 0131# CHECK-ERROR: invalid operand for instruction132 133cv.macsn t0, t1, t2134# CHECK-ERROR: too few operands for instruction135 136cv.macsn t0, t1, t2, 0, a0137# CHECK-ERROR: invalid operand for instruction138 139cv.macsrn t0, t1, t2, -1140# CHECK-ERROR: immediate must be an integer in the range [0, 31]141 142cv.macsrn t0, t1, t2, 32143# CHECK-ERROR: immediate must be an integer in the range [0, 31]144 145cv.macsrn t0, t1, t2, a0146# CHECK-ERROR: immediate must be an integer in the range [0, 31]147 148cv.macsrn t0, t1, 0, 0149# CHECK-ERROR: invalid operand for instruction150 151cv.macsrn t0, 0, t2, 0152# CHECK-ERROR: invalid operand for instruction153 154cv.macsrn 0, t1, t2, 0155# CHECK-ERROR: invalid operand for instruction156 157cv.macsrn t0, t1, t2158# CHECK-ERROR: too few operands for instruction159 160cv.macsrn t0, t1, t2, 0, a0161# CHECK-ERROR: invalid operand for instruction162 163cv.macun t0, t1, t2, -1164# CHECK-ERROR: immediate must be an integer in the range [0, 31]165 166cv.macun t0, t1, t2, 32167# CHECK-ERROR: immediate must be an integer in the range [0, 31]168 169cv.macun t0, t1, t2, a0170# CHECK-ERROR: immediate must be an integer in the range [0, 31]171 172cv.macun t0, t1, 0, 0173# CHECK-ERROR: invalid operand for instruction174 175cv.macun t0, 0, t2, 0176# CHECK-ERROR: invalid operand for instruction177 178cv.macun 0, t1, t2, 0179# CHECK-ERROR: invalid operand for instruction180 181cv.macun t0, t1, t2182# CHECK-ERROR: too few operands for instruction183 184cv.macun t0, t1, t2, 0, a0185# CHECK-ERROR: invalid operand for instruction186 187cv.macurn t0, t1, t2, -1188# CHECK-ERROR: immediate must be an integer in the range [0, 31]189 190cv.macurn t0, t1, t2, 32191# CHECK-ERROR: immediate must be an integer in the range [0, 31]192 193cv.macurn t0, t1, t2, a0194# CHECK-ERROR: immediate must be an integer in the range [0, 31]195 196cv.macurn t0, t1, 0, 0197# CHECK-ERROR: invalid operand for instruction198 199cv.macurn t0, 0, t2, 0200# CHECK-ERROR: invalid operand for instruction201 202cv.macurn 0, t1, t2, 0203# CHECK-ERROR: invalid operand for instruction204 205cv.macurn t0, t1, t2206# CHECK-ERROR: too few operands for instruction207 208cv.macurn t0, t1, t2, 0, a0209# CHECK-ERROR: invalid operand for instruction210 211cv.msu t0, t1, 0212# CHECK-ERROR: invalid operand for instruction213 214cv.msu t0, 0, t2215# CHECK-ERROR: invalid operand for instruction216 217cv.msu 0, t1, t2218# CHECK-ERROR: invalid operand for instruction219 220cv.msu t0, t1221# CHECK-ERROR: too few operands for instruction222 223cv.msu t0, t1, t2, t4224# CHECK-ERROR: invalid operand for instruction225 226cv.mulhhs t0, t1, 0227# CHECK-ERROR: invalid operand for instruction228 229cv.mulhhs t0, 0, t2230# CHECK-ERROR: invalid operand for instruction231 232cv.mulhhs 0, t1, t2233# CHECK-ERROR: invalid operand for instruction234 235cv.mulhhs t0, t1236# CHECK-ERROR: too few operands for instruction237 238cv.mulhhs t0, t1, t2, t4239# CHECK-ERROR: invalid operand for instruction240 241cv.mulhhsn t0, t1, t2, -1242# CHECK-ERROR: immediate must be an integer in the range [0, 31]243 244cv.mulhhsn t0, t1, t2, 32245# CHECK-ERROR: immediate must be an integer in the range [0, 31]246 247cv.mulhhsn t0, t1, t2, a0248# CHECK-ERROR: immediate must be an integer in the range [0, 31]249 250cv.mulhhsn t0, t1, 0, 0251# CHECK-ERROR: invalid operand for instruction252 253cv.mulhhsn t0, 0, t2, 0254# CHECK-ERROR: invalid operand for instruction255 256cv.mulhhsn 0, t1, t2, 0257# CHECK-ERROR: invalid operand for instruction258 259cv.mulhhsn t0, t1, t2260# CHECK-ERROR: too few operands for instruction261 262cv.mulhhsn t0, t1, t2, 0, a0263# CHECK-ERROR: invalid operand for instruction264 265cv.mulhhsrn t0, t1, t2, -1266# CHECK-ERROR: immediate must be an integer in the range [0, 31]267 268cv.mulhhsrn t0, t1, t2, 32269# CHECK-ERROR: immediate must be an integer in the range [0, 31]270 271cv.mulhhsrn t0, t1, t2, a0272# CHECK-ERROR: immediate must be an integer in the range [0, 31]273 274cv.mulhhsrn t0, t1, 0, 0275# CHECK-ERROR: invalid operand for instruction276 277cv.mulhhsrn t0, 0, t2, 0278# CHECK-ERROR: invalid operand for instruction279 280cv.mulhhsrn 0, t1, t2, 0281# CHECK-ERROR: invalid operand for instruction282 283cv.mulhhsrn t0, t1, t2284# CHECK-ERROR: too few operands for instruction285 286cv.mulhhsrn t0, t1, t2, 0, a0287# CHECK-ERROR: invalid operand for instruction288 289cv.mulhhu t0, t1, 0290# CHECK-ERROR: invalid operand for instruction291 292cv.mulhhu t0, 0, t2293# CHECK-ERROR: invalid operand for instruction294 295cv.mulhhu 0, t1, t2296# CHECK-ERROR: invalid operand for instruction297 298cv.mulhhu t0, t1299# CHECK-ERROR: too few operands for instruction300 301cv.mulhhu t0, t1, t2, t4302# CHECK-ERROR: invalid operand for instruction303 304cv.mulhhun t0, t1, t2, -1305# CHECK-ERROR: immediate must be an integer in the range [0, 31]306 307cv.mulhhun t0, t1, t2, 32308# CHECK-ERROR: immediate must be an integer in the range [0, 31]309 310cv.mulhhun t0, t1, t2, a0311# CHECK-ERROR: immediate must be an integer in the range [0, 31]312 313cv.mulhhun t0, t1, 0, 0314# CHECK-ERROR: invalid operand for instruction315 316cv.mulhhun t0, 0, t2, 0317# CHECK-ERROR: invalid operand for instruction318 319cv.mulhhun 0, t1, t2, 0320# CHECK-ERROR: invalid operand for instruction321 322cv.mulhhun t0, t1, t2323# CHECK-ERROR: too few operands for instruction324 325cv.mulhhun t0, t1, t2, 0, a0326# CHECK-ERROR: invalid operand for instruction327 328cv.mulhhurn t0, t1, t2, -1329# CHECK-ERROR: immediate must be an integer in the range [0, 31]330 331cv.mulhhurn t0, t1, t2, 32332# CHECK-ERROR: immediate must be an integer in the range [0, 31]333 334cv.mulhhurn t0, t1, t2, a0335# CHECK-ERROR: immediate must be an integer in the range [0, 31]336 337cv.mulhhurn t0, t1, 0, 0338# CHECK-ERROR: invalid operand for instruction339 340cv.mulhhurn t0, 0, t2, 0341# CHECK-ERROR: invalid operand for instruction342 343cv.mulhhurn 0, t1, t2, 0344# CHECK-ERROR: invalid operand for instruction345 346cv.mulhhurn t0, t1, t2347# CHECK-ERROR: too few operands for instruction348 349cv.mulhhurn t0, t1, t2, 0, a0350# CHECK-ERROR: invalid operand for instruction351 352cv.muls t0, t1, 0353# CHECK-ERROR: invalid operand for instruction354 355cv.muls t0, 0, t2356# CHECK-ERROR: invalid operand for instruction357 358cv.muls 0, t1, t2359# CHECK-ERROR: invalid operand for instruction360 361cv.muls t0, t1362# CHECK-ERROR: too few operands for instruction363 364cv.muls t0, t1, t2, t4365# CHECK-ERROR: invalid operand for instruction366 367cv.mulsn t0, t1, t2, -1368# CHECK-ERROR: immediate must be an integer in the range [0, 31]369 370cv.mulsn t0, t1, t2, 32371# CHECK-ERROR: immediate must be an integer in the range [0, 31]372 373cv.mulsn t0, t1, t2, a0374# CHECK-ERROR: immediate must be an integer in the range [0, 31]375 376cv.mulsn t0, t1, 0, 0377# CHECK-ERROR: invalid operand for instruction378 379cv.mulsn t0, 0, t2, 0380# CHECK-ERROR: invalid operand for instruction381 382cv.mulsn 0, t1, t2, 0383# CHECK-ERROR: invalid operand for instruction384 385cv.mulsn t0, t1, t2386# CHECK-ERROR: too few operands for instruction387 388cv.mulsn t0, t1, t2, 0, a0389# CHECK-ERROR: invalid operand for instruction390 391cv.mulsrn t0, t1, t2, -1392# CHECK-ERROR: immediate must be an integer in the range [0, 31]393 394cv.mulsrn t0, t1, t2, 32395# CHECK-ERROR: immediate must be an integer in the range [0, 31]396 397cv.mulsrn t0, t1, t2, a0398# CHECK-ERROR: immediate must be an integer in the range [0, 31]399 400cv.mulsrn t0, t1, 0, 0401# CHECK-ERROR: invalid operand for instruction402 403cv.mulsrn t0, 0, t2, 0404# CHECK-ERROR: invalid operand for instruction405 406cv.mulsrn 0, t1, t2, 0407# CHECK-ERROR: invalid operand for instruction408 409cv.mulsrn t0, t1, t2410# CHECK-ERROR: too few operands for instruction411 412cv.mulsrn t0, t1, t2, 0, a0413# CHECK-ERROR: invalid operand for instruction414 415cv.mulu t0, t1, 0416# CHECK-ERROR: invalid operand for instruction417 418cv.mulu t0, 0, t2419# CHECK-ERROR: invalid operand for instruction420 421cv.mulu 0, t1, t2422# CHECK-ERROR: invalid operand for instruction423 424cv.mulu t0, t1425# CHECK-ERROR: too few operands for instruction426 427cv.mulu t0, t1, t2, t4428# CHECK-ERROR: invalid operand for instruction429 430cv.mulun t0, t1, t2, -1431# CHECK-ERROR: immediate must be an integer in the range [0, 31]432 433cv.mulun t0, t1, t2, 32434# CHECK-ERROR: immediate must be an integer in the range [0, 31]435 436cv.mulun t0, t1, t2, a0437# CHECK-ERROR: immediate must be an integer in the range [0, 31]438 439cv.mulun t0, t1, 0, 0440# CHECK-ERROR: invalid operand for instruction441 442cv.mulun t0, 0, t2, 0443# CHECK-ERROR: invalid operand for instruction444 445cv.mulun 0, t1, t2, 0446# CHECK-ERROR: invalid operand for instruction447 448cv.mulun t0, t1, t2449# CHECK-ERROR: too few operands for instruction450 451cv.mulun t0, t1, t2, 0, a0452# CHECK-ERROR: invalid operand for instruction453 454cv.mulurn t0, t1, t2, -1455# CHECK-ERROR: immediate must be an integer in the range [0, 31]456 457cv.mulurn t0, t1, t2, 32458# CHECK-ERROR: immediate must be an integer in the range [0, 31]459 460cv.mulurn t0, t1, t2, a0461# CHECK-ERROR: immediate must be an integer in the range [0, 31]462 463cv.mulurn t0, t1, 0, 0464# CHECK-ERROR: invalid operand for instruction465 466cv.mulurn t0, 0, t2, 0467# CHECK-ERROR: invalid operand for instruction468 469cv.mulurn 0, t1, t2, 0470# CHECK-ERROR: invalid operand for instruction471 472cv.mulurn t0, t1, t2473# CHECK-ERROR: too few operands for instruction474 475cv.mulurn t0, t1, t2, 0, a0476# CHECK-ERROR: invalid operand for instruction477