-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RISC-V: Add support for XCVmac extension in CV32E40P
Spec: https://docs.openhwgroup.org/projects/cv32e40p-user-manual/en/latest/instruction_set_extensions.html Contributors: Mary Bennett <[email protected]> Nandni Jamnadas <[email protected]> Pietra Ferreira <[email protected]> Charlie Keaney Jessica Mills Craig Blackmore <[email protected]> Simon Cook <[email protected]> Jeremy Bennett <[email protected]> Helene Chelin <[email protected]> bfd/ChangeLog: * elfxx-riscv.c (riscv_multi_subset_supports): Added `xcvmac` instruction class. (riscv_multi_subset_supports_ext): Likewise. gas/ChangeLog: * config/tc-riscv.c (validate_riscv_insn): Added the necessary operands for the extension. (riscv_ip): Likewise. * doc/c-riscv.texi: Noted XCVmac as an additional ISA extension for CORE-V. * testsuite/gas/riscv/cv-mac-fail-march.d: New test. * testsuite/gas/riscv/cv-mac-fail-march.l: New test. * testsuite/gas/riscv/cv-mac-fail-march.s: New test. * testsuite/gas/riscv/cv-mac-fail-operand.d: New test. * testsuite/gas/riscv/cv-mac-fail-operand.l: New test. * testsuite/gas/riscv/cv-mac-fail-operand.s: New test. * testsuite/gas/riscv/cv-mac-insns.d: New test. * testsuite/gas/riscv/cv-mac-insns.s: New test. opcodes/ChangeLog: * riscv-dis.c (print_insn_args): Disassemble information with the EXTRACT macro implemented. * riscv-opc.c: Defined the MASK and added XCVmac instructions. include/ChangeLog: * opcode/riscv-opc.h: Added corresponding MATCH and MASK macros for XCVmac. * opcode/riscv.h: Added corresponding EXTRACT and ENCODE macros for uimm. (enum riscv_insn_class): Added the XCVmac instruction class.
- Loading branch information
1 parent
7a5fa3d
commit 8feb8d0
Showing
15 changed files
with
641 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#as: -march=rv32i | ||
#source: cv-mac-fail-march.s | ||
#error_output: cv-mac-fail-march.l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.*: Assembler messages: | ||
.*: Error: unrecognized opcode `cv.mac t4,t2,t0', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.msu t4,t2,t0', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.muls t4,t2,t0', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.mulhhs t4,t2,t0', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.mulsn t4,t2,t0,4', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.mulhhsn t4,t2,t0,16', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.mulsrn t4,t2,t0,10', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.mulhhsrn t4,t2,t0,17', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.mulu t4,t2,t0', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.mulhhu t4,t2,t0', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.mulun t4,t2,t0,7', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.mulhhun t4,t2,t0,16', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.mulurn t4,t2,t0,11', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.mulhhurn t4,t2,t0,9', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.macsn t4,t2,t0,24', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.machhsn t4,t2,t0,11', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.macsrn t4,t2,t0,9', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.machhsrn t4,t2,t0,24', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.macun t4,t2,t0,27', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.machhun t4,t2,t0,18', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.macurn t4,t2,t0,25', extension `xcvmac' required | ||
.*: Error: unrecognized opcode `cv.machhurn t4,t2,t0,5', extension `xcvmac' required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Absence of the xcvmac march option disables all CORE-V MAC extensions. | ||
target: | ||
cv.mac t4, t2, t0 | ||
cv.msu t4, t2, t0 | ||
cv.muls t4, t2, t0 | ||
cv.mulhhs t4, t2, t0 | ||
cv.mulsn t4, t2, t0, 4 | ||
cv.mulhhsn t4, t2, t0, 16 | ||
cv.mulsrn t4, t2, t0, 10 | ||
cv.mulhhsrn t4, t2, t0, 17 | ||
cv.mulu t4, t2, t0 | ||
cv.mulhhu t4, t2, t0 | ||
cv.mulun t4, t2, t0, 7 | ||
cv.mulhhun t4, t2, t0, 16 | ||
cv.mulurn t4, t2, t0, 11 | ||
cv.mulhhurn t4, t2, t0, 9 | ||
cv.macsn t4, t2, t0, 24 | ||
cv.machhsn t4, t2, t0, 11 | ||
cv.macsrn t4, t2, t0, 9 | ||
cv.machhsrn t4, t2, t0, 24 | ||
cv.macun t4, t2, t0, 27 | ||
cv.machhun t4, t2, t0, 18 | ||
cv.macurn t4, t2, t0, 25 | ||
cv.machhurn t4, t2, t0, 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#as: -march=rv32i_xcvmac | ||
#source: cv-mac-fail-operand.s | ||
#error_output: cv-mac-fail-operand.l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
.*: Assembler messages: | ||
.*: Error: illegal operands `cv.mac 8,t2,t0' | ||
.*: Error: illegal operands `cv.msu 23,t2,t0' | ||
.*: Error: illegal operands `cv.muls 43,t2,t0' | ||
.*: Error: illegal operands `cv.mulhhs 7,t2,t0' | ||
.*: Error: illegal operands `cv.mulsn 345,t2,t0,4' | ||
.*: Error: illegal operands `cv.mulhhsn 356,t2,t0,16' | ||
.*: Error: illegal operands `cv.mulsrn 867,t2,t0,10' | ||
.*: Error: illegal operands `cv.mulhhsrn 3454,t2,t0,17' | ||
.*: Error: illegal operands `cv.mulu 9,t2,t0' | ||
.*: Error: illegal operands `cv.mulhhu 54,t2,t0' | ||
.*: Error: illegal operands `cv.mulun 965,t2,t0,7' | ||
.*: Error: illegal operands `cv.mulhhun 35,t2,t0,16' | ||
.*: Error: illegal operands `cv.mulurn 87,t2,t0,11' | ||
.*: Error: illegal operands `cv.mulhhurn 38,t2,t0,9' | ||
.*: Error: illegal operands `cv.macsn 985,t2,t0,24' | ||
.*: Error: illegal operands `cv.machhsn 83,t2,t0,11' | ||
.*: Error: illegal operands `cv.macsrn 960,t2,t0,9' | ||
.*: Error: illegal operands `cv.machhsrn 385,t2,t0,24' | ||
.*: Error: illegal operands `cv.macun 58,t2,t0,27' | ||
.*: Error: illegal operands `cv.machhun 6,t2,t0,18' | ||
.*: Error: illegal operands `cv.macurn 35,t2,t0,25' | ||
.*: Error: illegal operands `cv.machhurn 67,t2,t0,5' | ||
.*: Error: illegal operands `cv.mac t4,43,t0' | ||
.*: Error: illegal operands `cv.msu t4,3,t0' | ||
.*: Error: illegal operands `cv.muls t4,345,t0' | ||
.*: Error: illegal operands `cv.mulhhs t4,54,t0' | ||
.*: Error: illegal operands `cv.mulsn t4,4,t0,4' | ||
.*: Error: illegal operands `cv.mulhhsn t4,35,t0,16' | ||
.*: Error: illegal operands `cv.mulsrn t4,53,t0,10' | ||
.*: Error: illegal operands `cv.mulhhsrn t4,4456,t0,17' | ||
.*: Error: illegal operands `cv.mulu t4,868,t0' | ||
.*: Error: illegal operands `cv.mulhhu t4,95,t0' | ||
.*: Error: illegal operands `cv.mulun t4,584,t0,7' | ||
.*: Error: illegal operands `cv.mulhhun t4,37545,t0,16' | ||
.*: Error: illegal operands `cv.mulurn t4,943,t0,11' | ||
.*: Error: illegal operands `cv.mulhhurn t4,34,t0,9' | ||
.*: Error: illegal operands `cv.macsn t4,93,t0,24' | ||
.*: Error: illegal operands `cv.machhsn t4,584,t0,11' | ||
.*: Error: illegal operands `cv.macsrn t4,28,t0,9' | ||
.*: Error: illegal operands `cv.machhsrn t4,9,t0,24' | ||
.*: Error: illegal operands `cv.macun t4,834,t0,27' | ||
.*: Error: illegal operands `cv.machhun t4,92,t0,18' | ||
.*: Error: illegal operands `cv.macurn t4,49,t0,25' | ||
.*: Error: illegal operands `cv.machhurn t4,6,t0,5' | ||
.*: Error: illegal operands `cv.mac t4,t2,344' | ||
.*: Error: illegal operands `cv.msu t4,t2,23' | ||
.*: Error: illegal operands `cv.muls t4,t2,2' | ||
.*: Error: illegal operands `cv.mulhhs t4,t2,8' | ||
.*: Error: illegal operands `cv.mulsn t4,t2,45,4' | ||
.*: Error: illegal operands `cv.mulhhsn t4,t2,655,16' | ||
.*: Error: illegal operands `cv.mulsrn t4,t2,465,10' | ||
.*: Error: illegal operands `cv.mulhhsrn t4,t2,3534,17' | ||
.*: Error: illegal operands `cv.mulu t4,t2,46' | ||
.*: Error: illegal operands `cv.mulhhu t4,t2,35' | ||
.*: Error: illegal operands `cv.mulun t4,t2,67,7' | ||
.*: Error: illegal operands `cv.mulhhun t4,t2,6,16' | ||
.*: Error: illegal operands `cv.mulurn t4,t2,787,11' | ||
.*: Error: illegal operands `cv.mulhhurn t4,t2,3545,9' | ||
.*: Error: illegal operands `cv.macsn t4,t2,6,24' | ||
.*: Error: illegal operands `cv.machhsn t4,t2,765,11' | ||
.*: Error: illegal operands `cv.macsrn t4,t2,45,9' | ||
.*: Error: illegal operands `cv.machhsrn t4,t2,7,24' | ||
.*: Error: illegal operands `cv.macun t4,t2,98,27' | ||
.*: Error: illegal operands `cv.machhun t4,t2,654,18' | ||
.*: Error: illegal operands `cv.macurn t4,t2,900,25' | ||
.*: Error: illegal operands `cv.machhurn t4,t2,354,5' | ||
.*: Error: illegal operands `cv.mulsn t4,t2,t0,-1' | ||
.*: Error: illegal operands `cv.mulhhsn t4,t2,t0,-1' | ||
.*: Error: illegal operands `cv.mulsrn t4,t2,t0,-1' | ||
.*: Error: illegal operands `cv.mulhhsrn t4,t2,t0,-1' | ||
.*: Error: illegal operands `cv.mulun t4,t2,t0,-1' | ||
.*: Error: illegal operands `cv.mulhhun t4,t2,t0,-1' | ||
.*: Error: illegal operands `cv.mulurn t4,t2,t0,-1' | ||
.*: Error: illegal operands `cv.mulhhurn t4,t2,t0,-1' | ||
.*: Error: illegal operands `cv.macsn t4,t2,t0,-1' | ||
.*: Error: illegal operands `cv.machhsn t4,t2,t0,-1' | ||
.*: Error: illegal operands `cv.macsrn t4,t2,t0,-1' | ||
.*: Error: illegal operands `cv.machhsrn t4,t2,t0,-1' | ||
.*: Error: illegal operands `cv.macun t4,t2,t0,-1' | ||
.*: Error: illegal operands `cv.machhun t4,t2,t0,-1' | ||
.*: Error: illegal operands `cv.macurn t4,t2,t0,-1' | ||
.*: Error: illegal operands `cv.machhurn t4,t2,t0,-1' | ||
.*: Error: illegal operands `cv.mulsn t4,t2,t0,-43' | ||
.*: Error: illegal operands `cv.mulhhsn t4,t2,t0,-531' | ||
.*: Error: illegal operands `cv.mulsrn t4,t2,t0,-4454' | ||
.*: Error: illegal operands `cv.mulhhsrn t4,t2,t0,-32' | ||
.*: Error: illegal operands `cv.mulun t4,t2,t0,-23' | ||
.*: Error: illegal operands `cv.mulhhun t4,t2,t0,-459' | ||
.*: Error: illegal operands `cv.mulurn t4,t2,t0,-549' | ||
.*: Error: illegal operands `cv.mulhhurn t4,t2,t0,-32' | ||
.*: Error: illegal operands `cv.macsn t4,t2,t0,-223' | ||
.*: Error: illegal operands `cv.machhsn t4,t2,t0,-56' | ||
.*: Error: illegal operands `cv.macsrn t4,t2,t0,-8' | ||
.*: Error: illegal operands `cv.machhsrn t4,t2,t0,-2' | ||
.*: Error: illegal operands `cv.macun t4,t2,t0,-432' | ||
.*: Error: illegal operands `cv.machhun t4,t2,t0,-1245' | ||
.*: Error: illegal operands `cv.macurn t4,t2,t0,-45' | ||
.*: Error: illegal operands `cv.machhurn t4,t2,t0,-354' | ||
.*: Error: illegal operands `cv.mulsn t4,t2,t0,32' | ||
.*: Error: illegal operands `cv.mulhhsn t4,t2,t0,32' | ||
.*: Error: illegal operands `cv.mulsrn t4,t2,t0,32' | ||
.*: Error: illegal operands `cv.mulhhsrn t4,t2,t0,32' | ||
.*: Error: illegal operands `cv.mulun t4,t2,t0,32' | ||
.*: Error: illegal operands `cv.mulhhun t4,t2,t0,32' | ||
.*: Error: illegal operands `cv.mulurn t4,t2,t0,32' | ||
.*: Error: illegal operands `cv.mulhhurn t4,t2,t0,32' | ||
.*: Error: illegal operands `cv.macsn t4,t2,t0,32' | ||
.*: Error: illegal operands `cv.machhsn t4,t2,t0,32' | ||
.*: Error: illegal operands `cv.macsrn t4,t2,t0,32' | ||
.*: Error: illegal operands `cv.machhsrn t4,t2,t0,32' | ||
.*: Error: illegal operands `cv.macun t4,t2,t0,32' | ||
.*: Error: illegal operands `cv.machhun t4,t2,t0,32' | ||
.*: Error: illegal operands `cv.macurn t4,t2,t0,32' | ||
.*: Error: illegal operands `cv.machhurn t4,t2,t0,32' | ||
.*: Error: illegal operands `cv.mulsn t4,t2,t0,325' | ||
.*: Error: illegal operands `cv.mulhhsn t4,t2,t0,531' | ||
.*: Error: illegal operands `cv.mulsrn t4,t2,t0,4454' | ||
.*: Error: illegal operands `cv.mulhhsrn t4,t2,t0,254' | ||
.*: Error: illegal operands `cv.mulun t4,t2,t0,76' | ||
.*: Error: illegal operands `cv.mulhhun t4,t2,t0,459' | ||
.*: Error: illegal operands `cv.mulurn t4,t2,t0,549' | ||
.*: Error: illegal operands `cv.mulhhurn t4,t2,t0,5364' | ||
.*: Error: illegal operands `cv.macsn t4,t2,t0,34435' | ||
.*: Error: illegal operands `cv.machhsn t4,t2,t0,56' | ||
.*: Error: illegal operands `cv.macsrn t4,t2,t0,3423' | ||
.*: Error: illegal operands `cv.machhsrn t4,t2,t0,365' | ||
.*: Error: illegal operands `cv.macun t4,t2,t0,432' | ||
.*: Error: illegal operands `cv.machhun t4,t2,t0,1245' | ||
.*: Error: illegal operands `cv.macurn t4,t2,t0,45' | ||
.*: Error: instruction cv.mulsn requires absolute expression | ||
.*: Error: instruction cv.mulhhsn requires absolute expression | ||
.*: Error: instruction cv.mulsrn requires absolute expression | ||
.*: Error: instruction cv.mulhhsrn requires absolute expression | ||
.*: Error: instruction cv.mulun requires absolute expression | ||
.*: Error: instruction cv.mulhhun requires absolute expression | ||
.*: Error: instruction cv.mulurn requires absolute expression | ||
.*: Error: instruction cv.mulhhurn requires absolute expression | ||
.*: Error: instruction cv.macsn requires absolute expression | ||
.*: Error: instruction cv.machhsn requires absolute expression | ||
.*: Error: instruction cv.macsrn requires absolute expression | ||
.*: Error: instruction cv.machhsrn requires absolute expression | ||
.*: Error: instruction cv.macun requires absolute expression | ||
.*: Error: instruction cv.machhun requires absolute expression | ||
.*: Error: instruction cv.macurn requires absolute expression | ||
.*: Error: instruction cv.machhurn requires absolute expression | ||
.*: Error: illegal operands `cv.machhurn t4,t2,t0,354' |
Oops, something went wrong.