38 #define GET_REGINFO_MC_DESC 39 #include "X86GenRegisterInfo.inc" 41 #define GET_INSTRINFO_MC_DESC 42 #define GET_INSTRINFO_MC_HELPERS 43 #include "X86GenInstrInfo.inc" 45 #define GET_SUBTARGETINFO_MC_DESC 46 #include "X86GenSubtargetInfo.inc" 51 FS =
"+64bit-mode,-32bit-mode,-16bit-mode";
53 FS =
"-64bit-mode,+32bit-mode,-16bit-mode";
55 FS =
"-64bit-mode,-32bit-mode,+16bit-mode";
74 for (
unsigned Reg = X86::NoRegister + 1;
Reg < X86::NUM_TARGET_REGS; ++
Reg) {
85 {codeview::RegisterId::CL, X86::CL},
86 {codeview::RegisterId::DL, X86::DL},
88 {codeview::RegisterId::AH, X86::AH},
89 {codeview::RegisterId::CH, X86::CH},
90 {codeview::RegisterId::DH, X86::DH},
91 {codeview::RegisterId::BH, X86::BH},
92 {codeview::RegisterId::AX, X86::AX},
93 {codeview::RegisterId::CX, X86::CX},
94 {codeview::RegisterId::DX, X86::DX},
95 {codeview::RegisterId::BX, X86::BX},
96 {codeview::RegisterId::SP, X86::SP},
97 {codeview::RegisterId::BP, X86::BP},
99 {codeview::RegisterId::DI, X86::DI},
109 {codeview::RegisterId::EFLAGS, X86::EFLAGS},
111 {codeview::RegisterId::ST0, X86::FP0},
112 {codeview::RegisterId::ST1, X86::FP1},
113 {codeview::RegisterId::ST2, X86::FP2},
114 {codeview::RegisterId::ST3, X86::FP3},
115 {codeview::RegisterId::ST4, X86::FP4},
116 {codeview::RegisterId::ST5, X86::FP5},
117 {codeview::RegisterId::ST6, X86::FP6},
118 {codeview::RegisterId::ST7, X86::FP7},
120 {codeview::RegisterId::XMM0, X86::XMM0},
121 {codeview::RegisterId::XMM1, X86::XMM1},
122 {codeview::RegisterId::XMM2, X86::XMM2},
123 {codeview::RegisterId::XMM3, X86::XMM3},
124 {codeview::RegisterId::XMM4, X86::XMM4},
125 {codeview::RegisterId::XMM5, X86::XMM5},
126 {codeview::RegisterId::XMM6, X86::XMM6},
127 {codeview::RegisterId::XMM7, X86::XMM7},
129 {codeview::RegisterId::XMM8, X86::XMM8},
130 {codeview::RegisterId::XMM9, X86::XMM9},
131 {codeview::RegisterId::XMM10, X86::XMM10},
132 {codeview::RegisterId::XMM11, X86::XMM11},
133 {codeview::RegisterId::XMM12, X86::XMM12},
134 {codeview::RegisterId::XMM13, X86::XMM13},
135 {codeview::RegisterId::XMM14, X86::XMM14},
136 {codeview::RegisterId::XMM15, X86::XMM15},
138 {codeview::RegisterId::SIL, X86::SIL},
139 {codeview::RegisterId::DIL, X86::DIL},
140 {codeview::RegisterId::BPL, X86::BPL},
141 {codeview::RegisterId::SPL, X86::SPL},
142 {codeview::RegisterId::RAX, X86::RAX},
143 {codeview::RegisterId::RBX, X86::RBX},
144 {codeview::RegisterId::RCX, X86::RCX},
145 {codeview::RegisterId::RDX, X86::RDX},
146 {codeview::RegisterId::RSI, X86::RSI},
147 {codeview::RegisterId::RDI, X86::RDI},
148 {codeview::RegisterId::RBP, X86::RBP},
149 {codeview::RegisterId::RSP, X86::RSP},
150 {codeview::RegisterId::R8, X86::R8},
151 {codeview::RegisterId::R9, X86::R9},
152 {codeview::RegisterId::R10, X86::R10},
153 {codeview::RegisterId::R11, X86::R11},
154 {codeview::RegisterId::R12, X86::R12},
155 {codeview::RegisterId::R13, X86::R13},
156 {codeview::RegisterId::R14, X86::R14},
157 {codeview::RegisterId::R15, X86::R15},
158 {codeview::RegisterId::R8B, X86::R8B},
159 {codeview::RegisterId::R9B, X86::R9B},
160 {codeview::RegisterId::R10B, X86::R10B},
161 {codeview::RegisterId::R11B, X86::R11B},
162 {codeview::RegisterId::R12B, X86::R12B},
163 {codeview::RegisterId::R13B, X86::R13B},
164 {codeview::RegisterId::R14B, X86::R14B},
165 {codeview::RegisterId::R15B, X86::R15B},
166 {codeview::RegisterId::R8W, X86::R8W},
167 {codeview::RegisterId::R9W, X86::R9W},
168 {codeview::RegisterId::R10W, X86::R10W},
169 {codeview::RegisterId::R11W, X86::R11W},
170 {codeview::RegisterId::R12W, X86::R12W},
171 {codeview::RegisterId::R13W, X86::R13W},
172 {codeview::RegisterId::R14W, X86::R14W},
173 {codeview::RegisterId::R15W, X86::R15W},
174 {codeview::RegisterId::R8D, X86::R8D},
175 {codeview::RegisterId::R9D, X86::R9D},
176 {codeview::RegisterId::R10D, X86::R10D},
177 {codeview::RegisterId::R11D, X86::R11D},
178 {codeview::RegisterId::R12D, X86::R12D},
179 {codeview::RegisterId::R13D, X86::R13D},
180 {codeview::RegisterId::R14D, X86::R14D},
181 {codeview::RegisterId::R15D, X86::R15D},
182 {codeview::RegisterId::AMD64_YMM0, X86::YMM0},
183 {codeview::RegisterId::AMD64_YMM1, X86::YMM1},
184 {codeview::RegisterId::AMD64_YMM2, X86::YMM2},
185 {codeview::RegisterId::AMD64_YMM3, X86::YMM3},
186 {codeview::RegisterId::AMD64_YMM4, X86::YMM4},
187 {codeview::RegisterId::AMD64_YMM5, X86::YMM5},
188 {codeview::RegisterId::AMD64_YMM6, X86::YMM6},
189 {codeview::RegisterId::AMD64_YMM7, X86::YMM7},
190 {codeview::RegisterId::AMD64_YMM8, X86::YMM8},
191 {codeview::RegisterId::AMD64_YMM9, X86::YMM9},
192 {codeview::RegisterId::AMD64_YMM10, X86::YMM10},
193 {codeview::RegisterId::AMD64_YMM11, X86::YMM11},
194 {codeview::RegisterId::AMD64_YMM12, X86::YMM12},
195 {codeview::RegisterId::AMD64_YMM13, X86::YMM13},
196 {codeview::RegisterId::AMD64_YMM14, X86::YMM14},
197 {codeview::RegisterId::AMD64_YMM15, X86::YMM15},
198 {codeview::RegisterId::AMD64_YMM16, X86::YMM16},
199 {codeview::RegisterId::AMD64_YMM17, X86::YMM17},
200 {codeview::RegisterId::AMD64_YMM18, X86::YMM18},
201 {codeview::RegisterId::AMD64_YMM19, X86::YMM19},
202 {codeview::RegisterId::AMD64_YMM20, X86::YMM20},
203 {codeview::RegisterId::AMD64_YMM21, X86::YMM21},
204 {codeview::RegisterId::AMD64_YMM22, X86::YMM22},
205 {codeview::RegisterId::AMD64_YMM23, X86::YMM23},
206 {codeview::RegisterId::AMD64_YMM24, X86::YMM24},
207 {codeview::RegisterId::AMD64_YMM25, X86::YMM25},
208 {codeview::RegisterId::AMD64_YMM26, X86::YMM26},
209 {codeview::RegisterId::AMD64_YMM27, X86::YMM27},
210 {codeview::RegisterId::AMD64_YMM28, X86::YMM28},
211 {codeview::RegisterId::AMD64_YMM29, X86::YMM29},
212 {codeview::RegisterId::AMD64_YMM30, X86::YMM30},
213 {codeview::RegisterId::AMD64_YMM31, X86::YMM31},
214 {codeview::RegisterId::AMD64_ZMM0, X86::ZMM0},
215 {codeview::RegisterId::AMD64_ZMM1, X86::ZMM1},
216 {codeview::RegisterId::AMD64_ZMM2, X86::ZMM2},
217 {codeview::RegisterId::AMD64_ZMM3, X86::ZMM3},
218 {codeview::RegisterId::AMD64_ZMM4, X86::ZMM4},
219 {codeview::RegisterId::AMD64_ZMM5, X86::ZMM5},
220 {codeview::RegisterId::AMD64_ZMM6, X86::ZMM6},
221 {codeview::RegisterId::AMD64_ZMM7, X86::ZMM7},
222 {codeview::RegisterId::AMD64_ZMM8, X86::ZMM8},
223 {codeview::RegisterId::AMD64_ZMM9, X86::ZMM9},
224 {codeview::RegisterId::AMD64_ZMM10, X86::ZMM10},
225 {codeview::RegisterId::AMD64_ZMM11, X86::ZMM11},
226 {codeview::RegisterId::AMD64_ZMM12, X86::ZMM12},
227 {codeview::RegisterId::AMD64_ZMM13, X86::ZMM13},
228 {codeview::RegisterId::AMD64_ZMM14, X86::ZMM14},
229 {codeview::RegisterId::AMD64_ZMM15, X86::ZMM15},
230 {codeview::RegisterId::AMD64_ZMM16, X86::ZMM16},
231 {codeview::RegisterId::AMD64_ZMM17, X86::ZMM17},
232 {codeview::RegisterId::AMD64_ZMM18, X86::ZMM18},
233 {codeview::RegisterId::AMD64_ZMM19, X86::ZMM19},
234 {codeview::RegisterId::AMD64_ZMM20, X86::ZMM20},
235 {codeview::RegisterId::AMD64_ZMM21, X86::ZMM21},
236 {codeview::RegisterId::AMD64_ZMM22, X86::ZMM22},
237 {codeview::RegisterId::AMD64_ZMM23, X86::ZMM23},
238 {codeview::RegisterId::AMD64_ZMM24, X86::ZMM24},
239 {codeview::RegisterId::AMD64_ZMM25, X86::ZMM25},
240 {codeview::RegisterId::AMD64_ZMM26, X86::ZMM26},
241 {codeview::RegisterId::AMD64_ZMM27, X86::ZMM27},
242 {codeview::RegisterId::AMD64_ZMM28, X86::ZMM28},
243 {codeview::RegisterId::AMD64_ZMM29, X86::ZMM29},
244 {codeview::RegisterId::AMD64_ZMM30, X86::ZMM30},
245 {codeview::RegisterId::AMD64_ZMM31, X86::ZMM31},
246 {codeview::RegisterId::AMD64_K0, X86::K0},
247 {codeview::RegisterId::AMD64_K1, X86::K1},
248 {codeview::RegisterId::AMD64_K2, X86::K2},
249 {codeview::RegisterId::AMD64_K3, X86::K3},
250 {codeview::RegisterId::AMD64_K4, X86::K4},
251 {codeview::RegisterId::AMD64_K5, X86::K5},
252 {codeview::RegisterId::AMD64_K6, X86::K6},
253 {codeview::RegisterId::AMD64_K7, X86::K7},
254 {codeview::RegisterId::AMD64_XMM16, X86::XMM16},
255 {codeview::RegisterId::AMD64_XMM17, X86::XMM17},
256 {codeview::RegisterId::AMD64_XMM18, X86::XMM18},
257 {codeview::RegisterId::AMD64_XMM19, X86::XMM19},
258 {codeview::RegisterId::AMD64_XMM20, X86::XMM20},
259 {codeview::RegisterId::AMD64_XMM21, X86::XMM21},
260 {codeview::RegisterId::AMD64_XMM22, X86::XMM22},
261 {codeview::RegisterId::AMD64_XMM23, X86::XMM23},
262 {codeview::RegisterId::AMD64_XMM24, X86::XMM24},
263 {codeview::RegisterId::AMD64_XMM25, X86::XMM25},
264 {codeview::RegisterId::AMD64_XMM26, X86::XMM26},
265 {codeview::RegisterId::AMD64_XMM27, X86::XMM27},
266 {codeview::RegisterId::AMD64_XMM28, X86::XMM28},
267 {codeview::RegisterId::AMD64_XMM29, X86::XMM29},
268 {codeview::RegisterId::AMD64_XMM30, X86::XMM30},
269 {codeview::RegisterId::AMD64_XMM31, X86::XMM31},
281 ArchFS = (
Twine(ArchFS) +
"," + FS).str();
286 std::string CPUName = CPU;
290 return createX86MCSubtargetInfoImpl(TT, CPUName, ArchFS);
295 InitX86MCInstrInfo(X);
312 const Triple &TheTriple) {
337 int stackGrowth = is64Bit ? -8 : -4;
340 unsigned StackPtr = is64Bit ? X86::RSP :
X86::ESP;
346 unsigned InstPtr = is64Bit ? X86::RIP : X86::EIP;
355 unsigned SyntaxVariant,
359 if (SyntaxVariant == 0)
361 if (SyntaxVariant == 1)
383 #define GET_STIPREDICATE_DECLS_FOR_MC_ANALYSIS 384 #include "X86GenSubtargetInfo.inc" 388 std::vector<std::pair<uint64_t, uint64_t>>
390 uint64_t GotSectionVA,
391 const Triple &TargetTriple)
const override;
394 #define GET_STIPREDICATE_DEFS_FOR_MC_ANALYSIS 395 #include "X86GenSubtargetInfo.inc" 404 "Unexpected number of bits in the mask!");
414 auto ClearsSuperReg = [=](
unsigned RegID) {
423 if (!HasEVEX && !HasVEX && !HasXOP)
434 for (
unsigned I = 0,
E = NumDefs;
I <
E; ++
I) {
436 if (ClearsSuperReg(Op.
getReg()))
440 for (
unsigned I = 0, E = NumImplicitDefs;
I <
E; ++
I) {
442 if (ClearsSuperReg(Reg))
449 static std::vector<std::pair<uint64_t, uint64_t>>
451 uint64_t GotPltSectionVA) {
453 std::vector<std::pair<uint64_t, uint64_t>> Result;
454 for (uint64_t Byte = 0, End = PltContents.
size(); Byte + 6 < End; ) {
456 if (PltContents[Byte] == 0xff && PltContents[Byte + 1] == 0xa3) {
461 std::make_pair(PltSectionVA + Byte, GotPltSectionVA + Imm));
463 }
else if (PltContents[Byte] == 0xff && PltContents[Byte + 1] == 0x25) {
467 Result.push_back(std::make_pair(PltSectionVA + Byte, Imm));
475 static std::vector<std::pair<uint64_t, uint64_t>>
478 std::vector<std::pair<uint64_t, uint64_t>> Result;
479 for (uint64_t Byte = 0, End = PltContents.
size(); Byte + 6 < End; ) {
481 if (PltContents[Byte] == 0xff && PltContents[Byte + 1] == 0x25) {
486 std::make_pair(PltSectionVA + Byte, PltSectionVA + Byte + 6 + Imm));
496 uint64_t GotPltSectionVA,
const Triple &TargetTriple)
const {
497 switch (TargetTriple.
getArch()) {
570 case X86::DIL:
case X86::DI:
case X86::EDI:
case X86::RDI:
572 case X86::BPL:
case X86::BP:
case X86::EBP:
case X86::RBP:
574 case X86::SPL:
case X86::SP:
case X86::ESP:
case X86::RSP:
576 case X86::AH:
case X86::AL:
case X86::AX:
case X86::EAX:
case X86::RAX:
578 case X86::DH:
case X86::DL:
case X86::DX:
case X86::EDX:
case X86::RDX:
580 case X86::CH:
case X86::CL:
case X86::CX:
case X86::ECX:
case X86::RCX:
582 case X86::BH:
case X86::BL:
case X86::BX:
case X86::EBX:
case X86::RBX:
588 case X86::AH:
case X86::AL:
case X86::AX:
case X86::EAX:
case X86::RAX:
590 case X86::DH:
case X86::DL:
case X86::DX:
case X86::EDX:
case X86::RDX:
592 case X86::CH:
case X86::CL:
case X86::CX:
case X86::ECX:
case X86::RCX:
594 case X86::BH:
case X86::BL:
case X86::BX:
case X86::EBX:
case X86::RBX:
598 case X86::DIL:
case X86::DI:
case X86::EDI:
case X86::RDI:
600 case X86::BPL:
case X86::BP:
case X86::EBP:
case X86::RBP:
602 case X86::SPL:
case X86::SP:
case X86::ESP:
case X86::RSP:
604 case X86::R8B:
case X86::R8W:
case X86::R8D:
case X86::R8:
606 case X86::R9B:
case X86::R9W:
case X86::R9D:
case X86::R9:
608 case X86::R10B:
case X86::R10W:
case X86::R10D:
case X86::R10:
610 case X86::R11B:
case X86::R11W:
case X86::R11D:
case X86::R11:
612 case X86::R12B:
case X86::R12W:
case X86::R12D:
case X86::R12:
614 case X86::R13B:
case X86::R13W:
case X86::R13D:
case X86::R13:
616 case X86::R14B:
case X86::R14W:
case X86::R14D:
case X86::R14:
618 case X86::R15B:
case X86::R15W:
case X86::R15D:
case X86::R15:
625 case X86::AH:
case X86::AL:
case X86::AX:
case X86::EAX:
case X86::RAX:
627 case X86::DH:
case X86::DL:
case X86::DX:
case X86::EDX:
case X86::RDX:
629 case X86::CH:
case X86::CL:
case X86::CX:
case X86::ECX:
case X86::RCX:
631 case X86::BH:
case X86::BL:
case X86::BX:
case X86::EBX:
case X86::RBX:
635 case X86::DIL:
case X86::DI:
case X86::EDI:
case X86::RDI:
637 case X86::BPL:
case X86::BP:
case X86::EBP:
case X86::RBP:
639 case X86::SPL:
case X86::SP:
case X86::ESP:
case X86::RSP:
641 case X86::R8B:
case X86::R8W:
case X86::R8D:
case X86::R8:
643 case X86::R9B:
case X86::R9W:
case X86::R9D:
case X86::R9:
645 case X86::R10B:
case X86::R10W:
case X86::R10D:
case X86::R10:
647 case X86::R11B:
case X86::R11W:
case X86::R11D:
case X86::R11:
649 case X86::R12B:
case X86::R12W:
case X86::R12D:
case X86::R12:
651 case X86::R13B:
case X86::R13W:
case X86::R13D:
case X86::R13:
653 case X86::R14B:
case X86::R14W:
case X86::R14D:
case X86::R14:
655 case X86::R15B:
case X86::R15W:
case X86::R15D:
case X86::R15:
661 case X86::AH:
case X86::AL:
case X86::AX:
case X86::EAX:
case X86::RAX:
663 case X86::DH:
case X86::DL:
case X86::DX:
case X86::EDX:
case X86::RDX:
665 case X86::CH:
case X86::CL:
case X86::CX:
case X86::ECX:
case X86::RCX:
667 case X86::BH:
case X86::BL:
case X86::BX:
case X86::EBX:
case X86::RBX:
671 case X86::DIL:
case X86::DI:
case X86::EDI:
case X86::RDI:
673 case X86::BPL:
case X86::BP:
case X86::EBP:
case X86::RBP:
675 case X86::SPL:
case X86::SP:
case X86::ESP:
case X86::RSP:
677 case X86::R8B:
case X86::R8W:
case X86::R8D:
case X86::R8:
679 case X86::R9B:
case X86::R9W:
case X86::R9D:
case X86::R9:
681 case X86::R10B:
case X86::R10W:
case X86::R10D:
case X86::R10:
683 case X86::R11B:
case X86::R11W:
case X86::R11D:
case X86::R11:
685 case X86::R12B:
case X86::R12W:
case X86::R12D:
case X86::R12:
687 case X86::R13B:
case X86::R13W:
case X86::R13D:
case X86::R13:
689 case X86::R14B:
case X86::R14W:
case X86::R14D:
case X86::R14:
691 case X86::R15B:
case X86::R15W:
case X86::R15D:
case X86::R15:
697 case X86::AH:
case X86::AL:
case X86::AX:
case X86::EAX:
case X86::RAX:
699 case X86::DH:
case X86::DL:
case X86::DX:
case X86::EDX:
case X86::RDX:
701 case X86::CH:
case X86::CL:
case X86::CX:
case X86::ECX:
case X86::RCX:
703 case X86::BH:
case X86::BL:
case X86::BX:
case X86::EBX:
case X86::RBX:
707 case X86::DIL:
case X86::DI:
case X86::EDI:
case X86::RDI:
709 case X86::BPL:
case X86::BP:
case X86::EBP:
case X86::RBP:
711 case X86::SPL:
case X86::SP:
case X86::ESP:
case X86::RSP:
713 case X86::R8B:
case X86::R8W:
case X86::R8D:
case X86::R8:
715 case X86::R9B:
case X86::R9W:
case X86::R9D:
case X86::R9:
717 case X86::R10B:
case X86::R10W:
case X86::R10D:
case X86::R10:
719 case X86::R11B:
case X86::R11W:
case X86::R11D:
case X86::R11:
721 case X86::R12B:
case X86::R12W:
case X86::R12D:
case X86::R12:
723 case X86::R13B:
case X86::R13W:
case X86::R13D:
case X86::R13:
725 case X86::R14B:
case X86::R14W:
case X86::R14D:
case X86::R14:
727 case X86::R15B:
case X86::R15W:
case X86::R15D:
case X86::R15:
735 assert(Res != 0 &&
"Unexpected register or VT");
void clearAllBits()
Set every bit to 0.
bool isOSDarwin() const
isOSDarwin - Is this a "Darwin" OS (OS X, iOS, or watchOS).
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
unsigned getNumImplicitDefs() const
Return the number of implicit defs this instruct has.
This class represents lattice values for constants.
bool isOSBinFormatELF() const
Tests whether the OS uses the ELF binary format.
static void RegisterMCInstrAnalysis(Target &T, Target::MCInstrAnalysisCtorFnTy Fn)
RegisterMCInstrAnalysis - Register a MCInstrAnalysis implementation for the given target...
Describe properties that are true of each instruction in the target description file.
static MCCFIInstruction createOffset(MCSymbol *L, unsigned Register, int Offset)
.cfi_offset Previous value of Register is saved at offset Offset from CFA.
MCTargetStreamer * createX86ObjectTargetStreamer(MCStreamer &OS, const MCSubtargetInfo &STI)
Implements X86-only directives for object files.
bool clearsSuperRegisters(const MCRegisterInfo &MRI, const MCInst &Inst, APInt &Mask) const override
Returns true if at least one of the register writes performed by.
std::vector< std::pair< uint64_t, uint64_t > > findPltEntries(uint64_t PltSectionVA, ArrayRef< uint8_t > PltContents, uint64_t GotSectionVA, const Triple &TargetTriple) const override
Returns (PLT virtual address, GOT virtual address) pairs for PLT entries.
static MCRegisterInfo * createX86MCRegisterInfo(const Triple &TT)
static void RegisterMCInstPrinter(Target &T, Target::MCInstPrinterCtorTy Fn)
RegisterMCInstPrinter - Register a MCInstPrinter implementation for the given target.
unsigned getDwarfRegFlavour(const Triple &TT, bool isEH)
static void RegisterAsmTargetStreamer(Target &T, Target::AsmTargetStreamerCtorTy Fn)
unsigned getBitWidth() const
Return the number of bits in the APInt.
std::string ParseX86Triple(const Triple &TT)
X86MCInstrAnalysis(const MCInstrInfo *MCII)
SI optimize exec mask operations pre RA
MCAsmBackend * createX86_32AsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options)
void setBit(unsigned BitPosition)
Set a given bit to 1.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
bool contains(unsigned Reg) const
contains - Return true if the specified register is included in this register class.
MCCodeEmitter * createX86MCCodeEmitter(const MCInstrInfo &MCII, const MCRegisterInfo &MRI, MCContext &Ctx)
int getDwarfRegNum(unsigned RegNum, bool isEH) const
Map a target register to an equivalent dwarf register number.
MCAsmBackend * createX86_64AsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options)
static void RegisterCOFFStreamer(Target &T, Target::COFFStreamerCtorTy Fn)
This file implements a class to represent arbitrary precision integral constant values and operations...
unsigned getReg() const
Returns the register number.
Context object for machine code objects.
bool getBoolValue() const
Convert APInt to a boolean value.
static MCRelocationInfo * createX86MCRelocationInfo(const Triple &TheTriple, MCContext &Ctx)
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
void addInitialFrameState(const MCCFIInstruction &Inst)
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
void LLVMInitializeX86TargetMC()
bool isWindowsItaniumEnvironment() const
MCRegisterClass - Base class of TargetRegisterClass.
bool isWindowsCoreCLREnvironment() const
Instances of this class represent a single low-level machine instruction.
MCRelocationInfo * createMCRelocationInfo(const Triple &TT, MCContext &Ctx)
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
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.
const MCPhysReg * getImplicitDefs() const
Return a list of registers that are potentially written by any instance of this machine instruction...
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...
size_t size() const
size - Get the array size.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static bool is64Bit(const char *name)
Interface to description of machine instruction set.
MCStreamer * createX86WinCOFFStreamer(MCContext &C, std::unique_ptr< MCAsmBackend > &&AB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&CE, bool RelaxAll, bool IncrementalLinkerCompatible)
Construct an X86 Windows COFF machine code streamer which will generate PE/COFF format object files...
MCTargetStreamer * createX86AsmTargetStreamer(MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint, bool isVerboseAsm)
Implements X86-only directives for assembly emission.
Create MCExprs from relocations found in an object file.
bool isOSBinFormatMachO() const
Tests whether the environment is MachO.
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 std::vector< std::pair< uint64_t, uint64_t > > findX86_64PltEntries(uint64_t PltSectionVA, ArrayRef< uint8_t > PltContents)
Triple - Helper class for working with autoconf configuration names.
MCSubtargetInfo * createX86MCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS)
Create a X86 MCSubtargetInfo instance.
unsigned getX86SubSuperRegisterOrZero(unsigned, unsigned, bool High=false)
Returns the sub or super register of a specific X86 register.
void initLLVMToSEHAndCVRegMapping(MCRegisterInfo *MRI)
const MCOperand & getOperand(unsigned i) const
constexpr size_t array_lengthof(T(&)[N])
Find the length of an array.
static void RegisterMCCodeEmitter(Target &T, Target::MCCodeEmitterCtorTy Fn)
RegisterMCCodeEmitter - Register a MCCodeEmitter implementation for the given target.
EnvironmentType getEnvironment() const
getEnvironment - Get the parsed environment type of this triple.
unsigned getNumDefs() const
Return the number of MachineOperands that are register definitions.
unsigned getX86SubSuperRegister(unsigned, unsigned, bool High=false)
Returns the sub or super register of a specific X86 register.
static void RegisterMCRegInfo(Target &T, Target::MCRegInfoCtorFnTy Fn)
RegisterMCRegInfo - Register a MCRegisterInfo implementation for the given target.
Target - Wrapper for Target specific information.
Class for arbitrary precision integers.
bool isOSCygMing() const
Tests for either Cygwin or MinGW OS.
static MCAsmInfo * createX86MCAsmInfo(const MCRegisterInfo &MRI, const Triple &TheTriple)
static MCInstrInfo * createX86MCInstrInfo()
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
uint16_t getEncodingValue(unsigned RegNo) const
Returns the encoding for RegNo.
void mapLLVMRegToCVReg(unsigned LLVMReg, int CVReg)
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode...
static void RegisterMCInstrInfo(Target &T, Target::MCInstrInfoCtorFnTy Fn)
RegisterMCInstrInfo - Register a MCInstrInfo implementation for the given target. ...
uint32_t read32le(const void *P)
static std::vector< std::pair< uint64_t, uint64_t > > findX86PltEntries(uint64_t PltSectionVA, ArrayRef< uint8_t > PltContents, uint64_t GotPltSectionVA)
Generic base class for all target subtargets.
Target & getTheX86_32Target()
XOP - Opcode prefix used by XOP instructions.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
RegisterMCAsmInfoFn - Helper template for registering a target assembly info implementation.
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
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.
static MCInstrAnalysis * createX86MCInstrAnalysis(const MCInstrInfo *Info)
unsigned getOpcode() const
bool isWindowsMSVCEnvironment() const
Checks if the environment could be MSVC.
Instances of this class represent operands of the MCInst class.
static MCInstPrinter * createX86MCInstPrinter(const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
Target & getTheX86_64Target()
void mapLLVMRegToSEHReg(unsigned LLVMReg, int SEHReg)
mapLLVMRegToSEHReg - Used to initialize LLVM register to SEH register number mapping.
const MCRegisterClass & getRegClass(unsigned i) const
Returns the register class associated with the enumeration value.