mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-20 11:29:24 +00:00
This is now implemented in common codegen code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24446 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ac28fbd043
commit
f6163a0079
@ -44,7 +44,6 @@ namespace {
|
|||||||
Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed");
|
Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed");
|
||||||
|
|
||||||
class PPCAsmPrinter : public AsmPrinter {
|
class PPCAsmPrinter : public AsmPrinter {
|
||||||
std::string CurSection;
|
|
||||||
public:
|
public:
|
||||||
std::set<std::string> FnStubs, GVStubs, LinkOnceStubs;
|
std::set<std::string> FnStubs, GVStubs, LinkOnceStubs;
|
||||||
|
|
||||||
@ -63,24 +62,6 @@ namespace {
|
|||||||
return static_cast<PPCTargetMachine&>(TM);
|
return static_cast<PPCTargetMachine&>(TM);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// SwitchSection - Switch to the specified section of the executable if we
|
|
||||||
/// are not already in it!
|
|
||||||
///
|
|
||||||
void SwitchSection(const char *NewSection, const GlobalValue *GV) {
|
|
||||||
std::string NS;
|
|
||||||
|
|
||||||
if (GV && GV->hasSection())
|
|
||||||
NS = ".section " + GV->getSection();
|
|
||||||
else
|
|
||||||
NS = NewSection;
|
|
||||||
|
|
||||||
if (CurSection != NS) {
|
|
||||||
CurSection = NS;
|
|
||||||
if (!CurSection.empty())
|
|
||||||
O << "\t" << CurSection << "\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned enumRegToMachineReg(unsigned enumReg) {
|
unsigned enumRegToMachineReg(unsigned enumReg) {
|
||||||
switch (enumReg) {
|
switch (enumReg) {
|
||||||
default: assert(0 && "Unhandled register!"); break;
|
default: assert(0 && "Unhandled register!"); break;
|
||||||
@ -466,7 +447,6 @@ void DarwinAsmPrinter::printConstantPool(MachineConstantPool *MCP) {
|
|||||||
bool DarwinAsmPrinter::doInitialization(Module &M) {
|
bool DarwinAsmPrinter::doInitialization(Module &M) {
|
||||||
if (TM.getSubtarget<PPCSubtarget>().isGigaProcessor())
|
if (TM.getSubtarget<PPCSubtarget>().isGigaProcessor())
|
||||||
O << "\t.machine ppc970\n";
|
O << "\t.machine ppc970\n";
|
||||||
SwitchSection("", 0);
|
|
||||||
AsmPrinter::doInitialization(M);
|
AsmPrinter::doInitialization(M);
|
||||||
|
|
||||||
// Darwin wants symbols to be quoted if they have complex names.
|
// Darwin wants symbols to be quoted if they have complex names.
|
||||||
|
Loading…
Reference in New Issue
Block a user