diff options
author | R <rqou00@gmail.com> | 2024-07-11 04:10:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-11 11:10:02 +0800 |
commit | 3c5f929ad093a2053b3194474609f1fc3eb15431 (patch) | |
tree | b74fa7ec28d833d396ec1f9d6359919f9f921349 /llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp | |
parent | c5e5088033fed170068d818c54af6862e449b545 (diff) | |
download | llvm-3c5f929ad093a2053b3194474609f1fc3eb15431.zip llvm-3c5f929ad093a2053b3194474609f1fc3eb15431.tar.gz llvm-3c5f929ad093a2053b3194474609f1fc3eb15431.tar.bz2 |
[RISCV] Add QingKe "XW" compressed opcode extension (#97925)
This extension consists of 8 additional 16-bit compressed forms for
existing standard load/store opcodes.
These opcodes are found in some RISC-V microcontrollers from WCH /
Nanjing Qinheng Microelectronics.
As discussed in the Discourse forums, this uses incompatible extension
and opcode names vs the vendor binary toolchain. The chosen names
instead follow the conventions for other vendor extensions listed on the
"riscv-non-isa" project.
Diffstat (limited to 'llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp')
-rw-r--r-- | llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp b/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp index b9e8e1f..23897e2d 100644 --- a/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp +++ b/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp @@ -646,6 +646,9 @@ DecodeStatus RISCVDisassembler::getInstruction16(MCInst &MI, uint64_t &Size, TRY_TO_DECODE_FEATURE( RISCV::FeatureStdExtZcmp, DecoderTableRVZcmp16, "Zcmp table (16-bit Push/Pop & Double Move Instructions)"); + TRY_TO_DECODE_AND_ADD_SP(STI.hasFeature(RISCV::FeatureVendorXwchc), + DecoderTableXwchc16, + "WCH QingKe XW custom opcode table"); TRY_TO_DECODE_AND_ADD_SP(true, DecoderTable16, "RISCV_C table (16-bit Instruction)"); |