mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-22 10:29:35 +00:00
convert some uses of printBasicBlockLabel to use GetMBBSymbol
instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81677 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8bb233b6b7
commit
325d3dcfe4
@ -416,12 +416,12 @@ void AsmPrinter::printPICJumpTableEntry(const MachineJumpTableInfo *MJTI,
|
|||||||
// If we're emitting non-PIC code, then emit the entries as direct
|
// If we're emitting non-PIC code, then emit the entries as direct
|
||||||
// references to the target basic blocks.
|
// references to the target basic blocks.
|
||||||
if (!isPIC) {
|
if (!isPIC) {
|
||||||
printBasicBlockLabel(MBB, false, false, false);
|
GetMBBSymbol(MBB->getNumber())->print(O, MAI);
|
||||||
} else if (MAI->getSetDirective()) {
|
} else if (MAI->getSetDirective()) {
|
||||||
O << MAI->getPrivateGlobalPrefix() << getFunctionNumber()
|
O << MAI->getPrivateGlobalPrefix() << getFunctionNumber()
|
||||||
<< '_' << uid << "_set_" << MBB->getNumber();
|
<< '_' << uid << "_set_" << MBB->getNumber();
|
||||||
} else {
|
} else {
|
||||||
printBasicBlockLabel(MBB, false, false, false);
|
GetMBBSymbol(MBB->getNumber())->print(O, MAI);
|
||||||
// If the arch uses custom Jump Table directives, don't calc relative to
|
// If the arch uses custom Jump Table directives, don't calc relative to
|
||||||
// JT
|
// JT
|
||||||
if (!HadJTEntryDirective)
|
if (!HadJTEntryDirective)
|
||||||
@ -1571,8 +1571,8 @@ void AsmPrinter::printInlineAsm(const MachineInstr *MI) const {
|
|||||||
++OpNo; // Skip over the ID number.
|
++OpNo; // Skip over the ID number.
|
||||||
|
|
||||||
if (Modifier[0]=='l') // labels are target independent
|
if (Modifier[0]=='l') // labels are target independent
|
||||||
printBasicBlockLabel(MI->getOperand(OpNo).getMBB(),
|
GetMBBSymbol(MI->getOperand(OpNo).getMBB()
|
||||||
false, false, false);
|
->getNumber())->print(O, MAI);
|
||||||
else {
|
else {
|
||||||
AsmPrinter *AP = const_cast<AsmPrinter*>(this);
|
AsmPrinter *AP = const_cast<AsmPrinter*>(this);
|
||||||
if ((OpFlags & 7) == 4) {
|
if ((OpFlags & 7) == 4) {
|
||||||
@ -1647,8 +1647,7 @@ MCSymbol *AsmPrinter::GetMBBSymbol(unsigned MBBID) const {
|
|||||||
/// printBasicBlockLabel - This method prints the label for the specified
|
/// printBasicBlockLabel - This method prints the label for the specified
|
||||||
/// MachineBasicBlock
|
/// MachineBasicBlock
|
||||||
void AsmPrinter::printBasicBlockLabel(const MachineBasicBlock *MBB,
|
void AsmPrinter::printBasicBlockLabel(const MachineBasicBlock *MBB,
|
||||||
bool printAlign,
|
bool printAlign, bool printColon,
|
||||||
bool printColon,
|
|
||||||
bool printComment) const {
|
bool printComment) const {
|
||||||
if (printAlign) {
|
if (printAlign) {
|
||||||
unsigned Align = MBB->getAlignment();
|
unsigned Align = MBB->getAlignment();
|
||||||
@ -1682,7 +1681,7 @@ void AsmPrinter::printPICJumpTableSetLabel(unsigned uid,
|
|||||||
|
|
||||||
O << MAI->getSetDirective() << ' ' << MAI->getPrivateGlobalPrefix()
|
O << MAI->getSetDirective() << ' ' << MAI->getPrivateGlobalPrefix()
|
||||||
<< getFunctionNumber() << '_' << uid << "_set_" << MBB->getNumber() << ',';
|
<< getFunctionNumber() << '_' << uid << "_set_" << MBB->getNumber() << ',';
|
||||||
printBasicBlockLabel(MBB, false, false, false);
|
GetMBBSymbol(MBB->getNumber())->print(O, MAI);
|
||||||
O << '-' << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
|
O << '-' << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
|
||||||
<< '_' << uid << '\n';
|
<< '_' << uid << '\n';
|
||||||
}
|
}
|
||||||
@ -1695,7 +1694,7 @@ void AsmPrinter::printPICJumpTableSetLabel(unsigned uid, unsigned uid2,
|
|||||||
O << MAI->getSetDirective() << ' ' << MAI->getPrivateGlobalPrefix()
|
O << MAI->getSetDirective() << ' ' << MAI->getPrivateGlobalPrefix()
|
||||||
<< getFunctionNumber() << '_' << uid << '_' << uid2
|
<< getFunctionNumber() << '_' << uid << '_' << uid2
|
||||||
<< "_set_" << MBB->getNumber() << ',';
|
<< "_set_" << MBB->getNumber() << ',';
|
||||||
printBasicBlockLabel(MBB, false, false, false);
|
GetMBBSymbol(MBB->getNumber())->print(O, MAI);
|
||||||
O << '-' << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
|
O << '-' << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
|
||||||
<< '_' << uid << '_' << uid2 << '\n';
|
<< '_' << uid << '_' << uid2 << '\n';
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "llvm/MC/MCSectionMachO.h"
|
#include "llvm/MC/MCSectionMachO.h"
|
||||||
#include "llvm/MC/MCStreamer.h"
|
#include "llvm/MC/MCStreamer.h"
|
||||||
#include "llvm/MC/MCAsmInfo.h"
|
#include "llvm/MC/MCAsmInfo.h"
|
||||||
|
#include "llvm/MC/MCSymbol.h"
|
||||||
#include "llvm/Target/TargetData.h"
|
#include "llvm/Target/TargetData.h"
|
||||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
@ -330,7 +331,7 @@ void ARMAsmPrinter::printOperand(const MachineInstr *MI, int OpNum,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MachineOperand::MO_MachineBasicBlock:
|
case MachineOperand::MO_MachineBasicBlock:
|
||||||
printBasicBlockLabel(MO.getMBB());
|
GetMBBSymbol(MO.getMBB()->getNumber())->print(O, MAI);
|
||||||
return;
|
return;
|
||||||
case MachineOperand::MO_GlobalAddress: {
|
case MachineOperand::MO_GlobalAddress: {
|
||||||
bool isCallOp = Modifier && !strcmp(Modifier, "call");
|
bool isCallOp = Modifier && !strcmp(Modifier, "call");
|
||||||
@ -893,11 +894,11 @@ void ARMAsmPrinter::printJTBlockOperand(const MachineInstr *MI, int OpNum) {
|
|||||||
<< '_' << JTI << '_' << MO2.getImm()
|
<< '_' << JTI << '_' << MO2.getImm()
|
||||||
<< "_set_" << MBB->getNumber();
|
<< "_set_" << MBB->getNumber();
|
||||||
else if (TM.getRelocationModel() == Reloc::PIC_) {
|
else if (TM.getRelocationModel() == Reloc::PIC_) {
|
||||||
printBasicBlockLabel(MBB, false, false, false);
|
GetMBBSymbol(MBB->getNumber())->print(O, MAI);
|
||||||
O << '-' << MAI->getPrivateGlobalPrefix() << "JTI"
|
O << '-' << MAI->getPrivateGlobalPrefix() << "JTI"
|
||||||
<< getFunctionNumber() << '_' << JTI << '_' << MO2.getImm();
|
<< getFunctionNumber() << '_' << JTI << '_' << MO2.getImm();
|
||||||
} else {
|
} else {
|
||||||
printBasicBlockLabel(MBB, false, false, false);
|
GetMBBSymbol(MBB->getNumber())->print(O, MAI);
|
||||||
}
|
}
|
||||||
if (i != e-1)
|
if (i != e-1)
|
||||||
O << '\n';
|
O << '\n';
|
||||||
@ -929,12 +930,12 @@ void ARMAsmPrinter::printJT2BlockOperand(const MachineInstr *MI, int OpNum) {
|
|||||||
O << MAI->getData16bitsDirective();
|
O << MAI->getData16bitsDirective();
|
||||||
if (ByteOffset || HalfWordOffset) {
|
if (ByteOffset || HalfWordOffset) {
|
||||||
O << '(';
|
O << '(';
|
||||||
printBasicBlockLabel(MBB, false, false, false);
|
GetMBBSymbol(MBB->getNumber())->print(O, MAI);
|
||||||
O << "-" << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
|
O << "-" << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
|
||||||
<< '_' << JTI << '_' << MO2.getImm() << ")/2";
|
<< '_' << JTI << '_' << MO2.getImm() << ")/2";
|
||||||
} else {
|
} else {
|
||||||
O << "\tb.w ";
|
O << "\tb.w ";
|
||||||
printBasicBlockLabel(MBB, false, false, false);
|
GetMBBSymbol(MBB->getNumber())->print(O, MAI);
|
||||||
}
|
}
|
||||||
if (i != e-1)
|
if (i != e-1)
|
||||||
O << '\n';
|
O << '\n';
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "llvm/CodeGen/DwarfWriter.h"
|
#include "llvm/CodeGen/DwarfWriter.h"
|
||||||
#include "llvm/MC/MCStreamer.h"
|
#include "llvm/MC/MCStreamer.h"
|
||||||
#include "llvm/MC/MCAsmInfo.h"
|
#include "llvm/MC/MCAsmInfo.h"
|
||||||
|
#include "llvm/MC/MCSymbol.h"
|
||||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Target/TargetRegistry.h"
|
#include "llvm/Target/TargetRegistry.h"
|
||||||
@ -95,7 +96,7 @@ void AlphaAsmPrinter::printOp(const MachineOperand &MO, bool IsCallOp) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case MachineOperand::MO_MachineBasicBlock:
|
case MachineOperand::MO_MachineBasicBlock:
|
||||||
printBasicBlockLabel(MO.getMBB());
|
GetMBBSymbol(MO.getMBB()->getNumber())->print(O, MAI);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case MachineOperand::MO_ConstantPoolIndex:
|
case MachineOperand::MO_ConstantPoolIndex:
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/MC/MCStreamer.h"
|
#include "llvm/MC/MCStreamer.h"
|
||||||
#include "llvm/MC/MCAsmInfo.h"
|
#include "llvm/MC/MCAsmInfo.h"
|
||||||
|
#include "llvm/MC/MCSymbol.h"
|
||||||
#include "llvm/Target/TargetData.h"
|
#include "llvm/Target/TargetData.h"
|
||||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||||
#include "llvm/Target/TargetRegistry.h"
|
#include "llvm/Target/TargetRegistry.h"
|
||||||
@ -176,7 +177,7 @@ void BlackfinAsmPrinter::printOperand(const MachineInstr *MI, int opNum) {
|
|||||||
O << MO.getImm();
|
O << MO.getImm();
|
||||||
break;
|
break;
|
||||||
case MachineOperand::MO_MachineBasicBlock:
|
case MachineOperand::MO_MachineBasicBlock:
|
||||||
printBasicBlockLabel(MO.getMBB(), false, false, false);
|
GetMBBSymbol(MO.getMBB()->getNumber())->print(O, MAI);
|
||||||
return;
|
return;
|
||||||
case MachineOperand::MO_GlobalAddress:
|
case MachineOperand::MO_GlobalAddress:
|
||||||
O << Mang->getMangledName(MO.getGlobal());
|
O << Mang->getMangledName(MO.getGlobal());
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/MC/MCStreamer.h"
|
#include "llvm/MC/MCStreamer.h"
|
||||||
#include "llvm/MC/MCAsmInfo.h"
|
#include "llvm/MC/MCAsmInfo.h"
|
||||||
|
#include "llvm/MC/MCSymbol.h"
|
||||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||||
#include "llvm/Target/TargetInstrInfo.h"
|
#include "llvm/Target/TargetInstrInfo.h"
|
||||||
#include "llvm/Target/TargetOptions.h"
|
#include "llvm/Target/TargetOptions.h"
|
||||||
@ -322,7 +323,7 @@ void SPUAsmPrinter::printOp(const MachineOperand &MO) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case MachineOperand::MO_MachineBasicBlock:
|
case MachineOperand::MO_MachineBasicBlock:
|
||||||
printBasicBlockLabel(MO.getMBB());
|
GetMBBSymbol(MO.getMBB()->getNumber())->print(O, MAI);
|
||||||
return;
|
return;
|
||||||
case MachineOperand::MO_JumpTableIndex:
|
case MachineOperand::MO_JumpTableIndex:
|
||||||
O << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
|
O << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "llvm/CodeGen/MachineConstantPool.h"
|
#include "llvm/CodeGen/MachineConstantPool.h"
|
||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/MC/MCStreamer.h"
|
#include "llvm/MC/MCStreamer.h"
|
||||||
|
#include "llvm/MC/MCSymbol.h"
|
||||||
#include "llvm/Target/TargetData.h"
|
#include "llvm/Target/TargetData.h"
|
||||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||||
#include "llvm/Target/TargetRegistry.h"
|
#include "llvm/Target/TargetRegistry.h"
|
||||||
@ -170,7 +171,7 @@ void MSP430AsmPrinter::printOperand(const MachineInstr *MI, int OpNum,
|
|||||||
O << MO.getImm();
|
O << MO.getImm();
|
||||||
return;
|
return;
|
||||||
case MachineOperand::MO_MachineBasicBlock:
|
case MachineOperand::MO_MachineBasicBlock:
|
||||||
printBasicBlockLabel(MO.getMBB());
|
GetMBBSymbol(MO.getMBB()->getNumber())->print(O, MAI);
|
||||||
return;
|
return;
|
||||||
case MachineOperand::MO_GlobalAddress: {
|
case MachineOperand::MO_GlobalAddress: {
|
||||||
bool isMemOp = Modifier && !strcmp(Modifier, "mem");
|
bool isMemOp = Modifier && !strcmp(Modifier, "mem");
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/MC/MCStreamer.h"
|
#include "llvm/MC/MCStreamer.h"
|
||||||
#include "llvm/MC/MCAsmInfo.h"
|
#include "llvm/MC/MCAsmInfo.h"
|
||||||
|
#include "llvm/MC/MCSymbol.h"
|
||||||
#include "llvm/Target/TargetData.h"
|
#include "llvm/Target/TargetData.h"
|
||||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
@ -348,7 +349,7 @@ void MipsAsmPrinter::printOperand(const MachineInstr *MI, int opNum) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MachineOperand::MO_MachineBasicBlock:
|
case MachineOperand::MO_MachineBasicBlock:
|
||||||
printBasicBlockLabel(MO.getMBB());
|
GetMBBSymbol(MO.getMBB()->getNumber())->print(O, MAI);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case MachineOperand::MO_GlobalAddress:
|
case MachineOperand::MO_GlobalAddress:
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "llvm/CodeGen/DwarfWriter.h"
|
#include "llvm/CodeGen/DwarfWriter.h"
|
||||||
#include "llvm/CodeGen/MachineModuleInfo.h"
|
#include "llvm/CodeGen/MachineModuleInfo.h"
|
||||||
#include "llvm/MC/MCStreamer.h"
|
#include "llvm/MC/MCStreamer.h"
|
||||||
|
#include "llvm/MC/MCSymbol.h"
|
||||||
#include "llvm/Target/TargetRegistry.h"
|
#include "llvm/Target/TargetRegistry.h"
|
||||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
@ -171,7 +172,7 @@ void PIC16AsmPrinter::printOperand(const MachineInstr *MI, int opNum) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MachineOperand::MO_MachineBasicBlock:
|
case MachineOperand::MO_MachineBasicBlock:
|
||||||
printBasicBlockLabel(MO.getMBB());
|
GetMBBSymbol(MO.getMBB()->getNumber())->print(O, MAI);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -31,9 +31,10 @@
|
|||||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||||
|
#include "llvm/MC/MCAsmInfo.h"
|
||||||
#include "llvm/MC/MCSectionMachO.h"
|
#include "llvm/MC/MCSectionMachO.h"
|
||||||
#include "llvm/MC/MCStreamer.h"
|
#include "llvm/MC/MCStreamer.h"
|
||||||
#include "llvm/MC/MCAsmInfo.h"
|
#include "llvm/MC/MCSymbol.h"
|
||||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||||
#include "llvm/Target/TargetRegisterInfo.h"
|
#include "llvm/Target/TargetRegisterInfo.h"
|
||||||
#include "llvm/Target/TargetInstrInfo.h"
|
#include "llvm/Target/TargetInstrInfo.h"
|
||||||
@ -403,7 +404,7 @@ void PPCAsmPrinter::printOp(const MachineOperand &MO) {
|
|||||||
llvm_unreachable("printOp() does not handle immediate values");
|
llvm_unreachable("printOp() does not handle immediate values");
|
||||||
|
|
||||||
case MachineOperand::MO_MachineBasicBlock:
|
case MachineOperand::MO_MachineBasicBlock:
|
||||||
printBasicBlockLabel(MO.getMBB());
|
GetMBBSymbol(MO.getMBB()->getNumber())->print(O, MAI);
|
||||||
return;
|
return;
|
||||||
case MachineOperand::MO_JumpTableIndex:
|
case MachineOperand::MO_JumpTableIndex:
|
||||||
O << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
|
O << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
|
||||||
|
@ -24,8 +24,9 @@
|
|||||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||||
#include "llvm/CodeGen/MachineConstantPool.h"
|
#include "llvm/CodeGen/MachineConstantPool.h"
|
||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/MC/MCStreamer.h"
|
|
||||||
#include "llvm/MC/MCAsmInfo.h"
|
#include "llvm/MC/MCAsmInfo.h"
|
||||||
|
#include "llvm/MC/MCStreamer.h"
|
||||||
|
#include "llvm/MC/MCSymbol.h"
|
||||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||||
#include "llvm/Target/TargetRegistry.h"
|
#include "llvm/Target/TargetRegistry.h"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
@ -169,7 +170,7 @@ void SparcAsmPrinter::printOperand(const MachineInstr *MI, int opNum) {
|
|||||||
O << (int)MO.getImm();
|
O << (int)MO.getImm();
|
||||||
break;
|
break;
|
||||||
case MachineOperand::MO_MachineBasicBlock:
|
case MachineOperand::MO_MachineBasicBlock:
|
||||||
printBasicBlockLabel(MO.getMBB());
|
GetMBBSymbol(MO.getMBB()->getNumber())->print(O, MAI);
|
||||||
return;
|
return;
|
||||||
case MachineOperand::MO_GlobalAddress:
|
case MachineOperand::MO_GlobalAddress:
|
||||||
O << Mang->getMangledName(MO.getGlobal());
|
O << Mang->getMangledName(MO.getGlobal());
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/MC/MCStreamer.h"
|
#include "llvm/MC/MCStreamer.h"
|
||||||
#include "llvm/MC/MCAsmInfo.h"
|
#include "llvm/MC/MCAsmInfo.h"
|
||||||
|
#include "llvm/MC/MCSymbol.h"
|
||||||
#include "llvm/Target/TargetData.h"
|
#include "llvm/Target/TargetData.h"
|
||||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||||
#include "llvm/Target/TargetRegistry.h"
|
#include "llvm/Target/TargetRegistry.h"
|
||||||
@ -163,14 +164,14 @@ void SystemZAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
|
|||||||
O << '\n';
|
O << '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
void SystemZAsmPrinter::printPCRelImmOperand(const MachineInstr *MI, int OpNum) {
|
void SystemZAsmPrinter::printPCRelImmOperand(const MachineInstr *MI, int OpNum){
|
||||||
const MachineOperand &MO = MI->getOperand(OpNum);
|
const MachineOperand &MO = MI->getOperand(OpNum);
|
||||||
switch (MO.getType()) {
|
switch (MO.getType()) {
|
||||||
case MachineOperand::MO_Immediate:
|
case MachineOperand::MO_Immediate:
|
||||||
O << MO.getImm();
|
O << MO.getImm();
|
||||||
return;
|
return;
|
||||||
case MachineOperand::MO_MachineBasicBlock:
|
case MachineOperand::MO_MachineBasicBlock:
|
||||||
printBasicBlockLabel(MO.getMBB(), false, false, VerboseAsm);
|
GetMBBSymbol(MO.getMBB()->getNumber())->print(O, MAI);
|
||||||
return;
|
return;
|
||||||
case MachineOperand::MO_GlobalAddress: {
|
case MachineOperand::MO_GlobalAddress: {
|
||||||
const GlobalValue *GV = MO.getGlobal();
|
const GlobalValue *GV = MO.getGlobal();
|
||||||
@ -227,7 +228,7 @@ void SystemZAsmPrinter::printOperand(const MachineInstr *MI, int OpNum,
|
|||||||
O << MO.getImm();
|
O << MO.getImm();
|
||||||
return;
|
return;
|
||||||
case MachineOperand::MO_MachineBasicBlock:
|
case MachineOperand::MO_MachineBasicBlock:
|
||||||
printBasicBlockLabel(MO.getMBB());
|
GetMBBSymbol(MO.getMBB()->getNumber())->print(O, MAI);
|
||||||
return;
|
return;
|
||||||
case MachineOperand::MO_JumpTableIndex:
|
case MachineOperand::MO_JumpTableIndex:
|
||||||
O << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber() << '_'
|
O << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber() << '_'
|
||||||
|
@ -424,7 +424,7 @@ void X86ATTAsmPrinter::print_pcrel_imm(const MachineInstr *MI, unsigned OpNo) {
|
|||||||
O << MO.getImm();
|
O << MO.getImm();
|
||||||
return;
|
return;
|
||||||
case MachineOperand::MO_MachineBasicBlock:
|
case MachineOperand::MO_MachineBasicBlock:
|
||||||
printBasicBlockLabel(MO.getMBB(), false, false, false);
|
GetMBBSymbol(MO.getMBB()->getNumber())->print(O, MAI);
|
||||||
return;
|
return;
|
||||||
case MachineOperand::MO_GlobalAddress:
|
case MachineOperand::MO_GlobalAddress:
|
||||||
case MachineOperand::MO_ExternalSymbol:
|
case MachineOperand::MO_ExternalSymbol:
|
||||||
@ -550,7 +550,9 @@ void X86ATTAsmPrinter::printPICJumpTableSetLabel(unsigned uid,
|
|||||||
|
|
||||||
O << MAI->getSetDirective() << ' ' << MAI->getPrivateGlobalPrefix()
|
O << MAI->getSetDirective() << ' ' << MAI->getPrivateGlobalPrefix()
|
||||||
<< getFunctionNumber() << '_' << uid << "_set_" << MBB->getNumber() << ',';
|
<< getFunctionNumber() << '_' << uid << "_set_" << MBB->getNumber() << ',';
|
||||||
printBasicBlockLabel(MBB, false, false, false);
|
|
||||||
|
GetMBBSymbol(MBB->getNumber())->print(O, MAI);
|
||||||
|
|
||||||
if (Subtarget->isPICStyleRIPRel())
|
if (Subtarget->isPICStyleRIPRel())
|
||||||
O << '-' << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
|
O << '-' << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
|
||||||
<< '_' << uid << '\n';
|
<< '_' << uid << '\n';
|
||||||
@ -581,10 +583,10 @@ void X86ATTAsmPrinter::printPICJumpTableEntry(const MachineJumpTableInfo *MJTI,
|
|||||||
O << MAI->getPrivateGlobalPrefix() << getFunctionNumber()
|
O << MAI->getPrivateGlobalPrefix() << getFunctionNumber()
|
||||||
<< '_' << uid << "_set_" << MBB->getNumber();
|
<< '_' << uid << "_set_" << MBB->getNumber();
|
||||||
} else if (Subtarget->isPICStyleGOT()) {
|
} else if (Subtarget->isPICStyleGOT()) {
|
||||||
printBasicBlockLabel(MBB, false, false, false);
|
GetMBBSymbol(MBB->getNumber())->print(O, MAI);
|
||||||
O << "@GOTOFF";
|
O << "@GOTOFF";
|
||||||
} else
|
} else
|
||||||
printBasicBlockLabel(MBB, false, false, false);
|
GetMBBSymbol(MBB->getNumber())->print(O, MAI);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool X86ATTAsmPrinter::printAsmMRegister(const MachineOperand &MO, char Mode) {
|
bool X86ATTAsmPrinter::printAsmMRegister(const MachineOperand &MO, char Mode) {
|
||||||
|
@ -26,8 +26,9 @@
|
|||||||
#include "llvm/ADT/StringExtras.h"
|
#include "llvm/ADT/StringExtras.h"
|
||||||
#include "llvm/Assembly/Writer.h"
|
#include "llvm/Assembly/Writer.h"
|
||||||
#include "llvm/CodeGen/DwarfWriter.h"
|
#include "llvm/CodeGen/DwarfWriter.h"
|
||||||
#include "llvm/MC/MCStreamer.h"
|
|
||||||
#include "llvm/MC/MCAsmInfo.h"
|
#include "llvm/MC/MCAsmInfo.h"
|
||||||
|
#include "llvm/MC/MCStreamer.h"
|
||||||
|
#include "llvm/MC/MCSymbol.h"
|
||||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||||
#include "llvm/Target/TargetOptions.h"
|
#include "llvm/Target/TargetOptions.h"
|
||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
@ -274,7 +275,7 @@ void X86IntelAsmPrinter::print_pcrel_imm(const MachineInstr *MI, unsigned OpNo){
|
|||||||
O << MO.getImm();
|
O << MO.getImm();
|
||||||
return;
|
return;
|
||||||
case MachineOperand::MO_MachineBasicBlock:
|
case MachineOperand::MO_MachineBasicBlock:
|
||||||
printBasicBlockLabel(MO.getMBB(), false, false, false);
|
GetMBBSymbol(MO.getMBB()->getNumber())->print(O, MAI);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case MachineOperand::MO_GlobalAddress: {
|
case MachineOperand::MO_GlobalAddress: {
|
||||||
@ -362,7 +363,7 @@ void X86IntelAsmPrinter::printPICJumpTableSetLabel(unsigned uid,
|
|||||||
|
|
||||||
O << MAI->getSetDirective() << ' ' << MAI->getPrivateGlobalPrefix()
|
O << MAI->getSetDirective() << ' ' << MAI->getPrivateGlobalPrefix()
|
||||||
<< getFunctionNumber() << '_' << uid << "_set_" << MBB->getNumber() << ',';
|
<< getFunctionNumber() << '_' << uid << "_set_" << MBB->getNumber() << ',';
|
||||||
printBasicBlockLabel(MBB, false, false, false);
|
GetMBBSymbol(MBB->getNumber())->print(O, MAI);
|
||||||
O << '-' << "\"L" << getFunctionNumber() << "$pb\"'\n";
|
O << '-' << "\"L" << getFunctionNumber() << "$pb\"'\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "llvm/CodeGen/MachineConstantPool.h"
|
#include "llvm/CodeGen/MachineConstantPool.h"
|
||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/MC/MCStreamer.h"
|
#include "llvm/MC/MCStreamer.h"
|
||||||
|
#include "llvm/MC/MCSymbol.h"
|
||||||
#include "llvm/Target/TargetData.h"
|
#include "llvm/Target/TargetData.h"
|
||||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||||
#include "llvm/Target/TargetRegistry.h"
|
#include "llvm/Target/TargetRegistry.h"
|
||||||
@ -318,7 +319,7 @@ void XCoreAsmPrinter::printOperand(const MachineInstr *MI, int opNum) {
|
|||||||
O << MO.getImm();
|
O << MO.getImm();
|
||||||
break;
|
break;
|
||||||
case MachineOperand::MO_MachineBasicBlock:
|
case MachineOperand::MO_MachineBasicBlock:
|
||||||
printBasicBlockLabel(MO.getMBB());
|
GetMBBSymbol(MO.getMBB()->getNumber())->print(O, MAI);
|
||||||
break;
|
break;
|
||||||
case MachineOperand::MO_GlobalAddress:
|
case MachineOperand::MO_GlobalAddress:
|
||||||
O << Mang->getMangledName(MO.getGlobal());
|
O << Mang->getMangledName(MO.getGlobal());
|
||||||
|
Loading…
Reference in New Issue
Block a user