if (VarName.empty()) {
// Just a modifier, pass this into PrintSpecial.
- Operands.push_back(AsmWriterOperand("PrintSpecial", ~0U, Modifier));
+ Operands.push_back(AsmWriterOperand("PrintSpecial",
+ ~0U,
+ ~0U,
+ Modifier));
} else {
// Otherwise, normal operand.
unsigned OpNo = CGI.getOperandNamed(VarName);
if (CurVariant == Variant || CurVariant == ~0U) {
unsigned MIOp = OpInfo.MIOperandNo;
- Operands.push_back(AsmWriterOperand(OpInfo.PrinterMethodName, MIOp,
+ Operands.push_back(AsmWriterOperand(OpInfo.PrinterMethodName,
+ OpNo,
+ MIOp,
Modifier));
}
}
/// into the asm writer.
std::string Str;
+ /// CGIOpNo - For isMachineInstrOperand, this is the index of the operand in
+ /// the CodeGenInstruction.
+ unsigned CGIOpNo;
+
/// MiOpNo - For isMachineInstrOperand, this is the operand number of the
/// machine instruction.
unsigned MIOpNo;
OpType op = isLiteralTextOperand)
: OperandType(op), Str(LitStr) {}
- AsmWriterOperand(const std::string &Printer, unsigned OpNo,
+ AsmWriterOperand(const std::string &Printer,
+ unsigned _CGIOpNo,
+ unsigned _MIOpNo,
const std::string &Modifier,
OpType op = isMachineInstrOperand)
- : OperandType(op), Str(Printer), MIOpNo(OpNo),
+ : OperandType(op), Str(Printer), CGIOpNo(_CGIOpNo), MIOpNo(_MIOpNo),
MiModifier(Modifier) {}
bool operator!=(const AsmWriterOperand &Other) const {