mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
wire up some basic printOperand goodness, giving us stuff like this before
we abort: _main: stm , mov r7, sp sub sp, sp, mov r0, str r0, git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84532 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -31,3 +31,19 @@ using namespace llvm;
|
||||
|
||||
void ARMInstPrinter::printInst(const MCInst *MI) { printInstruction(MI); }
|
||||
|
||||
void ARMInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
|
||||
const char *Modifier) {
|
||||
assert((Modifier == 0 || Modifier[0] == 0) && "Cannot print modifiers");
|
||||
|
||||
const MCOperand &Op = MI->getOperand(OpNo);
|
||||
if (Op.isReg()) {
|
||||
O << getRegisterName(Op.getReg());
|
||||
} else if (Op.isImm()) {
|
||||
O << '#' << Op.getImm();
|
||||
} else {
|
||||
assert(Op.isExpr() && "unknown operand kind in printOperand");
|
||||
assert(0 && "UNIMP");
|
||||
//O << '$';
|
||||
//Op.getExpr()->print(O, &MAI);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user