/// method to print assembly for each instruction.
///
bool X86IntelAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
- setupMachineFunction(MF);
+ SetupMachineFunction(MF);
O << "\n\n";
// Print out constants referenced by the function
- printConstantPool(MF.getConstantPool());
+ EmitConstantPool(MF.getConstantPool());
// Print out labels for the function.
- O << "\t.text\n";
- emitAlignment(4);
+ SwitchSection("\t.text\n", MF.getFunction());
+ EmitAlignment(4);
O << "\t.globl\t" << CurrentFnName << "\n";
- if (!forCygwin && !forDarwin)
+ if (HasDotTypeDotSizeDirective)
O << "\t.type\t" << CurrentFnName << ", @function\n";
O << CurrentFnName << ":\n";
I != E; ++I) {
// Print a label for the basic block if there are any predecessors.
if (I->pred_begin() != I->pred_end())
- O << ".LBB" << CurrentFnName << "_" << I->getNumber() << ":\t"
+ O << PrivateGlobalPrefix << "BB" << CurrentFnName << "_" << I->getNumber()
+ << ":\t"
<< CommentString << " " << I->getBasicBlock()->getName() << "\n";
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
II != E; ++II) {
return;
case MachineOperand::MO_MachineBasicBlock: {
MachineBasicBlock *MBBOp = MO.getMachineBasicBlock();
- O << ".LBB" << Mang->getValueName(MBBOp->getParent()->getFunction())
+ O << PrivateGlobalPrefix << "BB"
+ << Mang->getValueName(MBBOp->getParent()->getFunction())
<< "_" << MBBOp->getNumber () << "\t# "
<< MBBOp->getBasicBlock ()->getName ();
return;
O << "]";
return;
} else if (BaseReg.isConstantPoolIndex()) {
- O << "[.CPI" << CurrentFnName << "_"
+ O << "[" << PrivateGlobalPrefix << "CPI" << getFunctionNumber() << "_"
<< BaseReg.getConstantPoolIndex();
if (IndexReg.getReg()) {