mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 12:19:53 +00:00
use helpers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94296 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
152a29bfa6
commit
1b46f433e0
@ -398,12 +398,10 @@ void ARMAsmPrinter::printOperand(const MachineInstr *MI, int OpNum,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MachineOperand::MO_ConstantPoolIndex:
|
case MachineOperand::MO_ConstantPoolIndex:
|
||||||
O << MAI->getPrivateGlobalPrefix() << "CPI" << getFunctionNumber()
|
O << *GetCPISymbol(MO.getIndex());
|
||||||
<< '_' << MO.getIndex();
|
|
||||||
break;
|
break;
|
||||||
case MachineOperand::MO_JumpTableIndex:
|
case MachineOperand::MO_JumpTableIndex:
|
||||||
O << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
|
O << *GetJTISymbol(MO.getIndex());
|
||||||
<< '_' << MO.getIndex();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -891,8 +889,7 @@ void ARMAsmPrinter::printCPInstOperand(const MachineInstr *MI, int OpNum,
|
|||||||
// data itself.
|
// data itself.
|
||||||
if (!strcmp(Modifier, "label")) {
|
if (!strcmp(Modifier, "label")) {
|
||||||
unsigned ID = MI->getOperand(OpNum).getImm();
|
unsigned ID = MI->getOperand(OpNum).getImm();
|
||||||
O << MAI->getPrivateGlobalPrefix() << "CPI" << getFunctionNumber()
|
O << *GetCPISymbol(ID) << ":\n";
|
||||||
<< '_' << ID << ":\n";
|
|
||||||
} else {
|
} else {
|
||||||
assert(!strcmp(Modifier, "cpentry") && "Unknown modifier for CPE");
|
assert(!strcmp(Modifier, "cpentry") && "Unknown modifier for CPE");
|
||||||
unsigned CPI = MI->getOperand(OpNum).getIndex();
|
unsigned CPI = MI->getOperand(OpNum).getIndex();
|
||||||
@ -912,6 +909,7 @@ void ARMAsmPrinter::printJTBlockOperand(const MachineInstr *MI, int OpNum) {
|
|||||||
|
|
||||||
const MachineOperand &MO1 = MI->getOperand(OpNum);
|
const MachineOperand &MO1 = MI->getOperand(OpNum);
|
||||||
const MachineOperand &MO2 = MI->getOperand(OpNum+1); // Unique Id
|
const MachineOperand &MO2 = MI->getOperand(OpNum+1); // Unique Id
|
||||||
|
|
||||||
unsigned JTI = MO1.getIndex();
|
unsigned JTI = MO1.getIndex();
|
||||||
O << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
|
O << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
|
||||||
<< '_' << JTI << '_' << MO2.getImm() << ":\n";
|
<< '_' << JTI << '_' << MO2.getImm() << ":\n";
|
||||||
@ -1264,12 +1262,7 @@ void ARMAsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) {
|
|||||||
unsigned CPIdx = (unsigned)MI->getOperand(1).getIndex();
|
unsigned CPIdx = (unsigned)MI->getOperand(1).getIndex();
|
||||||
|
|
||||||
EmitAlignment(2);
|
EmitAlignment(2);
|
||||||
|
OutStreamer.EmitLabel(GetCPISymbol(LabelId));
|
||||||
const char *Prefix = MAI->getPrivateGlobalPrefix();
|
|
||||||
MCSymbol *Label = OutContext.GetOrCreateSymbol(Twine(Prefix)+"CPI"+
|
|
||||||
Twine(getFunctionNumber())+
|
|
||||||
"_"+ Twine(LabelId));
|
|
||||||
OutStreamer.EmitLabel(Label);
|
|
||||||
|
|
||||||
const MachineConstantPoolEntry &MCPE = MCP->getConstants()[CPIdx];
|
const MachineConstantPoolEntry &MCPE = MCP->getConstants()[CPIdx];
|
||||||
if (MCPE.isMachineConstantPoolEntry())
|
if (MCPE.isMachineConstantPoolEntry())
|
||||||
|
Loading…
Reference in New Issue
Block a user