diff --git a/llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp b/llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp index e9ce3892dba5..bde44d4545d0 100644 --- a/llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp +++ b/llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp @@ -153,12 +153,6 @@ public: bool isDReg() const; unsigned getReg() const override; void addRegOperands(MCInst &Inst, unsigned N) const; - void addARegOperands(MCInst &Inst, unsigned N) const { - addRegOperands(Inst, N); - } - void addDRegOperands(MCInst &Inst, unsigned N) const { - addRegOperands(Inst, N); - } static std::unique_ptr createMemOp(M68kMemOp MemOp, SMLoc Start, SMLoc End); diff --git a/llvm/lib/Target/M68k/M68kInstrInfo.td b/llvm/lib/Target/M68k/M68kInstrInfo.td index e465f256c097..3825c24f8e5c 100644 --- a/llvm/lib/Target/M68k/M68kInstrInfo.td +++ b/llvm/lib/Target/M68k/M68kInstrInfo.td @@ -176,8 +176,10 @@ def MxRegClass : MxOpClass<"Reg">; // both ADD32dd and ADD32dr has {MCK_RegClass, MCK_RegClass} for // their operands, which makes AsmParser unable to pick the correct // one in a deterministic way. -def MxARegClass : MxOpClass<"AReg">; -def MxDRegClass : MxOpClass<"DReg">; +let RenderMethod = "addRegOperands", SuperClasses = [MxRegClass] in { + def MxARegClass : MxOpClass<"AReg">; + def MxDRegClass : MxOpClass<"DReg">; +} class MxOperand { ValueType VT = vt;