From bdc3151755342c5adb26daed81fd9a0edcb102b8 Mon Sep 17 00:00:00 2001 From: Fuad Ismail Date: Wed, 16 Jul 2025 13:16:08 +0700 Subject: [PATCH] Pad RISC-V RVC instructions like Thumb2 --- src/coredistools/coredistools.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/coredistools/coredistools.cpp b/src/coredistools/coredistools.cpp index 683d666..21b2304 100644 --- a/src/coredistools/coredistools.cpp +++ b/src/coredistools/coredistools.cpp @@ -523,8 +523,9 @@ void CorDisasm::dumpInstruction(const BlockIterator &BIter) const { " "}; OS << (Padding[(InstSize < 7) ? (7 - InstSize) : 0]); } - else if (TheTargetArch == Target_Thumb) { + else if ((TheTargetArch == Target_Thumb) || (TheTargetArch == Target_RiscV64)) { // Thumb-2 encoding has 32-bit instructions and 16-bit instructions. + // RISC-V RVC has 32-bit instructions and 16-bit instructions. if (InstSize == 2) { OS << " "; }