/// offset - Offset to address of global or external, only valid for
/// MO_GlobalAddress, MO_ExternalSym and MO_ConstantPoolIndex
int offset;
-
- /// subReg - SubRegister number, only valid for MO_Register. A value of 0
- /// indicates the MO_Register has no subReg.
- unsigned subReg;
} auxInfo;
MachineOperand() {}
"Wrong MachineOperand accessor");
return auxInfo.offset;
}
- unsigned getSubReg() const {
- assert(isRegister() && "Wrong MachineOperand accessor");
- return auxInfo.subReg;
- }
const char *getSymbolName() const {
assert(isExternalSymbol() && "Wrong MachineOperand accessor");
return contents.SymbolName;
"Wrong MachineOperand accessor");
auxInfo.offset = Offset;
}
- void setSubReg(unsigned subReg) {
- assert(isRegister() && "Wrong MachineOperand accessor");
- auxInfo.subReg = subReg;
- }
void setConstantPoolIndex(unsigned Idx) {
assert(isConstantPoolIndex() && "Wrong MachineOperand accessor");
contents.immedVal = Idx;
Op.IsKill = IsKill;
Op.IsDead = IsDead;
Op.contents.RegNo = Reg;
- Op.auxInfo.subReg = 0;
}
/// addImmOperand - Add a zero extended constant argument to the
/// addReg - Add a new virtual register operand...
///
const
- MachineInstrBuilder &addReg(int RegNo, bool isDef = false, bool isImp = false,
+ MachineInstrBuilder &addReg(unsigned RegNo, bool isDef = false, bool isImp = false,
bool isKill = false, bool isDead = false) const {
MI->addRegOperand(RegNo, isDef, isImp, isKill, isDead);
return *this;