36 #define GET_REGINFO_MC_DESC
37 #include "X86GenRegisterInfo.inc"
39 #define GET_INSTRINFO_MC_DESC
40 #include "X86GenInstrInfo.inc"
42 #define GET_SUBTARGETINFO_MC_DESC
43 #include "X86GenSubtargetInfo.inc"
48 FS =
"+64bit-mode,-32bit-mode,-16bit-mode";
50 FS =
"-64bit-mode,+32bit-mode,-16bit-mode";
52 FS =
"-64bit-mode,-32bit-mode,+16bit-mode";
71 for (
unsigned Reg = X86::NoRegister+1;
Reg < X86::NUM_TARGET_REGS; ++
Reg) {
82 ArchFS = (
Twine(ArchFS) +
"," + FS).str();
87 std::string CPUName = CPU;
91 return createX86MCSubtargetInfoImpl(TT, CPUName, ArchFS);
96 InitX86MCInstrInfo(X);
113 const Triple &TheTriple) {
137 int stackGrowth = is64Bit ? -8 : -4;
140 unsigned StackPtr = is64Bit ? X86::RSP : X86::ESP;
146 unsigned InstPtr = is64Bit ? X86::RIP : X86::EIP;
204 unsigned SyntaxVariant,
208 if (SyntaxVariant == 0)
210 if (SyntaxVariant == 1)
int getDwarfRegNum(unsigned RegNum, bool isEH) const
Map a target register to an equivalent dwarf register number.
bool isOSBinFormatMachO() const
Tests whether the environment is MachO.
MCAsmBackend * createX86_64AsmBackend(const Target &T, const MCRegisterInfo &MRI, const Triple &TT, StringRef CPU)
MCAsmBackend * createX86_32AsmBackend(const Target &T, const MCRegisterInfo &MRI, const Triple &TT, StringRef CPU)
static void RegisterMCInstrAnalysis(Target &T, Target::MCInstrAnalysisCtorFnTy Fn)
RegisterMCInstrAnalysis - Register a MCInstrAnalysis implementation for the given target...
static MCCFIInstruction createOffset(MCSymbol *L, unsigned Register, int Offset)
.cfi_offset Previous value of Register is saved at offset Offset from CFA.
static MCRegisterInfo * createX86MCRegisterInfo(const Triple &TT)
static void RegisterMCInstPrinter(Target &T, Target::MCInstPrinterCtorTy Fn)
RegisterMCInstPrinter - Register a MCInstPrinter implementation for the given target.
unsigned getDwarfRegFlavour(const Triple &TT, bool isEH)
std::string ParseX86Triple(const Triple &TT)
bool isOSWindows() const
Tests whether the OS is Windows.
bool isOSCygMing() const
Tests for either Cygwin or MinGW OS.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
MCCodeEmitter * createX86MCCodeEmitter(const MCInstrInfo &MCII, const MCRegisterInfo &MRI, MCContext &Ctx)
Reg
All possible values of the reg field in the ModR/M byte.
static void RegisterCOFFStreamer(Target &T, Target::COFFStreamerCtorTy Fn)
bool isWindowsMSVCEnvironment() const
Context object for machine code objects.
static MCRelocationInfo * createX86MCRelocationInfo(const Triple &TheTriple, MCContext &Ctx)
static MCCodeGenInfo * createX86MCCodeGenInfo(const Triple &TT, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
void addInitialFrameState(const MCCFIInstruction &Inst)
MCRelocationInfo * createX86_64ELFRelocationInfo(MCContext &Ctx)
Construct X86-64 ELF relocation info.
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
void LLVMInitializeX86TargetMC()
MCRelocationInfo * createMCRelocationInfo(const Triple &TT, MCContext &Ctx)
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
This class is intended to be used as a base class for asm properties and features specific to the tar...
static void RegisterMCAsmBackend(Target &T, Target::MCAsmBackendCtorTy Fn)
RegisterMCAsmBackend - Register a MCAsmBackend implementation for the given target.
static MCCFIInstruction createDefCfa(MCSymbol *L, unsigned Register, int Offset)
.cfi_def_cfa defines a rule for computing CFA as: take address from Register and add Offset to it...
static bool is64Bit(const char *name)
Interface to description of machine instruction set.
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang","erlang-compatible garbage collector")
Create MCExprs from relocations found in an object file.
static void RegisterMCSubtargetInfo(Target &T, Target::MCSubtargetInfoCtorFnTy Fn)
RegisterMCSubtargetInfo - Register a MCSubtargetInfo implementation for the given target...
Triple - Helper class for working with autoconf configuration names.
MCSubtargetInfo * createX86MCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS)
Create a X86 MCSubtargetInfo instance.
bool isOSDarwin() const
isOSDarwin - Is this a "Darwin" OS (OS X or iOS).
void InitLLVM2SEHRegisterMapping(MCRegisterInfo *MRI)
static void RegisterMCCodeEmitter(Target &T, Target::MCCodeEmitterCtorTy Fn)
RegisterMCCodeEmitter - Register a MCCodeEmitter implementation for the given target.
MCRelocationInfo * createX86_64MachORelocationInfo(MCContext &Ctx)
Construct X86-64 Mach-O relocation info.
static void RegisterMCRegInfo(Target &T, Target::MCRegInfoCtorFnTy Fn)
RegisterMCRegInfo - Register a MCRegisterInfo implementation for the given target.
Target - Wrapper for Target specific information.
static MCAsmInfo * createX86MCAsmInfo(const MCRegisterInfo &MRI, const Triple &TheTriple)
RegisterMCAsmInfoFn - Helper template for registering a target assembly info implementation.
static MCInstrInfo * createX86MCInstrInfo()
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
bool isOSBinFormatELF() const
Tests whether the OS uses the ELF binary format.
void initMCCodeGenInfo(Reloc::Model RM=Reloc::Default, CodeModel::Model CM=CodeModel::Default, CodeGenOpt::Level OL=CodeGenOpt::Default)
static void RegisterMCInstrInfo(Target &T, Target::MCInstrInfoCtorFnTy Fn)
RegisterMCInstrInfo - Register a MCInstrInfo implementation for the given target. ...
MCSubtargetInfo - Generic base class for all target subtargets.
MCStreamer * createX86WinCOFFStreamer(MCContext &C, MCAsmBackend &AB, raw_pwrite_stream &OS, MCCodeEmitter *CE, bool RelaxAll)
Construct an X86 Windows COFF machine code streamer which will generate PE/COFF format object files...
EnvironmentType getEnvironment() const
getEnvironment - Get the parsed environment type of this triple.
uint16_t getEncodingValue(unsigned RegNo) const
Returns the encoding for RegNo.
bool isWindowsItaniumEnvironment() const
static void RegisterMCRelocationInfo(Target &T, Target::MCRelocationInfoCtorTy Fn)
RegisterMCRelocationInfo - Register an MCRelocationInfo implementation for the given target...
StringRef - Represent a constant reference to a string, i.e.
static MCInstrAnalysis * createX86MCInstrAnalysis(const MCInstrInfo *Info)
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml","ocaml 3.10-compatible collector")
RegisterMCCodeGenInfoFn - Helper template for registering a target codegen info implementation.
static MCInstPrinter * createX86MCInstPrinter(const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
void mapLLVMRegToSEHReg(unsigned LLVMReg, int SEHReg)
mapLLVMRegToSEHReg - Used to initialize LLVM register to SEH register number mapping.
bool empty() const
empty - Check if the string is empty.