mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Add new shorter predicates for testing machine operands for various types:
e.g. MO.isMBB() instead of MO.isMachineBasicBlock(). I don't plan on switching everything over, so new clients should just start using the shorter names. Remove old long accessors, switching everything over to use the short accessor: getMachineBasicBlock() -> getMBB(), getConstantPoolIndex() -> getIndex(), setMachineBasicBlock -> setMBB(), etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45464 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -275,7 +275,7 @@ void ARMAsmPrinter::printOperand(const MachineInstr *MI, int opNum,
|
||||
break;
|
||||
}
|
||||
case MachineOperand::MO_MachineBasicBlock:
|
||||
printBasicBlockLabel(MO.getMachineBasicBlock());
|
||||
printBasicBlockLabel(MO.getMBB());
|
||||
return;
|
||||
case MachineOperand::MO_GlobalAddress: {
|
||||
bool isCallOp = Modifier && !strcmp(Modifier, "call");
|
||||
@@ -319,11 +319,11 @@ void ARMAsmPrinter::printOperand(const MachineInstr *MI, int opNum,
|
||||
}
|
||||
case MachineOperand::MO_ConstantPoolIndex:
|
||||
O << TAI->getPrivateGlobalPrefix() << "CPI" << getFunctionNumber()
|
||||
<< '_' << MO.getConstantPoolIndex();
|
||||
<< '_' << MO.getIndex();
|
||||
break;
|
||||
case MachineOperand::MO_JumpTableIndex:
|
||||
O << TAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
|
||||
<< '_' << MO.getJumpTableIndex();
|
||||
<< '_' << MO.getIndex();
|
||||
break;
|
||||
default:
|
||||
O << "<unknown operand type>"; abort (); break;
|
||||
@@ -655,7 +655,7 @@ void ARMAsmPrinter::printCPInstOperand(const MachineInstr *MI, int OpNo,
|
||||
<< '_' << ID << ":\n";
|
||||
} else {
|
||||
assert(!strcmp(Modifier, "cpentry") && "Unknown modifier for CPE");
|
||||
unsigned CPI = MI->getOperand(OpNo).getConstantPoolIndex();
|
||||
unsigned CPI = MI->getOperand(OpNo).getIndex();
|
||||
|
||||
const MachineConstantPoolEntry &MCPE = // Chasing pointers is fun?
|
||||
MI->getParent()->getParent()->getConstantPool()->getConstants()[CPI];
|
||||
@@ -675,7 +675,7 @@ void ARMAsmPrinter::printCPInstOperand(const MachineInstr *MI, int OpNo,
|
||||
void ARMAsmPrinter::printJTBlockOperand(const MachineInstr *MI, int OpNo) {
|
||||
const MachineOperand &MO1 = MI->getOperand(OpNo);
|
||||
const MachineOperand &MO2 = MI->getOperand(OpNo+1); // Unique Id
|
||||
unsigned JTI = MO1.getJumpTableIndex();
|
||||
unsigned JTI = MO1.getIndex();
|
||||
O << TAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
|
||||
<< '_' << JTI << '_' << MO2.getImm() << ":\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user