[llvm] 6ef106b - [NFC][MC][MSP430] Rearrange decoder functions for MSP430 disassembler (#155011)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 25 08:19:54 PDT 2025
Author: Rahul Joshi
Date: 2025-08-25T08:19:51-07:00
New Revision: 6ef106b6916dc7329b59a20fa58ff430aa3f9e8e
URL: https://github.com/llvm/llvm-project/commit/6ef106b6916dc7329b59a20fa58ff430aa3f9e8e
DIFF: https://github.com/llvm/llvm-project/commit/6ef106b6916dc7329b59a20fa58ff430aa3f9e8e.diff
LOG: [NFC][MC][MSP430] Rearrange decoder functions for MSP430 disassembler (#155011)
Rearrange decode functions to be before including the generated
disassembler code and eliminate forward declarations.
Added:
Modified:
llvm/lib/Target/MSP430/Disassembler/MSP430Disassembler.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/MSP430/Disassembler/MSP430Disassembler.cpp b/llvm/lib/Target/MSP430/Disassembler/MSP430Disassembler.cpp
index c8094a8eeb361..e6666e8cafdf9 100644
--- a/llvm/lib/Target/MSP430/Disassembler/MSP430Disassembler.cpp
+++ b/llvm/lib/Target/MSP430/Disassembler/MSP430Disassembler.cpp
@@ -102,15 +102,6 @@ static DecodeStatus DecodeGR16RegisterClass(MCInst &MI, uint64_t RegNo,
return MCDisassembler::Success;
}
-static DecodeStatus DecodeCGImm(MCInst &MI, uint64_t Bits, uint64_t Address,
- const MCDisassembler *Decoder);
-
-static DecodeStatus DecodeMemOperand(MCInst &MI, uint64_t Bits,
- uint64_t Address,
- const MCDisassembler *Decoder);
-
-#include "MSP430GenDisassemblerTables.inc"
-
static DecodeStatus DecodeCGImm(MCInst &MI, uint64_t Bits, uint64_t Address,
const MCDisassembler *Decoder) {
int64_t Imm;
@@ -142,6 +133,8 @@ static DecodeStatus DecodeMemOperand(MCInst &MI, uint64_t Bits,
return MCDisassembler::Success;
}
+#include "MSP430GenDisassemblerTables.inc"
+
enum AddrMode {
amInvalid = 0,
amRegister,
More information about the llvm-commits
mailing list