Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.cpp
Show First 20 Lines • Show All 125 Lines • ▼ Show 20 Lines | bool isPtrReg = (MOI.RegClass == AVR::PTRREGSRegClassID) || | ||||
(MOI.RegClass == AVR::ZREGRegClassID); | (MOI.RegClass == AVR::ZREGRegClassID); | ||||
if (isPtrReg) { | if (isPtrReg) { | ||||
O << getRegisterName(Op.getReg(), AVR::ptr); | O << getRegisterName(Op.getReg(), AVR::ptr); | ||||
} else { | } else { | ||||
O << getPrettyRegisterName(Op.getReg(), MRI); | O << getPrettyRegisterName(Op.getReg(), MRI); | ||||
} | } | ||||
} else if (Op.isImm()) { | } else if (Op.isImm()) { | ||||
O << Op.getImm(); | O << formatImm(Op.getImm()); | ||||
} else { | } else { | ||||
assert(Op.isExpr() && "Unknown operand kind in printOperand"); | assert(Op.isExpr() && "Unknown operand kind in printOperand"); | ||||
O << *Op.getExpr(); | O << *Op.getExpr(); | ||||
} | } | ||||
} | } | ||||
/// This is used to print an immediate value that ends up | /// This is used to print an immediate value that ends up | ||||
/// being encoded as a pc-relative value. | /// being encoded as a pc-relative value. | ||||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |