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