mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
implement initial version of ARMAsmPrinter::printOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28470 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c3c1a86aa0
commit
2f99b6bd96
@ -133,7 +133,37 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
}
|
||||
|
||||
void ARMAsmPrinter::printOperand(const MachineInstr *MI, int opNum) {
|
||||
assert(0 && "not implemented");
|
||||
const MachineOperand &MO = MI->getOperand (opNum);
|
||||
const MRegisterInfo &RI = *TM.getRegisterInfo();
|
||||
switch (MO.getType()) {
|
||||
case MachineOperand::MO_Register:
|
||||
if (MRegisterInfo::isPhysicalRegister(MO.getReg()))
|
||||
O << LowercaseString (RI.get(MO.getReg()).Name);
|
||||
else
|
||||
assert(0 && "not implemented");
|
||||
break;
|
||||
case MachineOperand::MO_Immediate:
|
||||
O << "#" << (int)MO.getImmedValue();
|
||||
break;
|
||||
case MachineOperand::MO_MachineBasicBlock:
|
||||
assert(0 && "not implemented");
|
||||
abort();
|
||||
return;
|
||||
case MachineOperand::MO_GlobalAddress:
|
||||
assert(0 && "not implemented");
|
||||
abort();
|
||||
break;
|
||||
case MachineOperand::MO_ExternalSymbol:
|
||||
assert(0 && "not implemented");
|
||||
abort();
|
||||
break;
|
||||
case MachineOperand::MO_ConstantPoolIndex:
|
||||
assert(0 && "not implemented");
|
||||
abort();
|
||||
break;
|
||||
default:
|
||||
O << "<unknown operand type>"; abort (); break;
|
||||
}
|
||||
}
|
||||
|
||||
void ARMAsmPrinter::printMemOperand(const MachineInstr *MI, int opNum,
|
||||
|
Loading…
Reference in New Issue
Block a user