24#define GET_INSTRINFO_MC_DESC
25#include "XtensaGenInstrInfo.inc"
27#define GET_REGINFO_MC_DESC
28#include "XtensaGenRegisterInfo.inc"
30#define GET_SUBTARGETINFO_MC_DESC
31#include "XtensaGenSubtargetInfo.inc"
40 Valid = (OffsetVal >= 0 && OffsetVal <= 255);
43 Valid = (OffsetVal >= 0 && OffsetVal <= 510) && ((OffsetVal & 0x1) == 0);
46 Valid = (OffsetVal >= 0 && OffsetVal <= 1020) && ((OffsetVal & 0x3) == 0);
82 return FeatureBits[Xtensa::FeatureBoolean];
84 case Xtensa::CCOMPARE0:
85 if (FeatureBits[Xtensa::FeatureTimers1])
88 case Xtensa::CCOMPARE1:
89 if (FeatureBits[Xtensa::FeatureTimers2])
92 case Xtensa::CCOMPARE2:
93 if (FeatureBits[Xtensa::FeatureTimers3])
96 case Xtensa::CONFIGID0:
98 case Xtensa::CONFIGID1:
100 case Xtensa::CPENABLE:
101 return FeatureBits[Xtensa::FeatureCoprocessor];
102 case Xtensa::DEBUGCAUSE:
106 case Xtensa::EXCCAUSE:
107 case Xtensa::EXCSAVE1:
108 case Xtensa::EXCVADDR:
109 return FeatureBits[Xtensa::FeatureException];
113 case Xtensa::EXCSAVE2:
114 if (FeatureBits[Xtensa::FeatureHighPriInterrupts])
119 case Xtensa::EXCSAVE3:
120 if (FeatureBits[Xtensa::FeatureHighPriInterruptsLevel3])
125 case Xtensa::EXCSAVE4:
126 if (FeatureBits[Xtensa::FeatureHighPriInterruptsLevel4])
131 case Xtensa::EXCSAVE5:
132 if (FeatureBits[Xtensa::FeatureHighPriInterruptsLevel5])
137 case Xtensa::EXCSAVE6:
138 if (FeatureBits[Xtensa::FeatureHighPriInterruptsLevel6])
143 case Xtensa::EXCSAVE7:
144 if (FeatureBits[Xtensa::FeatureHighPriInterruptsLevel7])
147 case Xtensa::INTENABLE:
148 return FeatureBits[Xtensa::FeatureInterrupt];
149 case Xtensa::INTERRUPT:
151 FeatureBits[Xtensa::FeatureInterrupt];
153 case Xtensa::INTCLEAR:
155 FeatureBits[Xtensa::FeatureInterrupt];
157 case Xtensa::ICOUNTLEVEL:
158 case Xtensa::IBREAKENABLE:
160 case Xtensa::IBREAKA0:
161 case Xtensa::IBREAKA1:
162 case Xtensa::DBREAKA0:
163 case Xtensa::DBREAKA1:
164 case Xtensa::DBREAKC0:
165 case Xtensa::DBREAKC1:
166 return FeatureBits[Xtensa::FeatureDebug];
170 return FeatureBits[Xtensa::FeatureLoop];
171 case Xtensa::LITBASE:
172 return FeatureBits[Xtensa::FeatureExtendedL32R];
174 return FeatureBits[Xtensa::FeatureDataCache];
181 return FeatureBits[Xtensa::FeatureMAC16];
186 return FeatureBits[Xtensa::FeatureMiscSR];
189 case Xtensa::THREADPTR:
190 return FeatureBits[FeatureTHREADPTR];
191 case Xtensa::VECBASE:
192 return FeatureBits[Xtensa::FeatureRelocatableVector];
195 return FeatureBits[FeatureSingleFloat];
196 case Xtensa::F64R_LO:
197 case Xtensa::F64R_HI:
199 return FeatureBits[FeatureDFPAccel];
200 case Xtensa::WINDOWBASE:
201 case Xtensa::WINDOWSTART:
202 return FeatureBits[Xtensa::FeatureWindowed];
203 case Xtensa::ATOMCTL:
204 case Xtensa::SCOMPARE1:
205 return FeatureBits[Xtensa::FeatureWindowed];
206 case Xtensa::NoRegister:
217 if (
MRI.getEncodingValue(Xtensa::FCR) == Code) {
218 UserReg = Xtensa::FCR;
219 }
else if (
MRI.getEncodingValue(Xtensa::FSR) == Code) {
220 UserReg = Xtensa::FSR;
221 }
else if (
MRI.getEncodingValue(Xtensa::F64R_LO) == Code) {
222 UserReg = Xtensa::F64R_LO;
223 }
else if (
MRI.getEncodingValue(Xtensa::F64R_HI) == Code) {
224 UserReg = Xtensa::F64R_HI;
225 }
else if (
MRI.getEncodingValue(Xtensa::F64S) == Code) {
226 UserReg = Xtensa::F64S;
227 }
else if (
MRI.getEncodingValue(Xtensa::THREADPTR) == Code) {
228 UserReg = Xtensa::THREADPTR;
243 InitXtensaMCInstrInfo(
X);
248 unsigned SyntaxVariant,
257 InitXtensaMCRegisterInfo(
X, Xtensa::SP);
263 return createXtensaMCSubtargetInfoImpl(TT, CPU, CPU, FS);
unsigned const MachineRegisterInfo * MRI
#define LLVM_FALLTHROUGH
LLVM_FALLTHROUGH - Mark fallthrough cases in switch statements.
#define LLVM_EXTERNAL_VISIBILITY
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
static MCTargetStreamer * createXtensaObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
static MCInstrInfo * createXtensaMCInstrInfo()
static MCInstPrinter * createXtensaMCInstPrinter(const Triple &TT, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
static MCAsmInfo * createXtensaMCAsmInfo(const MCRegisterInfo &MRI, const Triple &TT, const MCTargetOptions &Options)
static MCTargetStreamer * createXtensaAsmTargetStreamer(MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint)
static MCRegisterInfo * createXtensaMCRegisterInfo(const Triple &TT)
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeXtensaTargetMC()
static MCSubtargetInfo * createXtensaMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS)
Container class for subtarget features.
This class is intended to be used as a base class for asm properties and features specific to the tar...
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
Interface to description of machine instruction set.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Wrapper class representing physical registers. Should be passed by value.
Streaming machine code generation interface.
Generic base class for all target subtargets.
Target specific streamer interface.
StringRef - Represent a constant reference to a string, i.e.
Triple - Helper class for working with autoconf configuration names.
bool checkRegister(MCRegister RegNo, const FeatureBitset &FeatureBits, RegisterAccessType RA)
bool isValidAddrOffset(int Scale, int64_t OffsetVal)
MCRegister getUserRegister(unsigned Code, const MCRegisterInfo &MRI)
bool isValidAddrOffsetForOpcode(unsigned Opcode, int64_t Offset)
This is an optimization pass for GlobalISel generic memory operations.
Target & getTheXtensaTarget()
MCAsmBackend * createXtensaAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options)
MCCodeEmitter * createXtensaMCCodeEmitter(const MCInstrInfo &MCII, MCContext &Ctx)
static void RegisterMCRegInfo(Target &T, Target::MCRegInfoCtorFnTy Fn)
RegisterMCRegInfo - Register a MCRegisterInfo implementation for the given target.
static void RegisterMCAsmBackend(Target &T, Target::MCAsmBackendCtorTy Fn)
RegisterMCAsmBackend - Register a MCAsmBackend implementation for the given target.
static void RegisterMCCodeEmitter(Target &T, Target::MCCodeEmitterCtorTy Fn)
RegisterMCCodeEmitter - Register a MCCodeEmitter implementation for the given target.
static void RegisterMCAsmInfo(Target &T, Target::MCAsmInfoCtorFnTy Fn)
RegisterMCAsmInfo - Register a MCAsmInfo implementation for the given target.
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 void RegisterMCInstPrinter(Target &T, Target::MCInstPrinterCtorTy Fn)
RegisterMCInstPrinter - Register a MCInstPrinter implementation for the given target.
static void RegisterMCInstrInfo(Target &T, Target::MCInstrInfoCtorFnTy Fn)
RegisterMCInstrInfo - Register a MCInstrInfo implementation for the given target.
static void RegisterAsmTargetStreamer(Target &T, Target::AsmTargetStreamerCtorTy Fn)