31 #define GET_INSTRINFO_MC_DESC
32 #include "MipsGenInstrInfo.inc"
34 #define GET_SUBTARGETINFO_MC_DESC
35 #include "MipsGenSubtargetInfo.inc"
37 #define GET_REGINFO_MC_DESC
38 #include "MipsGenRegisterInfo.inc"
43 std::string MipsArchFeature;
44 size_t DashPosition = 0;
48 DashPosition = TT.
find(
'-');
55 TheTriple = TT.
substr(0,DashPosition);
58 if (TheTriple ==
"mips" || TheTriple ==
"mipsel") {
59 if (CPU.
empty() || CPU ==
"mips32") {
60 MipsArchFeature =
"+mips32";
61 }
else if (CPU ==
"mips32r2") {
62 MipsArchFeature =
"+mips32r2";
65 if (CPU.
empty() || CPU ==
"mips64") {
66 MipsArchFeature =
"+mips64";
67 }
else if (CPU ==
"mips64r2") {
68 MipsArchFeature =
"+mips64r2";
71 return MipsArchFeature;
76 InitMipsMCInstrInfo(X);
82 InitMipsMCRegisterInfo(X, Mips::RA);
91 ArchFS = ArchFS +
"," + FS.
str();
96 InitMipsMCSubtargetInfo(X, TT, CPU, ArchFS);
123 unsigned SyntaxVariant,
141 bool isVerboseAsm,
bool useLoc,
bool useCFI,
147 useDwarfDirectory, InstPrint, CE, TAB,
int getDwarfRegNum(unsigned RegNum, bool isEH) const
Map a target register to an equivalent dwarf register number. Returns -1 if there is no equivalent va...
MCStreamer * createMCAsmStreamer(MCContext &Ctx, formatted_raw_ostream &OS, bool isVerboseAsm, bool useLoc, bool useCFI, bool useDwarfDirectory, MCInstPrinter *InstPrint, MCCodeEmitter *CE, MCAsmBackend *TAB, bool ShowInst)
size_t find(char C, size_t From=0) const
StringRef substr(size_t Start, size_t N=npos) const
std::string str() const
str - Get the contents as an std::string.
static void RegisterMCInstPrinter(Target &T, Target::MCInstPrinterCtorTy Fn)
MCStreamer * createELFStreamer(MCContext &Ctx, MCTargetStreamer *TargetStreamer, MCAsmBackend &TAB, raw_ostream &OS, MCCodeEmitter *CE, bool RelaxAll, bool NoExecStack)
MCCodeEmitter * createMipsMCCodeEmitterEL(const MCInstrInfo &MCII, const MCRegisterInfo &MRI, const MCSubtargetInfo &STI, MCContext &Ctx)
static MCSubtargetInfo * createMipsMCSubtargetInfo(StringRef TT, StringRef CPU, StringRef FS)
MCAsmBackend * createMipsAsmBackendEB64(const Target &T, const MCRegisterInfo &MRI, StringRef TT, StringRef CPU)
void LLVMInitializeMipsTargetMC()
void addInitialFrameState(const MCCFIInstruction &Inst)
static MCStreamer * createMCStreamer(const Target &T, StringRef TT, MCContext &Context, MCAsmBackend &MAB, raw_ostream &OS, MCCodeEmitter *Emitter, bool RelaxAll, bool NoExecStack)
void InitMCCodeGenInfo(Reloc::Model RM=Reloc::Default, CodeModel::Model CM=CodeModel::Default, CodeGenOpt::Level OL=CodeGenOpt::Default)
static MCRegisterInfo * createMipsMCRegisterInfo(StringRef TT)
static void RegisterMCAsmBackend(Target &T, Target::MCAsmBackendCtorTy Fn)
static MCInstrInfo * createMipsMCInstrInfo()
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 void RegisterMCObjectStreamer(Target &T, Target::MCObjectStreamerCtorTy Fn)
MCCodeEmitter - Generic instruction encoding interface.
static void RegisterAsmStreamer(Target &T, Target::AsmStreamerCtorTy Fn)
static MCAsmInfo * createMipsMCAsmInfo(const MCRegisterInfo &MRI, StringRef TT)
static void RegisterMCCodeGenInfo(Target &T, Target::MCCodeGenInfoCtorFnTy Fn)
static void RegisterMCSubtargetInfo(Target &T, Target::MCSubtargetInfoCtorFnTy Fn)
static void RegisterMCCodeEmitter(Target &T, Target::MCCodeEmitterCtorTy Fn)
MCAsmBackend * createMipsAsmBackendEB32(const Target &T, const MCRegisterInfo &MRI, StringRef TT, StringRef CPU)
MCStreamer * createAsmStreamer(MCContext &Ctx, MCTargetStreamer *TargetStreamer, formatted_raw_ostream &OS, bool isVerboseAsm, bool useLoc, bool useCFI, bool useDwarfDirectory, MCInstPrinter *InstPrint=0, MCCodeEmitter *CE=0, MCAsmBackend *TAB=0, bool ShowInst=false)
static void RegisterMCRegInfo(Target &T, Target::MCRegInfoCtorFnTy Fn)
static MCInstPrinter * createMipsMCInstPrinter(const Target &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI, const MCSubtargetInfo &STI)
MCAsmBackend * createMipsAsmBackendEL64(const Target &T, const MCRegisterInfo &MRI, StringRef TT, StringRef CPU)
MCAsmBackend * createMipsAsmBackendEL32(const Target &T, const MCRegisterInfo &MRI, StringRef TT, StringRef CPU)
static void RegisterMCInstrInfo(Target &T, Target::MCInstrInfoCtorFnTy Fn)
MCAsmBackend - Generic interface to target specific assembler backends.
cl::opt< bool > RelaxAll("mc-relax-all", cl::desc("When used with filetype=obj, ""relax all fixups in the emitted object file"))
MCCodeEmitter * createMipsMCCodeEmitterEB(const MCInstrInfo &MCII, const MCRegisterInfo &MRI, const MCSubtargetInfo &STI, MCContext &Ctx)
static std::string ParseMipsTriple(StringRef TT, StringRef CPU)
const MCRegisterInfo & MRI
static MCCodeGenInfo * createMipsMCCodeGenInfo(StringRef TT, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml","ocaml 3.10-compatible collector")
static RegisterPass< NVPTXAllocaHoisting > X("alloca-hoisting","Hoisting alloca instructions in non-entry ""blocks to the entry block")
bool empty() const
empty - Check if the string is empty.