mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-17 23:44:43 +00:00
Put Target definitions inside Target specific header, and llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76344 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8ad2f98739
commit
4cb1e13769
@ -111,6 +111,8 @@ FunctionPass *createARMConstantIslandPass();
|
||||
|
||||
FunctionPass *createThumb2ITBlockPass();
|
||||
|
||||
extern Target TheARMTarget, TheThumbTarget;
|
||||
|
||||
} // end namespace llvm;
|
||||
|
||||
// Defines symbolic names for ARM registers. This defines a mapping from
|
||||
|
@ -29,11 +29,10 @@ static cl::opt<bool> DisableIfConversion("disable-arm-if-conversion",cl::Hidden,
|
||||
cl::desc("Disable if-conversion pass"));
|
||||
|
||||
// Register the target.
|
||||
extern Target TheARMTarget;
|
||||
static RegisterTarget<ARMTargetMachine> X(TheARMTarget, "arm", "ARM");
|
||||
static RegisterTarget<ARMTargetMachine> X(llvm::TheARMTarget, "arm", "ARM");
|
||||
|
||||
extern Target TheThumbTarget;
|
||||
static RegisterTarget<ThumbTargetMachine> Y(TheThumbTarget, "thumb", "Thumb");
|
||||
static RegisterTarget<ThumbTargetMachine> Y(llvm::TheThumbTarget, "thumb",
|
||||
"Thumb");
|
||||
|
||||
// Force static initialization.
|
||||
extern "C" void LLVMInitializeARMTarget() { }
|
||||
|
@ -1295,7 +1295,6 @@ FunctionPass *llvm::createARMCodePrinterPass(formatted_raw_ostream &o,
|
||||
|
||||
// Force static initialization.
|
||||
extern "C" void LLVMInitializeARMAsmPrinter() {
|
||||
extern Target TheARMTarget, TheThumbTarget;
|
||||
TargetRegistry::RegisterAsmPrinter(TheARMTarget, createARMCodePrinterPass);
|
||||
TargetRegistry::RegisterAsmPrinter(TheThumbTarget, createARMCodePrinterPass);
|
||||
}
|
||||
|
@ -7,11 +7,12 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "ARM.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
Target TheARMTarget;
|
||||
Target llvm::TheARMTarget;
|
||||
|
||||
static unsigned ARM_JITMatchQuality() {
|
||||
#if defined(__arm__)
|
||||
@ -47,7 +48,7 @@ static unsigned ARM_ModuleMatchQuality(const Module &M) {
|
||||
return ARM_JITMatchQuality()/2;
|
||||
}
|
||||
|
||||
Target TheThumbTarget;
|
||||
Target llvm::TheThumbTarget;
|
||||
|
||||
static unsigned Thumb_JITMatchQuality() {
|
||||
#if defined(__thumb__)
|
||||
|
@ -39,6 +39,8 @@ namespace llvm {
|
||||
FunctionPass *createAlphaLLRPPass(AlphaTargetMachine &tm);
|
||||
FunctionPass *createAlphaBranchSelectionPass();
|
||||
|
||||
extern Target TheAlphaTarget;
|
||||
|
||||
} // end namespace llvm;
|
||||
|
||||
// Defines symbolic names for Alpha registers. This defines a mapping from
|
||||
|
@ -22,7 +22,6 @@
|
||||
using namespace llvm;
|
||||
|
||||
// Register the targets
|
||||
extern Target TheAlphaTarget;
|
||||
static RegisterTarget<AlphaTargetMachine> X(TheAlphaTarget, "alpha",
|
||||
"Alpha [experimental]");
|
||||
|
||||
|
@ -295,7 +295,6 @@ bool AlphaAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
|
||||
|
||||
// Force static initialization.
|
||||
extern "C" void LLVMInitializeAlphaAsmPrinter() {
|
||||
extern Target TheAlphaTarget;
|
||||
TargetRegistry::RegisterAsmPrinter(TheAlphaTarget,
|
||||
createAlphaCodePrinterPass);
|
||||
}
|
||||
|
@ -7,11 +7,12 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "Alpha.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
Target TheAlphaTarget;
|
||||
llvm::Target llvm::TheAlphaTarget;
|
||||
|
||||
static unsigned Alpha_JITMatchQuality() {
|
||||
#ifdef __alpha
|
||||
|
@ -51,7 +51,6 @@
|
||||
using namespace llvm;
|
||||
|
||||
// Register the target.
|
||||
extern Target TheCBackendTarget;
|
||||
static RegisterTarget<CTargetMachine> X(TheCBackendTarget, "c", "C backend");
|
||||
|
||||
// Force static initialization.
|
||||
|
@ -34,6 +34,8 @@ struct CTargetMachine : public TargetMachine {
|
||||
virtual const TargetData *getTargetData() const { return &DataLayout; }
|
||||
};
|
||||
|
||||
extern Target TheCBackendTarget;
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
|
||||
|
@ -7,11 +7,12 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "CTargetMachine.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
Target TheCBackendTarget;
|
||||
Target llvm::TheCBackendTarget;
|
||||
|
||||
static unsigned CBackend_JITMatchQuality() {
|
||||
return 0;
|
||||
|
@ -607,6 +607,5 @@ FunctionPass *llvm::createSPUAsmPrinterPass(formatted_raw_ostream &o,
|
||||
|
||||
// Force static initialization.
|
||||
extern "C" void LLVMInitializeCellSPUAsmPrinter() {
|
||||
extern Target TheCellSPUTarget;
|
||||
TargetRegistry::RegisterAsmPrinter(TheCellSPUTarget, createSPUAsmPrinterPass);
|
||||
}
|
||||
|
@ -92,6 +92,9 @@ namespace llvm {
|
||||
inline bool isU10Constant(uint64_t Value) {
|
||||
return (Value == (Value & 0x3ff));
|
||||
}
|
||||
|
||||
extern Target TheCellSPUTarget;
|
||||
|
||||
}
|
||||
|
||||
// Defines symbolic names for the SPU instructions.
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
extern Target TheCellSPUTarget;
|
||||
namespace {
|
||||
// Register the targets
|
||||
RegisterTarget<SPUTargetMachine>
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
Target TheCellSPUTarget;
|
||||
Target llvm::TheCellSPUTarget;
|
||||
|
||||
static unsigned CellSPU_JITMatchQuality() {
|
||||
return 0;
|
||||
|
@ -73,7 +73,6 @@ static cl::opt<std::string> NameToGenerate("cppfor", cl::Optional,
|
||||
cl::init("!bad!"));
|
||||
|
||||
// Register the target.
|
||||
extern Target TheCppBackendTarget;
|
||||
static RegisterTarget<CPPTargetMachine> X(TheCppBackendTarget, "cpp", "C++ backend");
|
||||
|
||||
// Force static initialization.
|
||||
|
@ -36,6 +36,8 @@ struct CPPTargetMachine : public TargetMachine {
|
||||
virtual const TargetData *getTargetData() const { return &DataLayout; }
|
||||
};
|
||||
|
||||
extern Target TheCppBackendTarget;
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
Target TheCppBackendTarget;
|
||||
Target llvm::TheCppBackendTarget;
|
||||
|
||||
static unsigned CppBackend_JITMatchQuality() {
|
||||
return 0;
|
||||
|
@ -377,6 +377,5 @@ FunctionPass *llvm::createIA64CodePrinterPass(formatted_raw_ostream &o,
|
||||
|
||||
// Force static initialization.
|
||||
extern "C" void LLVMInitializeIA64AsmPrinter() {
|
||||
extern Target TheIA64Target;
|
||||
TargetRegistry::RegisterAsmPrinter(TheIA64Target, createIA64CodePrinterPass);
|
||||
}
|
||||
|
@ -41,6 +41,8 @@ FunctionPass *createIA64CodePrinterPass(formatted_raw_ostream &o,
|
||||
TargetMachine &tm,
|
||||
bool verbose);
|
||||
|
||||
extern Target TheIA64Target;
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
// Defines symbolic names for IA64 registers. This defines a mapping from
|
||||
|
@ -20,7 +20,6 @@
|
||||
using namespace llvm;
|
||||
|
||||
// Register the target
|
||||
extern Target TheIA64Target;
|
||||
static RegisterTarget<IA64TargetMachine> X(TheIA64Target, "ia64",
|
||||
"IA-64 (Itanium) [experimental]");
|
||||
|
||||
|
@ -7,11 +7,12 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "IA64.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
Target TheIA64Target;
|
||||
Target llvm::TheIA64Target;
|
||||
|
||||
static unsigned IA64_JITMatchQuality() {
|
||||
return 0;
|
||||
|
@ -47,7 +47,6 @@ namespace {
|
||||
};
|
||||
}
|
||||
|
||||
extern Target TheMSILTarget;
|
||||
static RegisterTarget<MSILTarget> X(TheMSILTarget, "msil", "MSIL backend");
|
||||
|
||||
// Force static initialization.
|
||||
|
@ -30,6 +30,10 @@
|
||||
#include <ios>
|
||||
using namespace llvm;
|
||||
|
||||
namespace llvm {
|
||||
extern Target TheMSILTarget;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
class MSILModule : public ModulePass {
|
||||
@ -253,6 +257,7 @@ namespace {
|
||||
|
||||
void printExternals();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
Target TheMSILTarget;
|
||||
Target llvm::TheMSILTarget;
|
||||
|
||||
static unsigned MSIL_JITMatchQuality() {
|
||||
return 0;
|
||||
|
@ -27,6 +27,9 @@ namespace llvm {
|
||||
FunctionPass *createMSP430CodePrinterPass(formatted_raw_ostream &o,
|
||||
TargetMachine &tm,
|
||||
bool verbose);
|
||||
|
||||
extern Target TheMSP430Target;
|
||||
|
||||
} // end namespace llvm;
|
||||
|
||||
// Defines symbolic names for MSP430 registers.
|
||||
|
@ -23,7 +23,6 @@
|
||||
using namespace llvm;
|
||||
|
||||
// Register the targets
|
||||
extern Target TheMSP430Target;
|
||||
static RegisterTarget<MSP430TargetMachine>
|
||||
X(TheMSP430Target, "msp430", "MSP430 [experimental]");
|
||||
|
||||
|
@ -7,11 +7,12 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "MSP430.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
Target TheMSP430Target;
|
||||
Target llvm::TheMSP430Target;
|
||||
|
||||
static unsigned MSP430_JITMatchQuality() {
|
||||
return 0;
|
||||
|
@ -578,10 +578,8 @@ doFinalization(Module &M)
|
||||
|
||||
// Force static initialization.
|
||||
extern "C" void LLVMInitializeMipsAsmPrinter() {
|
||||
extern Target TheMipsTarget;
|
||||
TargetRegistry::RegisterAsmPrinter(TheMipsTarget, createMipsCodePrinterPass);
|
||||
|
||||
extern Target TheMipselTarget;
|
||||
TargetRegistry::RegisterAsmPrinter(TheMipselTarget,
|
||||
createMipsCodePrinterPass);
|
||||
}
|
||||
|
@ -28,6 +28,10 @@ namespace llvm {
|
||||
FunctionPass *createMipsCodePrinterPass(formatted_raw_ostream &OS,
|
||||
TargetMachine &TM,
|
||||
bool Verbose);
|
||||
|
||||
extern Target TheMipsTarget;
|
||||
extern Target TheMipselTarget;
|
||||
|
||||
} // end namespace llvm;
|
||||
|
||||
// Defines symbolic names for Mips registers. This defines a mapping from
|
||||
|
@ -20,10 +20,8 @@
|
||||
using namespace llvm;
|
||||
|
||||
// Register the target.
|
||||
extern Target TheMipsTarget;
|
||||
static RegisterTarget<MipsTargetMachine> X(TheMipsTarget, "mips", "Mips");
|
||||
|
||||
extern Target TheMipselTarget;
|
||||
static RegisterTarget<MipselTargetMachine> Y(TheMipselTarget, "mipsel",
|
||||
"Mipsel");
|
||||
|
||||
|
@ -7,11 +7,12 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "Mips.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
Target TheMipsTarget;
|
||||
Target llvm::TheMipsTarget;
|
||||
|
||||
static unsigned Mips_JITMatchQuality() {
|
||||
return 0;
|
||||
@ -40,7 +41,7 @@ static unsigned Mips_ModuleMatchQuality(const Module &M) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Target TheMipselTarget;
|
||||
Target llvm::TheMipselTarget;
|
||||
|
||||
static unsigned Mipsel_JITMatchQuality() {
|
||||
return 0;
|
||||
|
@ -348,6 +348,10 @@ namespace PIC16CC {
|
||||
bool Verbose);
|
||||
// Banksel optimzer pass.
|
||||
FunctionPass *createPIC16MemSelOptimizerPass();
|
||||
|
||||
extern Target ThePIC16Target;
|
||||
extern Target TheCooperTarget;
|
||||
|
||||
} // end namespace llvm;
|
||||
|
||||
// Defines symbolic names for PIC16 registers. This defines a mapping from
|
||||
|
@ -23,11 +23,9 @@
|
||||
using namespace llvm;
|
||||
|
||||
// Register the targets
|
||||
extern Target ThePIC16Target;
|
||||
static RegisterTarget<PIC16TargetMachine>
|
||||
X(ThePIC16Target, "pic16", "PIC16 14-bit [experimental].");
|
||||
|
||||
extern Target TheCooperTarget;
|
||||
static RegisterTarget<CooperTargetMachine>
|
||||
Y(TheCooperTarget, "cooper", "PIC16 Cooper [experimental].");
|
||||
|
||||
|
@ -7,11 +7,12 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "PIC16.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
Target ThePIC16Target;
|
||||
Target llvm::ThePIC16Target;
|
||||
|
||||
static unsigned PIC16_JITMatchQuality() {
|
||||
return 0;
|
||||
@ -25,7 +26,7 @@ static unsigned PIC16_ModuleMatchQuality(const Module &M) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Target TheCooperTarget;
|
||||
Target llvm::TheCooperTarget;
|
||||
|
||||
static unsigned Cooper_JITMatchQuality() {
|
||||
return 0;
|
||||
|
@ -1095,9 +1095,7 @@ FunctionPass *llvm::createPPCAsmPrinterPass(formatted_raw_ostream &o,
|
||||
|
||||
// Force static initialization.
|
||||
extern "C" void LLVMInitializePowerPCAsmPrinter() {
|
||||
extern Target ThePPC32Target;
|
||||
TargetRegistry::RegisterAsmPrinter(ThePPC32Target, createPPCAsmPrinterPass);
|
||||
|
||||
extern Target ThePPC64Target;
|
||||
TargetRegistry::RegisterAsmPrinter(ThePPC64Target, createPPCAsmPrinterPass);
|
||||
}
|
||||
|
@ -38,6 +38,10 @@ FunctionPass *createPPCJITCodeEmitterPass(PPCTargetMachine &TM,
|
||||
JITCodeEmitter &MCE);
|
||||
FunctionPass *createPPCObjectCodeEmitterPass(PPCTargetMachine &TM,
|
||||
ObjectCodeEmitter &OCE);
|
||||
|
||||
extern Target ThePPC32Target;
|
||||
extern Target ThePPC64Target;
|
||||
|
||||
} // end namespace llvm;
|
||||
|
||||
// Defines symbolic names for PowerPC registers. This defines a mapping from
|
||||
|
@ -22,11 +22,9 @@
|
||||
using namespace llvm;
|
||||
|
||||
// Register the targets
|
||||
extern Target ThePPC32Target;
|
||||
static RegisterTarget<PPC32TargetMachine>
|
||||
X(ThePPC32Target, "ppc32", "PowerPC 32");
|
||||
|
||||
extern Target ThePPC64Target;
|
||||
static RegisterTarget<PPC64TargetMachine>
|
||||
Y(ThePPC64Target, "ppc64", "PowerPC 64");
|
||||
|
||||
|
@ -7,11 +7,12 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "PPC.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
Target ThePPC32Target;
|
||||
Target llvm::ThePPC32Target;
|
||||
|
||||
static unsigned PPC32_JITMatchQuality() {
|
||||
#if defined(__POWERPC__) || defined (__ppc__) || defined(_POWER) || defined(__PPC__)
|
||||
@ -47,7 +48,7 @@ static unsigned PPC32_ModuleMatchQuality(const Module &M) {
|
||||
return PPC32_JITMatchQuality()/2;
|
||||
}
|
||||
|
||||
Target ThePPC64Target;
|
||||
Target llvm::ThePPC64Target;
|
||||
|
||||
static unsigned PPC64_JITMatchQuality() {
|
||||
#if defined(__POWERPC__) || defined (__ppc__) || defined(_POWER) || defined(__PPC__)
|
||||
|
@ -353,7 +353,6 @@ bool SparcAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
|
||||
|
||||
// Force static initialization.
|
||||
extern "C" void LLVMInitializeSparcAsmPrinter() {
|
||||
extern Target TheSparcTarget;
|
||||
TargetRegistry::RegisterAsmPrinter(TheSparcTarget,
|
||||
createSparcCodePrinterPass);
|
||||
}
|
||||
|
@ -30,6 +30,9 @@ namespace llvm {
|
||||
bool Verbose);
|
||||
FunctionPass *createSparcDelaySlotFillerPass(TargetMachine &TM);
|
||||
FunctionPass *createSparcFPMoverPass(TargetMachine &TM);
|
||||
|
||||
extern Target TheSparcTarget;
|
||||
|
||||
} // end namespace llvm;
|
||||
|
||||
// Defines symbolic names for Sparc registers. This defines a mapping from
|
||||
|
@ -19,7 +19,6 @@
|
||||
using namespace llvm;
|
||||
|
||||
// Register the target.
|
||||
extern Target TheSparcTarget;
|
||||
static RegisterTarget<SparcTargetMachine> X(TheSparcTarget, "sparc", "SPARC");
|
||||
|
||||
// Force static initialization.
|
||||
|
@ -7,11 +7,12 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "Sparc.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
Target TheSparcTarget;
|
||||
Target llvm::TheSparcTarget;
|
||||
|
||||
static unsigned Sparc_JITMatchQuality() {
|
||||
return 0;
|
||||
|
@ -418,7 +418,6 @@ void SystemZAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) {
|
||||
|
||||
// Force static initialization.
|
||||
extern "C" void LLVMInitializeSystemZAsmPrinter() {
|
||||
extern Target TheSystemZTarget;
|
||||
TargetRegistry::RegisterAsmPrinter(TheSystemZTarget,
|
||||
createSystemZCodePrinterPass);
|
||||
}
|
||||
|
@ -50,6 +50,8 @@ namespace llvm {
|
||||
TargetMachine &tm,
|
||||
bool verbose);
|
||||
|
||||
extern Target TheSystemZTarget;
|
||||
|
||||
} // end namespace llvm;
|
||||
|
||||
// Defines symbolic names for SystemZ registers.
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "llvm/Target/TargetMachineRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
extern Target TheSystemZTarget;
|
||||
namespace {
|
||||
// Register the target.
|
||||
RegisterTarget<SystemZTargetMachine> X(TheSystemZTarget,
|
||||
|
@ -7,11 +7,12 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "SystemZ.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
Target TheSystemZTarget;
|
||||
Target llvm::TheSystemZTarget;
|
||||
|
||||
static unsigned SystemZ_JITMatchQuality() {
|
||||
return 0;
|
||||
|
@ -7,6 +7,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "X86.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
#include "llvm/Target/TargetAsmParser.h"
|
||||
using namespace llvm;
|
||||
@ -33,8 +34,6 @@ namespace {
|
||||
|
||||
// Force static initialization.
|
||||
extern "C" void LLVMInitializeX86AsmParser() {
|
||||
extern Target TheX86_32Target;
|
||||
TargetRegistry::RegisterAsmParser(TheX86_32Target, &createAsmParser);
|
||||
extern Target TheX86_64Target;
|
||||
TargetRegistry::RegisterAsmParser(TheX86_64Target, &createAsmParser);
|
||||
}
|
||||
|
@ -14,6 +14,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "X86.h"
|
||||
#include "X86ATTAsmPrinter.h"
|
||||
#include "X86IntelAsmPrinter.h"
|
||||
#include "X86Subtarget.h"
|
||||
@ -36,9 +37,6 @@ FunctionPass *llvm::createX86CodePrinterPass(formatted_raw_ostream &o,
|
||||
|
||||
// Force static initialization.
|
||||
extern "C" void LLVMInitializeX86AsmPrinter() {
|
||||
extern Target TheX86_32Target;
|
||||
TargetRegistry::RegisterAsmPrinter(TheX86_32Target, createX86CodePrinterPass);
|
||||
|
||||
extern Target TheX86_64Target;
|
||||
TargetRegistry::RegisterAsmPrinter(TheX86_64Target, createX86CodePrinterPass);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
Target TheX86_32Target;
|
||||
Target llvm::TheX86_32Target;
|
||||
|
||||
static unsigned X86_32_JITMatchQuality() {
|
||||
#if defined(i386) || defined(__i386__) || defined(__x86__) || defined(_M_IX86)
|
||||
@ -47,7 +47,7 @@ static unsigned X86_32_ModuleMatchQuality(const Module &M) {
|
||||
return X86_32_JITMatchQuality()/2;
|
||||
}
|
||||
|
||||
Target TheX86_64Target;
|
||||
Target llvm::TheX86_64Target;
|
||||
|
||||
static unsigned X86_64_JITMatchQuality() {
|
||||
#if defined(__x86_64__) || defined(_M_AMD64)
|
||||
|
@ -71,6 +71,8 @@ FunctionPass *createEmitX86CodeToMemory();
|
||||
///
|
||||
FunctionPass *createX86MaxStackAlignmentCalculatorPass();
|
||||
|
||||
extern Target TheX86_32Target, TheX86_64Target;
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
// Defines symbolic names for X86 registers. This defines a mapping from
|
||||
|
@ -24,11 +24,9 @@
|
||||
using namespace llvm;
|
||||
|
||||
// Register the target.
|
||||
extern Target TheX86_32Target;
|
||||
static RegisterTarget<X86_32TargetMachine>
|
||||
X(TheX86_32Target, "x86", "32-bit X86: Pentium-Pro and above");
|
||||
|
||||
extern Target TheX86_64Target;
|
||||
static RegisterTarget<X86_64TargetMachine>
|
||||
Y(TheX86_64Target, "x86-64", "64-bit X86: EM64T and AMD64");
|
||||
|
||||
|
@ -7,11 +7,12 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "XCore.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
Target TheXCoreTarget;
|
||||
Target llvm::TheXCoreTarget;
|
||||
|
||||
static unsigned XCore_JITMatchQuality() {
|
||||
return 0;
|
||||
|
@ -27,6 +27,9 @@ namespace llvm {
|
||||
FunctionPass *createXCoreCodePrinterPass(formatted_raw_ostream &OS,
|
||||
TargetMachine &TM,
|
||||
bool Verbose);
|
||||
|
||||
extern Target TheXCoreTarget;
|
||||
|
||||
} // end namespace llvm;
|
||||
|
||||
// Defines symbolic names for XCore registers. This defines a mapping from
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "llvm/Target/TargetMachineRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
extern Target TheXCoreTarget;
|
||||
namespace {
|
||||
// Register the target.
|
||||
RegisterTarget<XCoreTargetMachine> X(TheXCoreTarget, "xcore", "XCore");
|
||||
|
Loading…
x
Reference in New Issue
Block a user