30 #define GET_INSTRINFO_MC_DESC
31 #include "LanaiGenInstrInfo.inc"
33 #define GET_SUBTARGETINFO_MC_DESC
34 #include "LanaiGenSubtargetInfo.inc"
36 #define GET_REGINFO_MC_DESC
37 #include "LanaiGenRegisterInfo.inc"
43 InitLanaiMCInstrInfo(X);
49 InitLanaiMCRegisterInfo(X, Lanai::RCA, 0, 0,
Lanai::PC);
55 std::string CPUName = CPU;
59 return createLanaiMCSubtargetInfoImpl(TT, CPUName, FS);
72 unsigned SyntaxVariant,
76 if (SyntaxVariant == 0)
90 explicit LanaiMCInstrAnalysis(
const MCInstrInfo *Info)
93 bool evaluateBranch(
const MCInst &Inst, uint64_t Addr, uint64_t Size,
94 uint64_t &
Target)
const override {
101 Target = Addr + Size + Imm;
120 return new LanaiMCInstrAnalysis(Info);
Target & getTheLanaiTarget()
static void RegisterMCInstrAnalysis(Target &T, Target::MCInstrAnalysisCtorFnTy Fn)
RegisterMCInstrAnalysis - Register a MCInstrAnalysis implementation for the given target...
MCCodeEmitter * createLanaiMCCodeEmitter(const MCInstrInfo &MCII, const MCRegisterInfo &MRI, MCContext &Ctx)
static void RegisterMCInstPrinter(Target &T, Target::MCInstPrinterCtorTy Fn)
RegisterMCInstPrinter - Register a MCInstPrinter implementation for the given target.
Context object for machine code objects.
static MCInstrAnalysis * createLanaiInstrAnalysis(const MCInstrInfo *Info)
Instances of this class represent a single low-level machine instruction.
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.
Streaming machine code generation interface.
unsigned const MachineRegisterInfo * MRI
MCCodeEmitter - Generic instruction encoding interface.
static MCInstPrinter * createLanaiMCInstPrinter(const Triple &, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
Interface to description of machine instruction set.
MCAsmBackend * createLanaiAsmBackend(const Target &T, const MCRegisterInfo &MRI, const Triple &TheTriple, StringRef CPU, const MCTargetOptions &Options)
static MCRegisterInfo * createLanaiMCRegisterInfo(const Triple &)
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...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Triple - Helper class for working with autoconf configuration names.
static MCStreamer * createMCStreamer(const Triple &T, MCContext &Context, MCAsmBackend &MAB, raw_pwrite_stream &OS, MCCodeEmitter *Emitter, bool RelaxAll)
RegisterMCAsmInfo - Helper template for registering a target assembly info implementation.
static void RegisterMCCodeEmitter(Target &T, Target::MCCodeEmitterCtorTy Fn)
RegisterMCCodeEmitter - Register a MCCodeEmitter implementation for the given target.
MCStreamer * createELFStreamer(MCContext &Ctx, MCAsmBackend &TAB, raw_pwrite_stream &OS, MCCodeEmitter *CE, bool RelaxAll)
Takes ownership of TAB and CE.
static MCInstrInfo * createLanaiMCInstrInfo()
static MCSubtargetInfo * createLanaiMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS)
static void RegisterMCRegInfo(Target &T, Target::MCRegInfoCtorFnTy Fn)
RegisterMCRegInfo - Register a MCRegisterInfo implementation for the given target.
unsigned getOpcode() const
Target - Wrapper for Target specific information.
static MCRelocationInfo * createLanaiElfRelocation(const Triple &TheTriple, MCContext &Ctx)
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.
OperandType
Types of operands to CF instructions.
unsigned getNumOperands() const
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.
void LLVMInitializeLanaiTargetMC()
static void RegisterELFStreamer(Target &T, Target::ELFStreamerCtorTy Fn)
An abstract base class for streams implementations that also support a pwrite operation.
cl::opt< bool > RelaxAll("mc-relax-all", cl::desc("When used with filetype=obj, ""relax all fixups in the emitted object file"))
Generic interface to target specific assembler backends.
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.
const MCOperand & getOperand(unsigned i) const