31 #define GET_REGINFO_MC_DESC
32 #include "ARMGenRegisterInfo.inc"
44 Info =
"deprecated since v7, use 'isb'";
51 Info =
"deprecated since v7, use 'dsb'";
59 Info =
"deprecated since v7, use 'dmb'";
70 Info =
"applying IT instruction to more than one subsequent instruction is "
81 "cannot predicate thumb instructions");
88 Info =
"use of SP or PC in the list is deprecated";
98 "cannot predicate thumb instructions");
101 bool ListContainsPC =
false, ListContainsLR =
false;
108 ListContainsLR =
true;
111 ListContainsPC =
true;
114 Info =
"use of SP in the list is deprecated";
119 if (ListContainsPC && ListContainsLR) {
120 Info =
"use of LR and PC simultaneously in the list is deprecated";
127 #define GET_INSTRINFO_MC_DESC
128 #include "ARMGenInstrInfo.inc"
130 #define GET_SUBTARGETINFO_MC_DESC
131 #include "ARMGenSubtargetInfo.inc"
137 std::string ARMArchFeature;
140 if (ArchID != ARM::AK_INVALID && (CPU.
empty() || CPU ==
"generic"))
144 if (ARMArchFeature.empty())
145 ARMArchFeature =
"+thumb-mode";
147 ARMArchFeature +=
",+thumb-mode";
151 if (ARMArchFeature.empty())
152 ARMArchFeature =
"+nacl-trap";
154 ARMArchFeature +=
",+nacl-trap";
157 return ARMArchFeature;
165 ArchFS = (
Twine(ArchFS) +
"," + FS).str();
170 return createARMMCSubtargetInfoImpl(TT, CPU, ArchFS);
175 InitARMMCInstrInfo(X);
181 InitARMMCRegisterInfo(X, ARM::LR, 0, 0,
ARM::PC);
186 const Triple &TheTriple) {
214 bool DWARFMustBeAtTheEnd) {
219 unsigned SyntaxVariant,
223 if (SyntaxVariant == 0)
249 bool isConditionalBranch(
const MCInst &Inst)
const override {
256 bool evaluateBranch(
const MCInst &Inst, uint64_t Addr,
257 uint64_t Size, uint64_t &
Target)
const override {
272 return new ARMMCInstrAnalysis(Info);
MCELFStreamer * createARMELFStreamer(MCContext &Context, MCAsmBackend &TAB, raw_pwrite_stream &OS, MCCodeEmitter *Emitter, bool RelaxAll, bool IsThumb)
static MCStreamer * createARMMachOStreamer(MCContext &Ctx, MCAsmBackend &MAB, raw_pwrite_stream &OS, MCCodeEmitter *Emitter, bool RelaxAll, bool DWARFMustBeAtTheEnd)
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.
static void RegisterMCInstrAnalysis(Target &T, Target::MCInstrAnalysisCtorFnTy Fn)
RegisterMCInstrAnalysis - Register a MCInstrAnalysis implementation for the given target...
static MCInstrInfo * createARMMCInstrInfo()
static bool getITDeprecationInfo(MCInst &MI, const MCSubtargetInfo &STI, std::string &Info)
MCAsmBackend * createThumbLEAsmBackend(const Target &T, const MCRegisterInfo &MRI, const Triple &TT, StringRef CPU, const MCTargetOptions &Options)
MCRelocationInfo * createARMMachORelocationInfo(MCContext &Ctx)
Construct ARM Mach-O relocation info.
static void RegisterMCInstPrinter(Target &T, Target::MCInstPrinterCtorTy Fn)
RegisterMCInstPrinter - Register a MCInstPrinter implementation for the given target.
Target & getTheThumbLETarget()
void LLVMInitializeARMTargetMC()
static bool isThumb(const MCSubtargetInfo &STI)
MCStreamer * createARMWinCOFFStreamer(MCContext &Context, MCAsmBackend &MAB, raw_pwrite_stream &OS, MCCodeEmitter *Emitter, bool RelaxAll, bool IncrementalLinkerCompatible)
static void RegisterAsmTargetStreamer(Target &T, Target::AsmTargetStreamerCtorTy Fn)
bool isOSWindows() const
Tests whether the OS is Windows.
StringRef getArchName(unsigned ArchKind)
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Reg
All possible values of the reg field in the ModR/M byte.
static void RegisterCOFFStreamer(Target &T, Target::COFFStreamerCtorTy Fn)
static MCInstPrinter * createARMMCInstPrinter(const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
Target & getTheARMBETarget()
bool isWindowsMSVCEnvironment() const
Checks if the environment could be MSVC.
Context object for machine code objects.
unsigned getReg() const
Returns the register number.
Target & getTheThumbBETarget()
bool isOSNaCl() const
Tests whether the OS is NaCl (Native Client)
void addInitialFrameState(const MCCFIInstruction &Inst)
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
MCTargetStreamer * createARMTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint, bool isVerboseAsm)
Instances of this class represent a single low-level machine instruction.
MCRelocationInfo * createMCRelocationInfo(const Triple &TT, MCContext &Ctx)
virtual bool isUnconditionalBranch(const MCInst &Inst) const
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.
MCTargetStreamer * createARMObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
static MCRegisterInfo * createARMMCRegisterInfo(const Triple &Triple)
Streaming machine code generation interface.
unsigned const MachineRegisterInfo * MRI
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 RegisterMachOStreamer(Target &T, Target::MachOStreamerCtorTy Fn)
MCAsmBackend * createARMBEAsmBackend(const Target &T, const MCRegisterInfo &MRI, const Triple &TT, StringRef CPU, const MCTargetOptions &Options)
MCCodeEmitter - Generic instruction encoding interface.
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.
MCSubtargetInfo * createARMMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS)
Create a ARM MCSubtargetInfo instance.
MCAsmBackend * createARMLEAsmBackend(const Target &T, const MCRegisterInfo &MRI, const Triple &TT, StringRef CPU, const MCTargetOptions &Options)
static void RegisterMCSubtargetInfo(Target &T, Target::MCSubtargetInfoCtorFnTy Fn)
RegisterMCSubtargetInfo - Register a MCSubtargetInfo implementation for the given target...
static void RegisterObjectTargetStreamer(Target &T, Target::ObjectTargetStreamerCtorTy Fn)
static bool getARMLoadDeprecationInfo(MCInst &MI, const MCSubtargetInfo &STI, std::string &Info)
Triple - Helper class for working with autoconf configuration names.
bool isOSDarwin() const
isOSDarwin - Is this a "Darwin" OS (OS X, iOS, or watchOS).
virtual bool isConditionalBranch(const MCInst &Inst) const
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.
const FeatureBitset & getFeatureBits() const
getFeatureBits - Return the feature bits.
MCAsmBackend * createThumbBEAsmBackend(const Target &T, const MCRegisterInfo &MRI, const Triple &TT, StringRef CPU, const MCTargetOptions &Options)
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 bool getMCRDeprecationInfo(MCInst &MI, const MCSubtargetInfo &STI, std::string &Info)
static bool isUnconditionalBranch(TerminatorInst *Term)
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
MCCodeEmitter * createARMLEMCCodeEmitter(const MCInstrInfo &MCII, const MCRegisterInfo &MRI, MCContext &Ctx)
RegisterMCAsmInfoFn - Helper template for registering a target assembly info implementation.
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
OperandType
Types of operands to CF instructions.
unsigned getNumOperands() const
StringRef getArchName() const
getArchName - Get the architecture (first) component of the triple.
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.
static MCAsmInfo * createARMMCAsmInfo(const MCRegisterInfo &MRI, const Triple &TheTriple)
static void RegisterELFStreamer(Target &T, Target::ELFStreamerCtorTy Fn)
unsigned parseArch(StringRef Arch)
static MCInstrAnalysis * createARMMCInstrAnalysis(const MCInstrInfo *Info)
An abstract base class for streams implementations that also support a pwrite operation.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
MCTargetStreamer * createARMNullTargetStreamer(MCStreamer &S)
cl::opt< bool > RelaxAll("mc-relax-all", cl::desc("When used with filetype=obj, ""relax all fixups in the emitted object file"))
MCStreamer * createMachOStreamer(MCContext &Ctx, MCAsmBackend &TAB, raw_pwrite_stream &OS, MCCodeEmitter *CE, bool RelaxAll, bool DWARFMustBeAtTheEnd, bool LabelSections=false)
static void RegisterNullTargetStreamer(Target &T, Target::NullTargetStreamerCtorTy Fn)
Generic interface to target specific assembler backends.
std::string ParseARMTriple(const Triple &TT, StringRef CPU)
static void RegisterMCRelocationInfo(Target &T, Target::MCRelocationInfoCtorTy Fn)
RegisterMCRelocationInfo - Register an MCRelocationInfo implementation for the given target...
static MCRelocationInfo * createARMMCRelocationInfo(const Triple &TT, MCContext &Ctx)
StringRef - Represent a constant reference to a string, i.e.
static bool getARMStoreDeprecationInfo(MCInst &MI, const MCSubtargetInfo &STI, std::string &Info)
Target & getTheARMLETarget()
MCCodeEmitter * createARMBEMCCodeEmitter(const MCInstrInfo &MCII, const MCRegisterInfo &MRI, MCContext &Ctx)
const MCOperand & getOperand(unsigned i) const