Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,14 +736,7 @@ DecodeStatus RISCVDisassembler::getInstruction16(MCInst &MI, uint64_t &Size,

uint32_t Insn = support::endian::read16le(Bytes.data());

TRY_TO_DECODE_FEATURE_ANY(XqciFeatureGroup, DecoderTableXqci16,
"Qualcomm uC 16bit");
TRY_TO_DECODE_FEATURE(
RISCV::FeatureVendorXqccmp, DecoderTableXqccmp16,
"Xqccmp (Qualcomm 16-bit Push/Pop & Double Move Instructions)");
TRY_TO_DECODE_AND_ADD_SP(STI.hasFeature(RISCV::FeatureVendorXwchc),
DecoderTableXwchc16, "WCH QingKe XW");

// Standard Extensions
// DecoderTableZicfiss16 must be checked before DecoderTable16.
TRY_TO_DECODE(true, DecoderTableZicfiss16, "RVZicfiss (Shadow Stack)");
TRY_TO_DECODE_AND_ADD_SP(true, DecoderTable16,
Expand All @@ -754,6 +747,15 @@ DecodeStatus RISCVDisassembler::getInstruction16(MCInst &MI, uint64_t &Size,
TRY_TO_DECODE(true, DecoderTableZcOverlap16,
"ZcOverlap (16-bit Instructions overlapping with Zcf/Zcd)");

// Vendor Extensions
TRY_TO_DECODE_FEATURE_ANY(XqciFeatureGroup, DecoderTableXqci16,
"Qualcomm uC 16bit");
TRY_TO_DECODE_FEATURE(
RISCV::FeatureVendorXqccmp, DecoderTableXqccmp16,
"Xqccmp (Qualcomm 16-bit Push/Pop & Double Move Instructions)");
TRY_TO_DECODE_AND_ADD_SP(STI.hasFeature(RISCV::FeatureVendorXwchc),
DecoderTableXwchc16, "WCH QingKe XW");

return MCDisassembler::Fail;
}

Expand Down