Go to the documentation of this file.
28 #define GET_INSTRINFO_MC_DESC
29 #include "CSKYGenInstrInfo.inc"
31 #define GET_REGINFO_MC_DESC
32 #include "CSKYGenRegisterInfo.inc"
34 #define GET_SUBTARGETINFO_MC_DESC
35 #include "CSKYGenSubtargetInfo.inc"
45 unsigned Reg =
MRI.getDwarfRegNum(CSKY::R14,
true);
53 InitCSKYMCInstrInfo(
Info);
58 unsigned SyntaxVariant,
67 InitCSKYMCRegisterInfo(
Info, CSKY::R15);
73 std::string CPUName = std::string(CPU);
76 return createCSKYMCSubtargetInfoImpl(TT, CPUName, CPUName,
FS);
82 if (TT.isOSBinFormatELF())
88 std::unique_ptr<MCAsmBackend> &&MAB,
89 std::unique_ptr<MCObjectWriter> &&OW,
90 std::unique_ptr<MCCodeEmitter> &&Emitter,
96 S->getAssembler().setRelaxAll(
true);
151 return new CSKYMCInstrAnalysis(
Info);
This is an optimization pass for GlobalISel generic memory operations.
Context object for machine code objects.
Target - Wrapper for Target specific information.
This class is intended to be used as a base class for asm properties and features specific to the tar...
Reg
All possible values of the reg field in the ModR/M byte.
static void RegisterAsmTargetStreamer(Target &T, Target::AsmTargetStreamerCtorTy Fn)
static void RegisterMCInstrAnalysis(Target &T, Target::MCInstrAnalysisCtorFnTy Fn)
RegisterMCInstrAnalysis - Register a MCInstrAnalysis implementation for the given target.
MCCodeEmitter * createCSKYMCCodeEmitter(const MCInstrInfo &MCII, MCContext &Ctx)
Triple - Helper class for working with autoconf configuration names.
static MCSubtargetInfo * createCSKYMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS)
Instances of this class represent a single low-level machine instruction.
static void RegisterMCInstPrinter(Target &T, Target::MCInstPrinterCtorTy Fn)
RegisterMCInstPrinter - Register a MCInstPrinter implementation for the given target.
unsigned getNumOperands() const
Target & getTheCSKYTarget()
Streaming machine code generation interface.
const Triple & getTargetTriple() const
MCAsmBackend * createCSKYAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options)
const char LLVMTargetMachineRef LLVMPassBuilderOptionsRef Options
Target specific streamer interface.
Analysis containing CSE Info
static MCTargetStreamer * createCSKYObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
static void RegisterMCAsmBackend(Target &T, Target::MCAsmBackendCtorTy Fn)
RegisterMCAsmBackend - Register a MCAsmBackend implementation for the given target.
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
#define LLVM_EXTERNAL_VISIBILITY
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
static void RegisterObjectTargetStreamer(Target &T, Target::ObjectTargetStreamerCtorTy Fn)
static MCAsmInfo * createCSKYMCAsmInfo(const MCRegisterInfo &MRI, const Triple &TT, const MCTargetOptions &Options)
static void RegisterMCAsmInfo(Target &T, Target::MCAsmInfoCtorFnTy Fn)
RegisterMCAsmInfo - Register a MCAsmInfo implementation for the given target.
static MCCFIInstruction cfiDefCfa(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.
void addInitialFrameState(const MCCFIInstruction &Inst)
static void RegisterMCSubtargetInfo(Target &T, Target::MCSubtargetInfoCtorFnTy Fn)
RegisterMCSubtargetInfo - Register a MCSubtargetInfo implementation for the given target.
static MCRegisterInfo * createCSKYMCRegisterInfo(const Triple &TT)
StringRef - Represent a constant reference to a string, i.e.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
unsigned const MachineRegisterInfo * MRI
static bool isUnconditionalBranch(Instruction *Term)
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeCSKYTargetMC()
MCStreamer * createELFStreamer(MCContext &Ctx, std::unique_ptr< MCAsmBackend > &&TAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&CE, bool RelaxAll)
static void RegisterMCInstrInfo(Target &T, Target::MCInstrInfoCtorFnTy Fn)
RegisterMCInstrInfo - Register a MCInstrInfo implementation for the given target.
static void RegisterMCCodeEmitter(Target &T, Target::MCCodeEmitterCtorTy Fn)
RegisterMCCodeEmitter - Register a MCCodeEmitter implementation for the given target.
Interface to description of machine instruction set.
static void RegisterMCRegInfo(Target &T, Target::MCRegInfoCtorFnTy Fn)
RegisterMCRegInfo - Register a MCRegisterInfo implementation for the given target.
static MCInstPrinter * createCSKYMCInstPrinter(const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
static void RegisterELFStreamer(Target &T, Target::ELFStreamerCtorTy Fn)
unsigned getOpcode() const
static MCTargetStreamer * createCSKYAsmTargetStreamer(MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrinter, bool isVerboseAsm)
static MCTargetStreamer * createCSKYNullTargetStreamer(MCStreamer &S)
static void RegisterNullTargetStreamer(Target &T, Target::NullTargetStreamerCtorTy Fn)
static MCInstrInfo * createCSKYMCInstrInfo()
const MCOperand & getOperand(unsigned i) const
static MCInstrAnalysis * createCSKYInstrAnalysis(const MCInstrInfo *Info)
Generic base class for all target subtargets.