brintos

brintos / llvm-project-archived public Read only

0
0
Text · 12.3 KiB · a795bc3 Raw
309 lines · plain
1# RUN: llvm-mc -triple=riscv32 --mattr=+xcvmac -M no-aliases -show-encoding %s \2# RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR3# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+xcvmac < %s \4# RUN:     | llvm-objdump --mattr=+xcvmac --no-print-imm-hex -M no-aliases -d -r - \5# RUN:     | FileCheck --check-prefix=CHECK-INSTR %s6# RUN: not llvm-mc -triple riscv32 %s 2>&1 \7# RUN:     | FileCheck -check-prefix=CHECK-NO-EXT %s8 9cv.mac t0, t1, t210# CHECK-INSTR: cv.mac t0, t1, t211# CHECK-ENCODING: [0xab,0x32,0x73,0x90]12# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}13 14cv.mac t0, t1, zero15# CHECK-INSTR: cv.mac t0, t1, zero16# CHECK-ENCODING: [0xab,0x32,0x03,0x90]17# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}18 19cv.machhsn t0, t1, t2, 020# CHECK-INSTR: cv.machhsn t0, t1, t2, 021# CHECK-ENCODING: [0xdb,0x62,0x73,0x40]22# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}23 24cv.machhsn t0, t1, zero, 1625# CHECK-INSTR: cv.machhsn t0, t1, zero, 1626# CHECK-ENCODING: [0xdb,0x62,0x03,0x60]27# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}28 29cv.machhsn t0, t1, zero, 3130# CHECK-INSTR: cv.machhsn t0, t1, zero, 3131# CHECK-ENCODING: [0xdb,0x62,0x03,0x7e]32# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}33 34cv.machhsrn t0, t1, t2, 035# CHECK-INSTR: cv.machhsrn t0, t1, t2, 036# CHECK-ENCODING: [0xdb,0x62,0x73,0xc0]37# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}38 39cv.machhsrn t0, t1, zero, 1640# CHECK-INSTR: cv.machhsrn t0, t1, zero, 1641# CHECK-ENCODING: [0xdb,0x62,0x03,0xe0]42# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}43 44cv.machhsrn t0, t1, zero, 3145# CHECK-INSTR: cv.machhsrn t0, t1, zero, 3146# CHECK-ENCODING: [0xdb,0x62,0x03,0xfe]47# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}48 49cv.machhun t0, t1, t2, 050# CHECK-INSTR: cv.machhun t0, t1, t2, 051# CHECK-ENCODING: [0xdb,0x72,0x73,0x40]52# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}53 54cv.machhun t0, t1, zero, 1655# CHECK-INSTR: cv.machhun t0, t1, zero, 1656# CHECK-ENCODING: [0xdb,0x72,0x03,0x60]57# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}58 59cv.machhun t0, t1, zero, 3160# CHECK-INSTR: cv.machhun t0, t1, zero, 3161# CHECK-ENCODING: [0xdb,0x72,0x03,0x7e]62# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}63 64cv.machhurn t0, t1, t2, 065# CHECK-INSTR: cv.machhurn t0, t1, t2, 066# CHECK-ENCODING: [0xdb,0x72,0x73,0xc0]67# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}68 69cv.machhurn t0, t1, zero, 1670# CHECK-INSTR: cv.machhurn t0, t1, zero, 1671# CHECK-ENCODING: [0xdb,0x72,0x03,0xe0]72# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}73 74cv.machhurn t0, t1, zero, 3175# CHECK-INSTR: cv.machhurn t0, t1, zero, 3176# CHECK-ENCODING: [0xdb,0x72,0x03,0xfe]77# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}78 79cv.macsn t0, t1, t2, 080# CHECK-INSTR: cv.macsn t0, t1, t2, 081# CHECK-ENCODING: [0xdb,0x62,0x73,0x00]82# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}83 84cv.macsn t0, t1, zero, 1685# CHECK-INSTR: cv.macsn t0, t1, zero, 1686# CHECK-ENCODING: [0xdb,0x62,0x03,0x20]87# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}88 89cv.macsn t0, t1, zero, 3190# CHECK-INSTR: cv.macsn t0, t1, zero, 3191# CHECK-ENCODING: [0xdb,0x62,0x03,0x3e]92# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}93 94cv.macsrn t0, t1, t2, 095# CHECK-INSTR: cv.macsrn t0, t1, t2, 096# CHECK-ENCODING: [0xdb,0x62,0x73,0x80]97# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}98 99cv.macsrn t0, t1, zero, 16100# CHECK-INSTR: cv.macsrn t0, t1, zero, 16101# CHECK-ENCODING: [0xdb,0x62,0x03,0xa0]102# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}103 104cv.macsrn t0, t1, zero, 31105# CHECK-INSTR: cv.macsrn t0, t1, zero, 31106# CHECK-ENCODING: [0xdb,0x62,0x03,0xbe]107# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}108 109cv.macun t0, t1, t2, 0110# CHECK-INSTR: cv.macun t0, t1, t2, 0111# CHECK-ENCODING: [0xdb,0x72,0x73,0x00]112# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}113 114cv.macun t0, t1, zero, 16115# CHECK-INSTR: cv.macun t0, t1, zero, 16116# CHECK-ENCODING: [0xdb,0x72,0x03,0x20]117# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}118 119cv.macun t0, t1, zero, 31120# CHECK-INSTR: cv.macun t0, t1, zero, 31121# CHECK-ENCODING: [0xdb,0x72,0x03,0x3e]122# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}123 124cv.macurn t0, t1, t2, 0125# CHECK-INSTR: cv.macurn t0, t1, t2, 0126# CHECK-ENCODING: [0xdb,0x72,0x73,0x80]127# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}128 129cv.macurn t0, t1, zero, 16130# CHECK-INSTR: cv.macurn t0, t1, zero, 16131# CHECK-ENCODING: [0xdb,0x72,0x03,0xa0]132# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}133 134cv.macurn t0, t1, zero, 31135# CHECK-INSTR: cv.macurn t0, t1, zero, 31136# CHECK-ENCODING: [0xdb,0x72,0x03,0xbe]137# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}138 139cv.msu t0, t1, t2140# CHECK-INSTR: cv.msu t0, t1, t2141# CHECK-ENCODING: [0xab,0x32,0x73,0x92]142# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}143 144cv.msu t0, t1, zero145# CHECK-INSTR: cv.msu t0, t1, zero146# CHECK-ENCODING: [0xab,0x32,0x03,0x92]147# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}148 149cv.mulhhs t0, t1, t2150# CHECK-INSTR: cv.mulhhsn t0, t1, t2, 0151# CHECK-ENCODING: [0xdb,0x42,0x73,0x40]152# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}153 154cv.mulhhs t0, t1, zero155# CHECK-INSTR: cv.mulhhsn t0, t1, zero, 0156# CHECK-ENCODING: [0xdb,0x42,0x03,0x40]157# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}158 159cv.mulhhsn t0, t1, t2, 0160# CHECK-INSTR: cv.mulhhsn t0, t1, t2, 0161# CHECK-ENCODING: [0xdb,0x42,0x73,0x40]162# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}163 164cv.mulhhsn t0, t1, zero, 16165# CHECK-INSTR: cv.mulhhsn t0, t1, zero, 16166# CHECK-ENCODING: [0xdb,0x42,0x03,0x60]167# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}168 169cv.mulhhsn t0, t1, zero, 31170# CHECK-INSTR: cv.mulhhsn t0, t1, zero, 31171# CHECK-ENCODING: [0xdb,0x42,0x03,0x7e]172# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}173 174cv.mulhhsrn t0, t1, t2, 0175# CHECK-INSTR: cv.mulhhsrn t0, t1, t2, 0176# CHECK-ENCODING: [0xdb,0x42,0x73,0xc0]177# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}178 179cv.mulhhsrn t0, t1, zero, 16180# CHECK-INSTR: cv.mulhhsrn t0, t1, zero, 16181# CHECK-ENCODING: [0xdb,0x42,0x03,0xe0]182# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}183 184cv.mulhhsrn t0, t1, zero, 31185# CHECK-INSTR: cv.mulhhsrn t0, t1, zero, 31186# CHECK-ENCODING: [0xdb,0x42,0x03,0xfe]187# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}188 189cv.mulhhu t0, t1, t2190# CHECK-INSTR: cv.mulhhun t0, t1, t2, 0191# CHECK-ENCODING: [0xdb,0x52,0x73,0x40]192# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}193 194cv.mulhhu t0, t1, zero195# CHECK-INSTR: cv.mulhhun t0, t1, zero, 0196# CHECK-ENCODING: [0xdb,0x52,0x03,0x40]197# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}198 199cv.mulhhun t0, t1, t2, 0200# CHECK-INSTR: cv.mulhhun t0, t1, t2, 0201# CHECK-ENCODING: [0xdb,0x52,0x73,0x40]202# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}203 204 205cv.mulhhun t0, t1, zero, 16206# CHECK-INSTR: cv.mulhhun t0, t1, zero, 16207# CHECK-ENCODING: [0xdb,0x52,0x03,0x60]208# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}209 210cv.mulhhun t0, t1, zero, 31211# CHECK-INSTR: cv.mulhhun t0, t1, zero, 31212# CHECK-ENCODING: [0xdb,0x52,0x03,0x7e]213# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}214 215cv.mulhhurn t0, t1, t2, 0216# CHECK-INSTR: cv.mulhhurn t0, t1, t2, 0217# CHECK-ENCODING: [0xdb,0x52,0x73,0xc0]218# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}219 220cv.mulhhurn t0, t1, zero, 16221# CHECK-INSTR: cv.mulhhurn t0, t1, zero, 16222# CHECK-ENCODING: [0xdb,0x52,0x03,0xe0]223# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}224 225cv.mulhhurn t0, t1, zero, 31226# CHECK-INSTR: cv.mulhhurn t0, t1, zero, 31227# CHECK-ENCODING: [0xdb,0x52,0x03,0xfe]228# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}229 230cv.muls t0, t1, t2231# CHECK-INSTR: cv.mulsn t0, t1, t2, 0232# CHECK-ENCODING: [0xdb,0x42,0x73,0x00]233# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}234 235cv.muls t0, t1, zero236# CHECK-INSTR: cv.mulsn t0, t1, zero, 0237# CHECK-ENCODING: [0xdb,0x42,0x03,0x00]238# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}239 240cv.mulsn t0, t1, t2, 0241# CHECK-INSTR: cv.mulsn t0, t1, t2, 0242# CHECK-ENCODING: [0xdb,0x42,0x73,0x00]243# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}244 245cv.mulsn t0, t1, zero, 16246# CHECK-INSTR: cv.mulsn t0, t1, zero, 16247# CHECK-ENCODING: [0xdb,0x42,0x03,0x20]248# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}249 250cv.mulsn t0, t1, zero, 31251# CHECK-INSTR: cv.mulsn t0, t1, zero, 31252# CHECK-ENCODING: [0xdb,0x42,0x03,0x3e]253# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}254 255cv.mulsrn t0, t1, t2, 0256# CHECK-INSTR: cv.mulsrn t0, t1, t2, 0257# CHECK-ENCODING: [0xdb,0x42,0x73,0x80]258# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}259 260cv.mulsrn t0, t1, zero, 16261# CHECK-INSTR: cv.mulsrn t0, t1, zero, 16262# CHECK-ENCODING: [0xdb,0x42,0x03,0xa0]263# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}264 265cv.mulsrn t0, t1, zero, 31266# CHECK-INSTR: cv.mulsrn t0, t1, zero, 31267# CHECK-ENCODING: [0xdb,0x42,0x03,0xbe]268# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}269 270cv.mulu t0, t1, t2271# CHECK-INSTR: cv.mulun t0, t1, t2, 0272# CHECK-ENCODING: [0xdb,0x52,0x73,0x00]273# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}274 275cv.mulu t0, t1, zero276# CHECK-INSTR: cv.mulun t0, t1, zero, 0277# CHECK-ENCODING: [0xdb,0x52,0x03,0x00]278# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}279 280cv.mulun t0, t1, t2, 0281# CHECK-INSTR: cv.mulun t0, t1, t2, 0282# CHECK-ENCODING: [0xdb,0x52,0x73,0x00]283# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}284 285cv.mulun t0, t1, zero, 16286# CHECK-INSTR: cv.mulun t0, t1, zero, 16287# CHECK-ENCODING: [0xdb,0x52,0x03,0x20]288# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}289 290cv.mulun t0, t1, zero, 31291# CHECK-INSTR: cv.mulun t0, t1, zero, 31292# CHECK-ENCODING: [0xdb,0x52,0x03,0x3e]293# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}294 295cv.mulurn t0, t1, t2, 0296# CHECK-INSTR: cv.mulurn t0, t1, t2, 0297# CHECK-ENCODING: [0xdb,0x52,0x73,0x80]298# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}299 300cv.mulurn t0, t1, zero, 16301# CHECK-INSTR: cv.mulurn t0, t1, zero, 16302# CHECK-ENCODING: [0xdb,0x52,0x03,0xa0]303# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}304 305cv.mulurn t0, t1, zero, 31306# CHECK-INSTR: cv.mulurn t0, t1, zero, 31307# CHECK-ENCODING: [0xdb,0x52,0x03,0xbe]308# CHECK-NO-EXT: instruction requires the following: 'XCVmac' (CORE-V Multiply-Accumulate){{$}}309