From ac45bb5cbc4e37b41b78614f0cdd67d70485019a Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Fri, 26 Apr 2024 11:53:18 -0700 Subject: [PATCH] [RISCV] Consistently use uint32_t in Disassembler decode functions. NFC We had some uses of uint64_t and unsigned. These all come from tblgen code that is templated on InsnType which is currently uint32_t. --- .../Target/RISCV/Disassembler/RISCVDisassembler.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp b/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp index 998b9181efe6..3cd6e7434183 100644 --- a/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp +++ b/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp @@ -182,7 +182,7 @@ static DecodeStatus DecodeGPRPairRegisterClass(MCInst &Inst, uint32_t RegNo, return MCDisassembler::Success; } -static DecodeStatus DecodeSR07RegisterClass(MCInst &Inst, uint64_t RegNo, +static DecodeStatus DecodeSR07RegisterClass(MCInst &Inst, uint32_t RegNo, uint64_t Address, const void *Decoder) { if (RegNo >= 8) @@ -255,7 +255,7 @@ static DecodeStatus DecodeVRM8RegisterClass(MCInst &Inst, uint32_t RegNo, return MCDisassembler::Success; } -static DecodeStatus decodeVMaskReg(MCInst &Inst, uint64_t RegNo, +static DecodeStatus decodeVMaskReg(MCInst &Inst, uint32_t RegNo, uint64_t Address, const MCDisassembler *Decoder) { if (RegNo > 2) { @@ -361,13 +361,13 @@ static DecodeStatus decodeXTHeadMemPair(MCInst &Inst, uint32_t Insn, uint64_t Address, const MCDisassembler *Decoder); -static DecodeStatus decodeZcmpRlist(MCInst &Inst, unsigned Imm, +static DecodeStatus decodeZcmpRlist(MCInst &Inst, uint32_t Imm, uint64_t Address, const void *Decoder); static DecodeStatus decodeRegReg(MCInst &Inst, uint32_t Insn, uint64_t Address, const MCDisassembler *Decoder); -static DecodeStatus decodeZcmpSpimm(MCInst &Inst, unsigned Imm, +static DecodeStatus decodeZcmpSpimm(MCInst &Inst, uint32_t Imm, uint64_t Address, const void *Decoder); static DecodeStatus decodeCSSPushPopchk(MCInst &Inst, uint32_t Insn, @@ -470,7 +470,7 @@ static DecodeStatus decodeXTHeadMemPair(MCInst &Inst, uint32_t Insn, return MCDisassembler::Success; } -static DecodeStatus decodeZcmpRlist(MCInst &Inst, unsigned Imm, +static DecodeStatus decodeZcmpRlist(MCInst &Inst, uint32_t Imm, uint64_t Address, const void *Decoder) { if (Imm <= 3) return MCDisassembler::Fail; @@ -487,7 +487,7 @@ static DecodeStatus decodeRegReg(MCInst &Inst, uint32_t Insn, uint64_t Address, return MCDisassembler::Success; } -static DecodeStatus decodeZcmpSpimm(MCInst &Inst, unsigned Imm, +static DecodeStatus decodeZcmpSpimm(MCInst &Inst, uint32_t Imm, uint64_t Address, const void *Decoder) { Inst.addOperand(MCOperand::createImm(Imm)); return MCDisassembler::Success;