1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

[RISCV] Remove unused method RISCVInstPrinter::printSImm5Plus1. NFC

simm5_plus1 is only used by InstAliases so should never be printed.
This commit is contained in:
Craig Topper 2021-01-04 12:20:18 -08:00
parent d774f94470
commit e9433f5479
3 changed files with 0 additions and 12 deletions

View File

@ -187,15 +187,6 @@ void RISCVInstPrinter::printVMaskReg(const MCInst *MI, unsigned OpNo,
O << ".t";
}
void RISCVInstPrinter::printSImm5Plus1(const MCInst *MI, unsigned OpNo,
const MCSubtargetInfo &STI,
raw_ostream &O) {
const MCOperand &MO = MI->getOperand(OpNo);
assert(MO.isImm() && "printSImm5Plus1 can only print constant operands");
O << MO.getImm() + 1;
}
const char *RISCVInstPrinter::getRegisterName(unsigned RegNo) {
return getRegisterName(RegNo, ArchRegNames ? RISCV::NoRegAltName
: RISCV::ABIRegAltName);

View File

@ -46,8 +46,6 @@ public:
raw_ostream &O);
void printVMaskReg(const MCInst *MI, unsigned OpNo,
const MCSubtargetInfo &STI, raw_ostream &O);
void printSImm5Plus1(const MCInst *MI, unsigned OpNo,
const MCSubtargetInfo &STI, raw_ostream &O);
// Autogenerated by tblgen.
std::pair<const char *, uint64_t> getMnemonic(const MCInst *MI) override;

View File

@ -69,7 +69,6 @@ def SImm5Plus1AsmOperand : AsmOperandClass {
def simm5_plus1 : Operand<XLenVT>, ImmLeaf<XLenVT,
[{return isInt<5>(Imm - 1);}]> {
let ParserMatchClass = SImm5Plus1AsmOperand;
let PrintMethod = "printSImm5Plus1";
let MCOperandPredicate = [{
int64_t Imm;
if (MCOp.evaluateAsConstantImm(Imm))