LLVM  16.0.0git
X86AsmPrinter.cpp
Go to the documentation of this file.
1 //===-- X86AsmPrinter.cpp - Convert X86 LLVM code to AT&T assembly --------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains a printer that converts from our internal representation
10 // of machine-dependent LLVM code to X86 machine code.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "X86AsmPrinter.h"
19 #include "X86InstrInfo.h"
20 #include "X86MachineFunctionInfo.h"
21 #include "X86Subtarget.h"
22 #include "llvm/BinaryFormat/COFF.h"
23 #include "llvm/BinaryFormat/ELF.h"
27 #include "llvm/IR/DerivedTypes.h"
28 #include "llvm/IR/InlineAsm.h"
29 #include "llvm/IR/Mangler.h"
30 #include "llvm/IR/Module.h"
31 #include "llvm/IR/Type.h"
32 #include "llvm/MC/MCAsmInfo.h"
33 #include "llvm/MC/MCCodeEmitter.h"
34 #include "llvm/MC/MCContext.h"
35 #include "llvm/MC/MCExpr.h"
36 #include "llvm/MC/MCInstBuilder.h"
37 #include "llvm/MC/MCSectionCOFF.h"
38 #include "llvm/MC/MCSectionELF.h"
39 #include "llvm/MC/MCSectionMachO.h"
40 #include "llvm/MC/MCStreamer.h"
41 #include "llvm/MC/MCSymbol.h"
42 #include "llvm/MC/TargetRegistry.h"
43 #include "llvm/Support/Debug.h"
47 
48 using namespace llvm;
49 
51  std::unique_ptr<MCStreamer> Streamer)
52  : AsmPrinter(TM, std::move(Streamer)), FM(*this) {}
53 
54 //===----------------------------------------------------------------------===//
55 // Primitive Helper Functions.
56 //===----------------------------------------------------------------------===//
57 
58 /// runOnMachineFunction - Emit the function body.
59 ///
61  Subtarget = &MF.getSubtarget<X86Subtarget>();
62 
63  SMShadowTracker.startFunction(MF);
64  CodeEmitter.reset(TM.getTarget().createMCCodeEmitter(
65  *Subtarget->getInstrInfo(), MF.getContext()));
66 
67  EmitFPOData =
68  Subtarget->isTargetWin32() && MF.getMMI().getModule()->getCodeViewFlag();
69 
70  IndCSPrefix =
71  MF.getMMI().getModule()->getModuleFlag("indirect_branch_cs_prefix");
72 
74 
75  if (Subtarget->isTargetCOFF()) {
76  bool Local = MF.getFunction().hasLocalLinkage();
77  OutStreamer->beginCOFFSymbolDef(CurrentFnSym);
78  OutStreamer->emitCOFFSymbolStorageClass(
82  OutStreamer->endCOFFSymbolDef();
83  }
84 
85  // Emit the rest of the function body.
87 
88  // Emit the XRay table for this function.
89  emitXRayTable();
90 
91  EmitFPOData = false;
92 
93  IndCSPrefix = false;
94 
95  // We didn't modify anything.
96  return false;
97 }
98 
100  if (EmitFPOData) {
101  if (auto *XTS =
102  static_cast<X86TargetStreamer *>(OutStreamer->getTargetStreamer()))
103  XTS->emitFPOProc(
104  CurrentFnSym,
106  }
107 }
108 
110  if (EmitFPOData) {
111  if (auto *XTS =
112  static_cast<X86TargetStreamer *>(OutStreamer->getTargetStreamer()))
113  XTS->emitFPOEndProc();
114  }
115 }
116 
117 uint32_t X86AsmPrinter::MaskKCFIType(uint32_t Value) {
118  // If the type hash matches an invalid pattern, mask the value.
119  const uint32_t InvalidValues[] = {
120  0xFA1E0FF3, /* ENDBR64 */
121  0xFB1E0FF3, /* ENDBR32 */
122  };
123  for (uint32_t N : InvalidValues) {
124  // LowerKCFI_CHECK emits -Value for indirect call checks, so we must also
125  // mask that. Note that -(Value + 1) == ~Value.
126  if (N == Value || -N == Value)
127  return Value + 1;
128  }
129  return Value;
130 }
131 
132 void X86AsmPrinter::EmitKCFITypePadding(const MachineFunction &MF,
133  bool HasType) {
134  // Keep the function entry aligned, taking patchable-function-prefix into
135  // account if set.
136  int64_t PrefixBytes = 0;
137  (void)MF.getFunction()
138  .getFnAttribute("patchable-function-prefix")
140  .getAsInteger(10, PrefixBytes);
141 
142  // Also take the type identifier into account if we're emitting
143  // one. Otherwise, just pad with nops. The X86::MOV32ri instruction emitted
144  // in X86AsmPrinter::emitKCFITypeId is 5 bytes long.
145  if (HasType)
146  PrefixBytes += 5;
147 
148  emitNops(offsetToAlignment(PrefixBytes, MF.getAlignment()));
149 }
150 
151 /// emitKCFITypeId - Emit the KCFI type information in architecture specific
152 /// format.
154  const Function &F = MF.getFunction();
155  if (!F.getParent()->getModuleFlag("kcfi"))
156  return;
157 
158  ConstantInt *Type = nullptr;
159  if (const MDNode *MD = F.getMetadata(LLVMContext::MD_kcfi_type))
160  Type = mdconst::extract<ConstantInt>(MD->getOperand(0));
161 
162  // If we don't have a type to emit, just emit padding if needed to maintain
163  // the same alignment for all functions.
164  if (!Type) {
165  EmitKCFITypePadding(MF, /*HasType=*/false);
166  return;
167  }
168 
169  // Emit a function symbol for the type data to avoid unreachable instruction
170  // warnings from binary validation tools, and use the same linkage as the
171  // parent function. Note that using local linkage would result in duplicate
172  // symbols for weak parent functions.
173  MCSymbol *FnSym = OutContext.getOrCreateSymbol("__cfi_" + MF.getName());
174  emitLinkage(&MF.getFunction(), FnSym);
176  OutStreamer->emitSymbolAttribute(FnSym, MCSA_ELF_TypeFunction);
177  OutStreamer->emitLabel(FnSym);
178 
179  // Embed the type hash in the X86::MOV32ri instruction to avoid special
180  // casing object file parsers.
181  EmitKCFITypePadding(MF);
182  EmitAndCountInstruction(MCInstBuilder(X86::MOV32ri)
183  .addReg(X86::EAX)
184  .addImm(MaskKCFIType(Type->getZExtValue())));
185 
187  MCSymbol *EndSym = OutContext.createTempSymbol("cfi_func_end");
188  OutStreamer->emitLabel(EndSym);
189 
190  const MCExpr *SizeExp = MCBinaryExpr::createSub(
193  OutStreamer->emitELFSize(FnSym, SizeExp);
194  }
195 }
196 
197 /// PrintSymbolOperand - Print a raw symbol reference operand. This handles
198 /// jump tables, constant pools, global address and external symbols, all of
199 /// which print to a label with various suffixes for relocation types etc.
200 void X86AsmPrinter::PrintSymbolOperand(const MachineOperand &MO,
201  raw_ostream &O) {
202  switch (MO.getType()) {
203  default: llvm_unreachable("unknown symbol type!");
205  GetCPISymbol(MO.getIndex())->print(O, MAI);
206  printOffset(MO.getOffset(), O);
207  break;
209  const GlobalValue *GV = MO.getGlobal();
210 
211  MCSymbol *GVSym;
214  GVSym = getSymbolWithGlobalValueBase(GV, "$non_lazy_ptr");
215  else
216  GVSym = getSymbolPreferLocal(*GV);
217 
218  // Handle dllimport linkage.
220  GVSym = OutContext.getOrCreateSymbol(Twine("__imp_") + GVSym->getName());
221  else if (MO.getTargetFlags() == X86II::MO_COFFSTUB)
222  GVSym =
223  OutContext.getOrCreateSymbol(Twine(".refptr.") + GVSym->getName());
224 
227  MCSymbol *Sym = getSymbolWithGlobalValueBase(GV, "$non_lazy_ptr");
229  MMI->getObjFileInfo<MachineModuleInfoMachO>().getGVStubEntry(Sym);
230  if (!StubSym.getPointer())
232  !GV->hasInternalLinkage());
233  }
234 
235  // If the name begins with a dollar-sign, enclose it in parens. We do this
236  // to avoid having it look like an integer immediate to the assembler.
237  if (GVSym->getName()[0] != '$')
238  GVSym->print(O, MAI);
239  else {
240  O << '(';
241  GVSym->print(O, MAI);
242  O << ')';
243  }
244  printOffset(MO.getOffset(), O);
245  break;
246  }
247  }
248 
249  switch (MO.getTargetFlags()) {
250  default:
251  llvm_unreachable("Unknown target flag on GV operand");
252  case X86II::MO_NO_FLAG: // No flag.
253  break;
255  case X86II::MO_DLLIMPORT:
256  case X86II::MO_COFFSTUB:
257  // These affect the name of the symbol, not any suffix.
258  break;
260  O << " + [.-";
261  MF->getPICBaseSymbol()->print(O, MAI);
262  O << ']';
263  break;
266  O << '-';
267  MF->getPICBaseSymbol()->print(O, MAI);
268  break;
269  case X86II::MO_TLSGD: O << "@TLSGD"; break;
270  case X86II::MO_TLSLD: O << "@TLSLD"; break;
271  case X86II::MO_TLSLDM: O << "@TLSLDM"; break;
272  case X86II::MO_GOTTPOFF: O << "@GOTTPOFF"; break;
273  case X86II::MO_INDNTPOFF: O << "@INDNTPOFF"; break;
274  case X86II::MO_TPOFF: O << "@TPOFF"; break;
275  case X86II::MO_DTPOFF: O << "@DTPOFF"; break;
276  case X86II::MO_NTPOFF: O << "@NTPOFF"; break;
277  case X86II::MO_GOTNTPOFF: O << "@GOTNTPOFF"; break;
278  case X86II::MO_GOTPCREL: O << "@GOTPCREL"; break;
279  case X86II::MO_GOTPCREL_NORELAX: O << "@GOTPCREL_NORELAX"; break;
280  case X86II::MO_GOT: O << "@GOT"; break;
281  case X86II::MO_GOTOFF: O << "@GOTOFF"; break;
282  case X86II::MO_PLT: O << "@PLT"; break;
283  case X86II::MO_TLVP: O << "@TLVP"; break;
285  O << "@TLVP" << '-';
286  MF->getPICBaseSymbol()->print(O, MAI);
287  break;
288  case X86II::MO_SECREL: O << "@SECREL32"; break;
289  }
290 }
291 
292 void X86AsmPrinter::PrintOperand(const MachineInstr *MI, unsigned OpNo,
293  raw_ostream &O) {
294  const MachineOperand &MO = MI->getOperand(OpNo);
295  const bool IsATT = MI->getInlineAsmDialect() == InlineAsm::AD_ATT;
296  switch (MO.getType()) {
297  default: llvm_unreachable("unknown operand type!");
299  if (IsATT)
300  O << '%';
302  return;
303  }
304 
306  if (IsATT)
307  O << '$';
308  O << MO.getImm();
309  return;
310 
313  switch (MI->getInlineAsmDialect()) {
314  case InlineAsm::AD_ATT:
315  O << '$';
316  break;
317  case InlineAsm::AD_Intel:
318  O << "offset ";
319  break;
320  }
321  PrintSymbolOperand(MO, O);
322  break;
323  }
326  Sym->print(O, MAI);
327  break;
328  }
329  }
330 }
331 
332 /// PrintModifiedOperand - Print subregisters based on supplied modifier,
333 /// deferring to PrintOperand() if no modifier was supplied or if operand is not
334 /// a register.
335 void X86AsmPrinter::PrintModifiedOperand(const MachineInstr *MI, unsigned OpNo,
336  raw_ostream &O, const char *Modifier) {
337  const MachineOperand &MO = MI->getOperand(OpNo);
338  if (!Modifier || !MO.isReg())
339  return PrintOperand(MI, OpNo, O);
340  if (MI->getInlineAsmDialect() == InlineAsm::AD_ATT)
341  O << '%';
342  Register Reg = MO.getReg();
343  if (strncmp(Modifier, "subreg", strlen("subreg")) == 0) {
344  unsigned Size = (strcmp(Modifier+6,"64") == 0) ? 64 :
345  (strcmp(Modifier+6,"32") == 0) ? 32 :
346  (strcmp(Modifier+6,"16") == 0) ? 16 : 8;
347  Reg = getX86SubSuperRegister(Reg, Size);
348  }
350 }
351 
352 /// PrintPCRelImm - This is used to print an immediate value that ends up
353 /// being encoded as a pc-relative value. These print slightly differently, for
354 /// example, a $ is not emitted.
355 void X86AsmPrinter::PrintPCRelImm(const MachineInstr *MI, unsigned OpNo,
356  raw_ostream &O) {
357  const MachineOperand &MO = MI->getOperand(OpNo);
358  switch (MO.getType()) {
359  default: llvm_unreachable("Unknown pcrel immediate operand");
361  // pc-relativeness was handled when computing the value in the reg.
362  PrintOperand(MI, OpNo, O);
363  return;
365  O << MO.getImm();
366  return;
368  PrintSymbolOperand(MO, O);
369  return;
370  }
371 }
372 
373 void X86AsmPrinter::PrintLeaMemReference(const MachineInstr *MI, unsigned OpNo,
374  raw_ostream &O, const char *Modifier) {
375  const MachineOperand &BaseReg = MI->getOperand(OpNo + X86::AddrBaseReg);
376  const MachineOperand &IndexReg = MI->getOperand(OpNo + X86::AddrIndexReg);
377  const MachineOperand &DispSpec = MI->getOperand(OpNo + X86::AddrDisp);
378 
379  // If we really don't want to print out (rip), don't.
380  bool HasBaseReg = BaseReg.getReg() != 0;
381  if (HasBaseReg && Modifier && !strcmp(Modifier, "no-rip") &&
382  BaseReg.getReg() == X86::RIP)
383  HasBaseReg = false;
384 
385  // HasParenPart - True if we will print out the () part of the mem ref.
386  bool HasParenPart = IndexReg.getReg() || HasBaseReg;
387 
388  switch (DispSpec.getType()) {
389  default:
390  llvm_unreachable("unknown operand type!");
392  int DispVal = DispSpec.getImm();
393  if (DispVal || !HasParenPart)
394  O << DispVal;
395  break;
396  }
399  PrintSymbolOperand(DispSpec, O);
400  break;
401  }
402 
403  if (Modifier && strcmp(Modifier, "H") == 0)
404  O << "+8";
405 
406  if (HasParenPart) {
407  assert(IndexReg.getReg() != X86::ESP &&
408  "X86 doesn't allow scaling by ESP");
409 
410  O << '(';
411  if (HasBaseReg)
412  PrintModifiedOperand(MI, OpNo + X86::AddrBaseReg, O, Modifier);
413 
414  if (IndexReg.getReg()) {
415  O << ',';
416  PrintModifiedOperand(MI, OpNo + X86::AddrIndexReg, O, Modifier);
417  unsigned ScaleVal = MI->getOperand(OpNo + X86::AddrScaleAmt).getImm();
418  if (ScaleVal != 1)
419  O << ',' << ScaleVal;
420  }
421  O << ')';
422  }
423 }
424 
425 static bool isSimpleReturn(const MachineInstr &MI) {
426  // We exclude all tail calls here which set both isReturn and isCall.
427  return MI.getDesc().isReturn() && !MI.getDesc().isCall();
428 }
429 
431  unsigned Opc = MI.getOpcode();
432  return MI.getDesc().isIndirectBranch() /*Make below code in a good shape*/ ||
433  Opc == X86::TAILJMPr || Opc == X86::TAILJMPm ||
434  Opc == X86::TAILJMPr64 || Opc == X86::TAILJMPm64 ||
435  Opc == X86::TCRETURNri || Opc == X86::TCRETURNmi ||
436  Opc == X86::TCRETURNri64 || Opc == X86::TCRETURNmi64 ||
437  Opc == X86::TAILJMPr64_REX || Opc == X86::TAILJMPm64_REX;
438 }
439 
441  if (Subtarget->hardenSlsRet() || Subtarget->hardenSlsIJmp()) {
442  auto I = MBB.getLastNonDebugInstr();
443  if (I != MBB.end()) {
444  if ((Subtarget->hardenSlsRet() && isSimpleReturn(*I)) ||
445  (Subtarget->hardenSlsIJmp() && isIndirectBranchOrTailCall(*I))) {
446  MCInst TmpInst;
447  TmpInst.setOpcode(X86::INT3);
448  EmitToStreamer(*OutStreamer, TmpInst);
449  }
450  }
451  }
453  SMShadowTracker.emitShadowPadding(*OutStreamer, getSubtargetInfo());
454 }
455 
456 void X86AsmPrinter::PrintMemReference(const MachineInstr *MI, unsigned OpNo,
457  raw_ostream &O, const char *Modifier) {
458  assert(isMem(*MI, OpNo) && "Invalid memory reference!");
459  const MachineOperand &Segment = MI->getOperand(OpNo + X86::AddrSegmentReg);
460  if (Segment.getReg()) {
461  PrintModifiedOperand(MI, OpNo + X86::AddrSegmentReg, O, Modifier);
462  O << ':';
463  }
464  PrintLeaMemReference(MI, OpNo, O, Modifier);
465 }
466 
467 
468 void X86AsmPrinter::PrintIntelMemReference(const MachineInstr *MI,
469  unsigned OpNo, raw_ostream &O,
470  const char *Modifier) {
471  const MachineOperand &BaseReg = MI->getOperand(OpNo + X86::AddrBaseReg);
472  unsigned ScaleVal = MI->getOperand(OpNo + X86::AddrScaleAmt).getImm();
473  const MachineOperand &IndexReg = MI->getOperand(OpNo + X86::AddrIndexReg);
474  const MachineOperand &DispSpec = MI->getOperand(OpNo + X86::AddrDisp);
475  const MachineOperand &SegReg = MI->getOperand(OpNo + X86::AddrSegmentReg);
476 
477  // If we really don't want to print out (rip), don't.
478  bool HasBaseReg = BaseReg.getReg() != 0;
479  if (HasBaseReg && Modifier && !strcmp(Modifier, "no-rip") &&
480  BaseReg.getReg() == X86::RIP)
481  HasBaseReg = false;
482 
483  // If we really just want to print out displacement.
484  if (Modifier && (DispSpec.isGlobal() || DispSpec.isSymbol()) &&
485  !strcmp(Modifier, "disp-only")) {
486  HasBaseReg = false;
487  }
488 
489  // If this has a segment register, print it.
490  if (SegReg.getReg()) {
491  PrintOperand(MI, OpNo + X86::AddrSegmentReg, O);
492  O << ':';
493  }
494 
495  O << '[';
496 
497  bool NeedPlus = false;
498  if (HasBaseReg) {
499  PrintOperand(MI, OpNo + X86::AddrBaseReg, O);
500  NeedPlus = true;
501  }
502 
503  if (IndexReg.getReg()) {
504  if (NeedPlus) O << " + ";
505  if (ScaleVal != 1)
506  O << ScaleVal << '*';
507  PrintOperand(MI, OpNo + X86::AddrIndexReg, O);
508  NeedPlus = true;
509  }
510 
511  if (!DispSpec.isImm()) {
512  if (NeedPlus) O << " + ";
513  PrintOperand(MI, OpNo + X86::AddrDisp, O);
514  } else {
515  int64_t DispVal = DispSpec.getImm();
516  if (DispVal || (!IndexReg.getReg() && !HasBaseReg)) {
517  if (NeedPlus) {
518  if (DispVal > 0)
519  O << " + ";
520  else {
521  O << " - ";
522  DispVal = -DispVal;
523  }
524  }
525  O << DispVal;
526  }
527  }
528  O << ']';
529 }
530 
531 static bool printAsmMRegister(const X86AsmPrinter &P, const MachineOperand &MO,
532  char Mode, raw_ostream &O) {
533  Register Reg = MO.getReg();
534  bool EmitPercent = MO.getParent()->getInlineAsmDialect() == InlineAsm::AD_ATT;
535 
536  if (!X86::GR8RegClass.contains(Reg) &&
537  !X86::GR16RegClass.contains(Reg) &&
538  !X86::GR32RegClass.contains(Reg) &&
539  !X86::GR64RegClass.contains(Reg))
540  return true;
541 
542  switch (Mode) {
543  default: return true; // Unknown mode.
544  case 'b': // Print QImode register
546  break;
547  case 'h': // Print QImode high register
548  Reg = getX86SubSuperRegister(Reg, 8, true);
549  break;
550  case 'w': // Print HImode register
552  break;
553  case 'k': // Print SImode register
555  break;
556  case 'V':
557  EmitPercent = false;
558  [[fallthrough]];
559  case 'q':
560  // Print 64-bit register names if 64-bit integer registers are available.
561  // Otherwise, print 32-bit register names.
562  Reg = getX86SubSuperRegister(Reg, P.getSubtarget().is64Bit() ? 64 : 32);
563  break;
564  }
565 
566  if (EmitPercent)
567  O << '%';
568 
570  return false;
571 }
572 
573 static bool printAsmVRegister(const MachineOperand &MO, char Mode,
574  raw_ostream &O) {
575  Register Reg = MO.getReg();
576  bool EmitPercent = MO.getParent()->getInlineAsmDialect() == InlineAsm::AD_ATT;
577 
578  unsigned Index;
579  if (X86::VR128XRegClass.contains(Reg))
580  Index = Reg - X86::XMM0;
581  else if (X86::VR256XRegClass.contains(Reg))
582  Index = Reg - X86::YMM0;
583  else if (X86::VR512RegClass.contains(Reg))
584  Index = Reg - X86::ZMM0;
585  else
586  return true;
587 
588  switch (Mode) {
589  default: // Unknown mode.
590  return true;
591  case 'x': // Print V4SFmode register
592  Reg = X86::XMM0 + Index;
593  break;
594  case 't': // Print V8SFmode register
595  Reg = X86::YMM0 + Index;
596  break;
597  case 'g': // Print V16SFmode register
598  Reg = X86::ZMM0 + Index;
599  break;
600  }
601 
602  if (EmitPercent)
603  O << '%';
604 
606  return false;
607 }
608 
609 /// PrintAsmOperand - Print out an operand for an inline asm expression.
610 ///
611 bool X86AsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
612  const char *ExtraCode, raw_ostream &O) {
613  // Does this asm operand have a single letter operand modifier?
614  if (ExtraCode && ExtraCode[0]) {
615  if (ExtraCode[1] != 0) return true; // Unknown modifier.
616 
617  const MachineOperand &MO = MI->getOperand(OpNo);
618 
619  switch (ExtraCode[0]) {
620  default:
621  // See if this is a generic print operand
622  return AsmPrinter::PrintAsmOperand(MI, OpNo, ExtraCode, O);
623  case 'a': // This is an address. Currently only 'i' and 'r' are expected.
624  switch (MO.getType()) {
625  default:
626  return true;
628  O << MO.getImm();
629  return false;
633  llvm_unreachable("unexpected operand type!");
635  PrintSymbolOperand(MO, O);
636  if (Subtarget->isPICStyleRIPRel())
637  O << "(%rip)";
638  return false;
640  O << '(';
641  PrintOperand(MI, OpNo, O);
642  O << ')';
643  return false;
644  }
645 
646  case 'c': // Don't print "$" before a global var name or constant.
647  switch (MO.getType()) {
648  default:
649  PrintOperand(MI, OpNo, O);
650  break;
652  O << MO.getImm();
653  break;
657  llvm_unreachable("unexpected operand type!");
659  PrintSymbolOperand(MO, O);
660  break;
661  }
662  return false;
663 
664  case 'A': // Print '*' before a register (it must be a register)
665  if (MO.isReg()) {
666  O << '*';
667  PrintOperand(MI, OpNo, O);
668  return false;
669  }
670  return true;
671 
672  case 'b': // Print QImode register
673  case 'h': // Print QImode high register
674  case 'w': // Print HImode register
675  case 'k': // Print SImode register
676  case 'q': // Print DImode register
677  case 'V': // Print native register without '%'
678  if (MO.isReg())
679  return printAsmMRegister(*this, MO, ExtraCode[0], O);
680  PrintOperand(MI, OpNo, O);
681  return false;
682 
683  case 'x': // Print V4SFmode register
684  case 't': // Print V8SFmode register
685  case 'g': // Print V16SFmode register
686  if (MO.isReg())
687  return printAsmVRegister(MO, ExtraCode[0], O);
688  PrintOperand(MI, OpNo, O);
689  return false;
690 
691  case 'P': // This is the operand of a call, treat specially.
692  PrintPCRelImm(MI, OpNo, O);
693  return false;
694 
695  case 'n': // Negate the immediate or print a '-' before the operand.
696  // Note: this is a temporary solution. It should be handled target
697  // independently as part of the 'MC' work.
698  if (MO.isImm()) {
699  O << -MO.getImm();
700  return false;
701  }
702  O << '-';
703  }
704  }
705 
706  PrintOperand(MI, OpNo, O);
707  return false;
708 }
709 
711  const char *ExtraCode,
712  raw_ostream &O) {
713  if (ExtraCode && ExtraCode[0]) {
714  if (ExtraCode[1] != 0) return true; // Unknown modifier.
715 
716  switch (ExtraCode[0]) {
717  default: return true; // Unknown modifier.
718  case 'b': // Print QImode register
719  case 'h': // Print QImode high register
720  case 'w': // Print HImode register
721  case 'k': // Print SImode register
722  case 'q': // Print SImode register
723  // These only apply to registers, ignore on mem.
724  break;
725  case 'H':
726  if (MI->getInlineAsmDialect() == InlineAsm::AD_Intel) {
727  return true; // Unsupported modifier in Intel inline assembly.
728  } else {
729  PrintMemReference(MI, OpNo, O, "H");
730  }
731  return false;
732  // Print memory only with displacement. The Modifer 'P' is used in inline
733  // asm to present a call symbol or a global symbol which can not use base
734  // reg or index reg.
735  case 'P':
736  if (MI->getInlineAsmDialect() == InlineAsm::AD_Intel) {
737  PrintIntelMemReference(MI, OpNo, O, "disp-only");
738  } else {
739  PrintMemReference(MI, OpNo, O, "disp-only");
740  }
741  return false;
742  }
743  }
744  if (MI->getInlineAsmDialect() == InlineAsm::AD_Intel) {
745  PrintIntelMemReference(MI, OpNo, O, nullptr);
746  } else {
747  PrintMemReference(MI, OpNo, O, nullptr);
748  }
749  return false;
750 }
751 
753  const Triple &TT = TM.getTargetTriple();
754 
755  if (TT.isOSBinFormatELF()) {
756  // Assemble feature flags that may require creation of a note section.
757  unsigned FeatureFlagsAnd = 0;
758  if (M.getModuleFlag("cf-protection-branch"))
759  FeatureFlagsAnd |= ELF::GNU_PROPERTY_X86_FEATURE_1_IBT;
760  if (M.getModuleFlag("cf-protection-return"))
761  FeatureFlagsAnd |= ELF::GNU_PROPERTY_X86_FEATURE_1_SHSTK;
762 
763  if (FeatureFlagsAnd) {
764  // Emit a .note.gnu.property section with the flags.
765  if (!TT.isArch32Bit() && !TT.isArch64Bit())
766  llvm_unreachable("CFProtection used on invalid architecture!");
767  MCSection *Cur = OutStreamer->getCurrentSectionOnly();
769  ".note.gnu.property", ELF::SHT_NOTE, ELF::SHF_ALLOC);
770  OutStreamer->switchSection(Nt);
771 
772  // Emitting note header.
773  const int WordSize = TT.isArch64Bit() && !TT.isX32() ? 8 : 4;
774  emitAlignment(WordSize == 4 ? Align(4) : Align(8));
775  OutStreamer->emitIntValue(4, 4 /*size*/); // data size for "GNU\0"
776  OutStreamer->emitIntValue(8 + WordSize, 4 /*size*/); // Elf_Prop size
777  OutStreamer->emitIntValue(ELF::NT_GNU_PROPERTY_TYPE_0, 4 /*size*/);
778  OutStreamer->emitBytes(StringRef("GNU", 4)); // note name
779 
780  // Emitting an Elf_Prop for the CET properties.
782  OutStreamer->emitInt32(4); // data size
783  OutStreamer->emitInt32(FeatureFlagsAnd); // data
784  emitAlignment(WordSize == 4 ? Align(4) : Align(8)); // padding
785 
786  OutStreamer->endSection(Nt);
787  OutStreamer->switchSection(Cur);
788  }
789  }
790 
791  if (TT.isOSBinFormatMachO())
792  OutStreamer->switchSection(getObjFileLowering().getTextSection());
793 
794  if (TT.isOSBinFormatCOFF()) {
795  // Emit an absolute @feat.00 symbol.
796  MCSymbol *S = MMI->getContext().getOrCreateSymbol(StringRef("@feat.00"));
797  OutStreamer->beginCOFFSymbolDef(S);
798  OutStreamer->emitCOFFSymbolStorageClass(COFF::IMAGE_SYM_CLASS_STATIC);
799  OutStreamer->emitCOFFSymbolType(COFF::IMAGE_SYM_DTYPE_NULL);
800  OutStreamer->endCOFFSymbolDef();
801  int64_t Feat00Value = 0;
802 
803  if (TT.getArch() == Triple::x86) {
804  // According to the PE-COFF spec, the LSB of this value marks the object
805  // for "registered SEH". This means that all SEH handler entry points
806  // must be registered in .sxdata. Use of any unregistered handlers will
807  // cause the process to terminate immediately. LLVM does not know how to
808  // register any SEH handlers, so its object files should be safe.
809  Feat00Value |= COFF::Feat00Flags::SafeSEH;
810  }
811 
812  if (M.getModuleFlag("cfguard")) {
813  // Object is CFG-aware.
814  Feat00Value |= COFF::Feat00Flags::GuardCF;
815  }
816 
817  if (M.getModuleFlag("ehcontguard")) {
818  // Object also has EHCont.
819  Feat00Value |= COFF::Feat00Flags::GuardEHCont;
820  }
821 
822  if (M.getModuleFlag("ms-kernel")) {
823  // Object is compiled with /kernel.
824  Feat00Value |= COFF::Feat00Flags::Kernel;
825  }
826 
827  OutStreamer->emitSymbolAttribute(S, MCSA_Global);
828  OutStreamer->emitAssignment(
829  S, MCConstantExpr::create(Feat00Value, MMI->getContext()));
830  }
831  OutStreamer->emitSyntaxDirective();
832 
833  // If this is not inline asm and we're in 16-bit
834  // mode prefix assembly with .code16.
835  bool is16 = TT.getEnvironment() == Triple::CODE16;
836  if (M.getModuleInlineAsm().empty() && is16)
837  OutStreamer->emitAssemblerFlag(MCAF_Code16);
838 }
839 
840 static void
843  // L_foo$stub:
844  OutStreamer.emitLabel(StubLabel);
845  // .indirect_symbol _foo
846  OutStreamer.emitSymbolAttribute(MCSym.getPointer(), MCSA_IndirectSymbol);
847 
848  if (MCSym.getInt())
849  // External to current translation unit.
850  OutStreamer.emitIntValue(0, 4/*size*/);
851  else
852  // Internal to current translation unit.
853  //
854  // When we place the LSDA into the TEXT section, the type info
855  // pointers need to be indirect and pc-rel. We accomplish this by
856  // using NLPs; however, sometimes the types are local to the file.
857  // We need to fill in the value for the NLP in those cases.
858  OutStreamer.emitValue(
859  MCSymbolRefExpr::create(MCSym.getPointer(), OutStreamer.getContext()),
860  4 /*size*/);
861 }
862 
863 static void emitNonLazyStubs(MachineModuleInfo *MMI, MCStreamer &OutStreamer) {
864 
865  MachineModuleInfoMachO &MMIMacho =
867 
868  // Output stubs for dynamically-linked functions.
870 
871  // Output stubs for external and common global variables.
872  Stubs = MMIMacho.GetGVStubList();
873  if (!Stubs.empty()) {
874  OutStreamer.switchSection(MMI->getContext().getMachOSection(
875  "__IMPORT", "__pointers", MachO::S_NON_LAZY_SYMBOL_POINTERS,
877 
878  for (auto &Stub : Stubs)
879  emitNonLazySymbolPointer(OutStreamer, Stub.first, Stub.second);
880 
881  Stubs.clear();
882  OutStreamer.addBlankLine();
883  }
884 }
885 
887  const Triple &TT = TM.getTargetTriple();
888 
889  if (TT.isOSBinFormatMachO()) {
890  // Mach-O uses non-lazy symbol stubs to encode per-TU information into
891  // global table for symbol lookup.
893 
894  // Emit fault map information.
896 
897  // This flag tells the linker that no global symbols contain code that fall
898  // through to other global symbols (e.g. an implementation of multiple entry
899  // points). If this doesn't occur, the linker can safely perform dead code
900  // stripping. Since LLVM never generates code that does this, it is always
901  // safe to set.
902  OutStreamer->emitAssemblerFlag(MCAF_SubsectionsViaSymbols);
903  } else if (TT.isOSBinFormatCOFF()) {
904  if (MMI->usesMSVCFloatingPoint()) {
905  // In Windows' libcmt.lib, there is a file which is linked in only if the
906  // symbol _fltused is referenced. Linking this in causes some
907  // side-effects:
908  //
909  // 1. For x86-32, it will set the x87 rounding mode to 53-bit instead of
910  // 64-bit mantissas at program start.
911  //
912  // 2. It links in support routines for floating-point in scanf and printf.
913  //
914  // MSVC emits an undefined reference to _fltused when there are any
915  // floating point operations in the program (including calls). A program
916  // that only has: `scanf("%f", &global_float);` may fail to trigger this,
917  // but oh well...that's a documented issue.
919  (TT.getArch() == Triple::x86) ? "__fltused" : "_fltused";
921  OutStreamer->emitSymbolAttribute(S, MCSA_Global);
922  return;
923  }
924  } else if (TT.isOSBinFormatELF()) {
926  }
927 
928  // Emit __morestack address if needed for indirect calls.
929  if (TT.getArch() == Triple::x86_64 && TM.getCodeModel() == CodeModel::Large) {
930  if (MCSymbol *AddrSymbol = OutContext.lookupSymbol("__morestack_addr")) {
931  Align Alignment(1);
934  /*C=*/nullptr, Alignment);
935  OutStreamer->switchSection(ReadOnlySection);
936  OutStreamer->emitLabel(AddrSymbol);
937 
938  unsigned PtrSize = MAI->getCodePointerSize();
939  OutStreamer->emitSymbolValue(GetExternalSymbolSymbol("__morestack"),
940  PtrSize);
941  }
942  }
943 }
944 
945 //===----------------------------------------------------------------------===//
946 // Target Registry Stuff
947 //===----------------------------------------------------------------------===//
948 
949 // Force static initialization.
953 }
llvm::Check::Size
@ Size
Definition: FileCheck.h:77
llvm::X86II::MO_TLVP
@ MO_TLVP
MO_TLVP - On a symbol operand this indicates that the immediate is some TLS offset.
Definition: X86BaseInfo.h:553
llvm::X86II::MO_DARWIN_NONLAZY
@ MO_DARWIN_NONLAZY
MO_DARWIN_NONLAZY - On a symbol operand "FOO", this indicates that the reference is actually to the "...
Definition: X86BaseInfo.h:542
llvm::X86II::MO_GOTTPOFF
@ MO_GOTTPOFF
MO_GOTTPOFF - On a symbol operand this indicates that the immediate is the offset of the GOT entry wi...
Definition: X86BaseInfo.h:491
llvm::X86AsmPrinter::emitFunctionBodyEnd
void emitFunctionBodyEnd() override
Targets can override this to emit stuff after the last basic block in the function.
Definition: X86AsmPrinter.cpp:109
llvm::MachineOperand::MO_BlockAddress
@ MO_BlockAddress
Address of a basic block.
Definition: MachineOperand.h:62
MachineModuleInfoImpls.h
llvm::X86MachineFunctionInfo::getArgumentStackSize
unsigned getArgumentStackSize() const
Definition: X86MachineFunctionInfo.h:191
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:108
llvm::MachineOperand::MO_Immediate
@ MO_Immediate
Immediate operand.
Definition: MachineOperand.h:52
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::AsmPrinter::printOffset
void printOffset(int64_t Offset, raw_ostream &OS) const
This is just convenient handler for printing offsets.
Definition: AsmPrinter.cpp:3499
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
llvm::X86AsmPrinter::runOnMachineFunction
bool runOnMachineFunction(MachineFunction &MF) override
runOnMachineFunction - Emit the function body.
Definition: X86AsmPrinter.cpp:60
llvm::SectionKind::getMetadata
static SectionKind getMetadata()
Definition: SectionKind.h:188
llvm::AsmPrinter::emitBasicBlockEnd
virtual void emitBasicBlockEnd(const MachineBasicBlock &MBB)
Targets can override this to emit stuff at the end of a basic block.
Definition: AsmPrinter.cpp:3729
llvm::MachineModuleInfo::getContext
const MCContext & getContext() const
Definition: MachineModuleInfo.h:143
llvm::X86AsmPrinter::emitBasicBlockEnd
void emitBasicBlockEnd(const MachineBasicBlock &MBB) override
Targets can override this to emit stuff at the end of a basic block.
Definition: X86AsmPrinter.cpp:440
X86Subtarget.h
llvm::COFF::IMAGE_SYM_CLASS_STATIC
@ IMAGE_SYM_CLASS_STATIC
Static.
Definition: COFF.h:210
emitNonLazyStubs
static void emitNonLazyStubs(MachineModuleInfo *MMI, MCStreamer &OutStreamer)
Definition: X86AsmPrinter.cpp:863
llvm::MachineOperand::getGlobal
const GlobalValue * getGlobal() const
Definition: MachineOperand.h:572
llvm::Function
Definition: Function.h:60
llvm::MachineFunction::getContext
MCContext & getContext() const
Definition: MachineFunction.h:608
P
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
Definition: README-SSE.txt:411
llvm::getTheX86_64Target
Target & getTheX86_64Target()
Definition: X86TargetInfo.cpp:17
llvm::X86Subtarget::getInstrInfo
const X86InstrInfo * getInstrInfo() const override
Definition: X86Subtarget.h:128
llvm::X86II::MO_INDNTPOFF
@ MO_INDNTPOFF
MO_INDNTPOFF - On a symbol operand this indicates that the immediate is the absolute address of the G...
Definition: X86BaseInfo.h:500
MCCodeEmitter.h
llvm::Triple::x86
@ x86
Definition: Triple.h:85
llvm::InlineAsm::AD_ATT
@ AD_ATT
Definition: InlineAsm.h:35
llvm::AsmPrinter::MAI
const MCAsmInfo * MAI
Target Asm Printer information.
Definition: AsmPrinter.h:90
llvm::MCConstantExpr::create
static const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false, unsigned SizeInBytes=0)
Definition: MCExpr.cpp:194
contains
return AArch64::GPR64RegClass contains(Reg)
MCSectionELF.h
InlineAsm.h
llvm::Module::getCodeViewFlag
unsigned getCodeViewFlag() const
Returns the CodeView Version by checking module flags.
Definition: Module.cpp:568
llvm::MachineOperand::getBlockAddress
const BlockAddress * getBlockAddress() const
Definition: MachineOperand.h:577
llvm::X86II::MO_GOT_ABSOLUTE_ADDRESS
@ MO_GOT_ABSOLUTE_ADDRESS
MO_GOT_ABSOLUTE_ADDRESS - On a symbol operand, this represents a relocation of: SYMBOL_LABEL + [.
Definition: X86BaseInfo.h:415
llvm::X86Subtarget
Definition: X86Subtarget.h:52
llvm::X86II::MO_TLSGD
@ MO_TLSGD
MO_TLSGD - On a symbol operand this indicates that the immediate is the offset of the GOT entry with ...
Definition: X86BaseInfo.h:463
llvm::COFF::IMAGE_SYM_CLASS_EXTERNAL
@ IMAGE_SYM_CLASS_EXTERNAL
External symbol.
Definition: COFF.h:209
ErrorHandling.h
llvm::X86Disassembler::Reg
Reg
All possible values of the reg field in the ModR/M byte.
Definition: X86DisassemblerDecoder.h:462
MCSectionCOFF.h
llvm::X86II::MO_TLSLDM
@ MO_TLSLDM
MO_TLSLDM - On a symbol operand this indicates that the immediate is the offset of the GOT entry with...
Definition: X86BaseInfo.h:483
llvm::ELF::GNU_PROPERTY_X86_FEATURE_1_IBT
@ GNU_PROPERTY_X86_FEATURE_1_IBT
Definition: ELF.h:1653
MCInstBuilder.h
llvm::COFF::SCT_COMPLEX_TYPE_SHIFT
@ SCT_COMPLEX_TYPE_SHIFT
Type is formed as (base + (derived << SCT_COMPLEX_TYPE_SHIFT))
Definition: COFF.h:265
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
COFF.h
llvm::MachineModuleInfoImpl::SymbolListTy
std::vector< std::pair< MCSymbol *, StubValueTy > > SymbolListTy
Definition: MachineModuleInfo.h:59
llvm::MCStreamer::emitValue
void emitValue(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
Definition: MCStreamer.cpp:178
llvm::MachineModuleInfoImpl::StubValueTy
PointerIntPair< MCSymbol *, 1, bool > StubValueTy
Definition: MachineModuleInfo.h:58
llvm::Module::getModuleFlag
Metadata * getModuleFlag(StringRef Key) const
Return the corresponding value if Key appears in module flags, otherwise return null.
Definition: Module.cpp:322
llvm::MachineOperand::isSymbol
bool isSymbol() const
isSymbol - Tests if this is a MO_ExternalSymbol operand.
Definition: MachineOperand.h:340
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::AsmPrinter::emitAlignment
void emitAlignment(Align Alignment, const GlobalObject *GV=nullptr, unsigned MaxBytesToEmit=0) const
Emit an alignment directive to the specified power of two boundary.
Definition: AsmPrinter.cpp:2810
Module.h
llvm::Triple::x86_64
@ x86_64
Definition: Triple.h:86
llvm::X86II::MO_SECREL
@ MO_SECREL
MO_SECREL - On a symbol operand this indicates that the immediate is the offset from beginning of sec...
Definition: X86BaseInfo.h:565
llvm::X86II::MO_TPOFF
@ MO_TPOFF
MO_TPOFF - On a symbol operand this indicates that the immediate is the thread-pointer offset for the...
Definition: X86BaseInfo.h:508
llvm::COFF::SafeSEH
@ SafeSEH
Definition: COFF.h:779
llvm::MCAsmInfo::getCodePointerSize
unsigned getCodePointerSize() const
Get the code pointer size in bytes.
Definition: MCAsmInfo.h:548
llvm::X86Subtarget::isPICStyleRIPRel
bool isPICStyleRIPRel() const
Definition: X86Subtarget.h:319
llvm::X86AsmPrinter::emitStartOfAsmFile
void emitStartOfAsmFile(Module &M) override
This virtual method can be overridden by targets that want to emit something at the start of their fi...
Definition: X86AsmPrinter.cpp:752
isSimpleReturn
static bool isSimpleReturn(const MachineInstr &MI)
Definition: X86AsmPrinter.cpp:425
llvm::ELF::GNU_PROPERTY_X86_FEATURE_1_SHSTK
@ GNU_PROPERTY_X86_FEATURE_1_SHSTK
Definition: ELF.h:1654
llvm::MCInst
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:184
llvm::FaultMaps::serializeToFaultMapSection
void serializeToFaultMapSection()
Definition: FaultMaps.cpp:45
X86AsmPrinter.h
llvm::X86II::MO_GOTOFF
@ MO_GOTOFF
MO_GOTOFF - On a symbol operand this indicates that the immediate is the offset to the location of th...
Definition: X86BaseInfo.h:434
llvm::MachineOperand::getOffset
int64_t getOffset() const
Return the offset from the symbol in this operand.
Definition: MachineOperand.h:609
llvm::MCContext::lookupSymbol
MCSymbol * lookupSymbol(const Twine &Name) const
Get the symbol for Name, or null.
Definition: MCContext.cpp:365
llvm::MachineOperand::MO_Register
@ MO_Register
Register operand.
Definition: MachineOperand.h:51
F
#define F(x, y, z)
Definition: MD5.cpp:55
X86ATTInstPrinter.h
llvm::AsmPrinter::EmitToStreamer
void EmitToStreamer(MCStreamer &S, const MCInst &Inst)
Definition: AsmPrinter.cpp:402
llvm::MCContext::getMachOSection
MCSectionMachO * getMachOSection(StringRef Segment, StringRef Section, unsigned TypeAndAttributes, unsigned Reserved2, SectionKind K, const char *BeginSymName=nullptr)
Return the MCSection for the specified mach-o section.
Definition: MCContext.cpp:441
llvm::X86II::MO_GOT
@ MO_GOT
MO_GOT - On a symbol operand this indicates that the immediate is the offset to the GOT entry for the...
Definition: X86BaseInfo.h:427
MachineValueType.h
llvm::MCInst::setOpcode
void setOpcode(unsigned Op)
Definition: MCInst.h:197
llvm::X86AsmPrinter::PrintAsmOperand
bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &O) override
PrintAsmOperand - Print out an operand for an inline asm expression.
Definition: X86AsmPrinter.cpp:611
llvm::SectionKind::getReadOnly
static SectionKind getReadOnly()
Definition: SectionKind.h:192
llvm::Target::createMCCodeEmitter
MCCodeEmitter * createMCCodeEmitter(const MCInstrInfo &II, MCContext &Ctx) const
createMCCodeEmitter - Create a target specific code emitter.
Definition: TargetRegistry.h:530
llvm::MCStreamer
Streaming machine code generation interface.
Definition: MCStreamer.h:212
llvm::ConstantInt
This is the shared class of boolean and integer constants.
Definition: Constants.h:79
X86MachineFunctionInfo.h
llvm::MCContext::getOrCreateSymbol
MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
Definition: MCContext.cpp:207
llvm::X86II::MO_COFFSTUB
@ MO_COFFSTUB
MO_COFFSTUB - On a symbol operand "FOO", this indicates that the reference is actually to the "....
Definition: X86BaseInfo.h:575
ELF.h
TargetMachine.h
llvm::AsmPrinter::emitLinkage
virtual void emitLinkage(const GlobalValue *GV, MCSymbol *GVSym) const
This emits linkage information about GVSym based on GV, if this is supported by the target.
Definition: AsmPrinter.cpp:610
llvm::MachineOperand::MO_GlobalAddress
@ MO_GlobalAddress
Address of a global value.
Definition: MachineOperand.h:61
llvm::X86II::MO_PLT
@ MO_PLT
MO_PLT - On a symbol operand this indicates that the immediate is offset to the PLT entry of symbol n...
Definition: X86BaseInfo.h:454
llvm::MachineOperand::getImm
int64_t getImm() const
Definition: MachineOperand.h:546
llvm::MachineFunction::getInfo
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
Definition: MachineFunction.h:754
llvm::X86Subtarget::isTargetWin32
bool isTargetWin32() const
Definition: X86Subtarget.h:316
llvm::AsmPrinter::OutStreamer
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
Definition: AsmPrinter.h:99
llvm::X86::AddrBaseReg
@ AddrBaseReg
Definition: X86BaseInfo.h:32
llvm::X86AsmPrinter::emitKCFITypeId
void emitKCFITypeId(const MachineFunction &MF) override
emitKCFITypeId - Emit the KCFI type information in architecture specific format.
Definition: X86AsmPrinter.cpp:153
MCContext.h
llvm::X86II::MO_GOTPCREL
@ MO_GOTPCREL
MO_GOTPCREL - On a symbol operand this indicates that the immediate is offset to the GOT entry for th...
Definition: X86BaseInfo.h:442
Y
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml", "ocaml 3.10-compatible collector")
llvm::Triple::CODE16
@ CODE16
Definition: Triple.h:235
MCSectionMachO.h
llvm::MCStreamer::emitLabel
virtual void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())
Emit a label for Symbol into the current section.
Definition: MCStreamer.cpp:423
llvm::MCStreamer::switchSection
virtual void switchSection(MCSection *Section, const MCExpr *Subsection=nullptr)
Set the current section where code is being emitted to Section.
Definition: MCStreamer.cpp:1234
llvm::AsmPrinter::SetupMachineFunction
virtual void SetupMachineFunction(MachineFunction &MF)
This should be called when a new MachineFunction is being processed from runOnMachineFunction.
Definition: AsmPrinter.cpp:2312
MCSymbol.h
llvm::MCContext::getELFSection
MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)
Definition: MCContext.h:564
llvm::MCAF_Code16
@ MCAF_Code16
.code16 (X86) / .code 16 (ARM)
Definition: MCDirectives.h:54
llvm::dwarf::Index
Index
Definition: Dwarf.h:472
llvm::MachineOperand
MachineOperand class - Representation of each machine instruction operand.
Definition: MachineOperand.h:48
llvm::Function::getFnAttribute
Attribute getFnAttribute(Attribute::AttrKind Kind) const
Return the attribute for the given attribute kind.
Definition: Function.cpp:654
llvm::MachineModuleInfo
This class contains meta information specific to a module.
Definition: MachineModuleInfo.h:74
llvm::X86II::MO_NO_FLAG
@ MO_NO_FLAG
Definition: X86BaseInfo.h:410
llvm::AsmPrinter::CurrentFnSym
MCSymbol * CurrentFnSym
The symbol for the current function.
Definition: AsmPrinter.h:121
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
llvm::X86II::MO_GOTPCREL_NORELAX
@ MO_GOTPCREL_NORELAX
MO_GOTPCREL_NORELAX - Same as MO_GOTPCREL except that R_X86_64_GOTPCREL relocations are guaranteed to...
Definition: X86BaseInfo.h:447
llvm::GlobalValue::hasInternalLinkage
bool hasInternalLinkage() const
Definition: GlobalValue.h:519
llvm::MCSymbol::getName
StringRef getName() const
getName - Get the symbol name.
Definition: MCSymbol.h:198
llvm::X86II::MO_TLVP_PIC_BASE
@ MO_TLVP_PIC_BASE
MO_TLVP_PIC_BASE - On a symbol operand this indicates that the immediate is some TLS offset from the ...
Definition: X86BaseInfo.h:559
Align
uint64_t Align
Definition: ELFObjHandler.cpp:81
llvm::Align
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
llvm::MCStreamer::addBlankLine
virtual void addBlankLine()
Emit a blank line to a .s file to pretty it up.
Definition: MCStreamer.h:376
llvm::MachineOperand::getParent
MachineInstr * getParent()
getParent - Return the instruction that this operand belongs to.
Definition: MachineOperand.h:237
llvm::MCSymbol::print
void print(raw_ostream &OS, const MCAsmInfo *MAI) const
print - Print the value to the stream OS.
Definition: MCSymbol.cpp:58
llvm::Attribute::getValueAsString
StringRef getValueAsString() const
Return the attribute's value as a string.
Definition: Attributes.cpp:304
emitNonLazySymbolPointer
static void emitNonLazySymbolPointer(MCStreamer &OutStreamer, MCSymbol *StubLabel, MachineModuleInfoImpl::StubValueTy &MCSym)
Definition: X86AsmPrinter.cpp:841
llvm::StringRef::getAsInteger
std::enable_if_t< std::numeric_limits< T >::is_signed, bool > getAsInteger(unsigned Radix, T &Result) const
Parse the current string as an integer of the specified radix.
Definition: StringRef.h:463
Type.h
X
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
llvm::MachineBasicBlock
Definition: MachineBasicBlock.h:94
llvm::MachO::S_NON_LAZY_SYMBOL_POINTERS
@ S_NON_LAZY_SYMBOL_POINTERS
S_NON_LAZY_SYMBOL_POINTERS - Section with non-lazy symbol pointers.
Definition: MachO.h:139
printAsmVRegister
static bool printAsmVRegister(const MachineOperand &MO, char Mode, raw_ostream &O)
Definition: X86AsmPrinter.cpp:573
llvm::X86AsmPrinter
Definition: X86AsmPrinter.h:27
llvm::PointerIntPair::getPointer
PointerTy getPointer() const
Definition: PointerIntPair.h:60
llvm::MachineFunction::getMMI
MachineModuleInfo & getMMI() const
Definition: MachineFunction.h:607
llvm::MachineFunction::getSubtarget
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
Definition: MachineFunction.h:656
llvm::RISCVFenceField::O
@ O
Definition: RISCVBaseInfo.h:264
llvm::getTheX86_32Target
Target & getTheX86_32Target()
Definition: X86TargetInfo.cpp:13
llvm::GlobalValue
Definition: GlobalValue.h:44
llvm::X86II::MO_DARWIN_NONLAZY_PIC_BASE
@ MO_DARWIN_NONLAZY_PIC_BASE
MO_DARWIN_NONLAZY_PIC_BASE - On a symbol operand "FOO", this indicates that the reference is actually...
Definition: X86BaseInfo.h:547
llvm::N86::EAX
@ EAX
Definition: X86MCTargetDesc.h:51
llvm::MachineOperand::getTargetFlags
unsigned getTargetFlags() const
Definition: MachineOperand.h:220
llvm::MCAF_SubsectionsViaSymbols
@ MCAF_SubsectionsViaSymbols
.subsections_via_symbols (MachO)
Definition: MCDirectives.h:53
llvm::X86::AddrScaleAmt
@ AddrScaleAmt
Definition: X86BaseInfo.h:33
llvm::AsmPrinter::GetCPISymbol
virtual MCSymbol * GetCPISymbol(unsigned CPID) const
Return the symbol for the specified constant pool entry.
Definition: AsmPrinter.cpp:3530
Index
uint32_t Index
Definition: ELFObjHandler.cpp:82
llvm::MachineOperand::isReg
bool isReg() const
isReg - Tests if this is a MO_Register operand.
Definition: MachineOperand.h:320
llvm::MachineInstr
Representation of each machine instruction.
Definition: MachineInstr.h:66
llvm::X86II::MO_GOTNTPOFF
@ MO_GOTNTPOFF
MO_GOTNTPOFF - On a symbol operand this indicates that the immediate is the offset of the GOT entry w...
Definition: X86BaseInfo.h:532
llvm::omp::Kernel
Function * Kernel
Summary of a kernel (=entry point for target offloading).
Definition: OpenMPOpt.h:21
llvm::X86II::MO_PIC_BASE_OFFSET
@ MO_PIC_BASE_OFFSET
MO_PIC_BASE_OFFSET - On a symbol operand this indicates that the immediate should get the value of th...
Definition: X86BaseInfo.h:420
LLVM_EXTERNAL_VISIBILITY
#define LLVM_EXTERNAL_VISIBILITY
Definition: Compiler.h:127
llvm::getX86SubSuperRegister
MCRegister getX86SubSuperRegister(MCRegister, unsigned, bool High=false)
Returns the sub or super register of a specific X86 register.
Definition: X86MCTargetDesc.cpp:914
llvm::ELF::NT_GNU_PROPERTY_TYPE_0
@ NT_GNU_PROPERTY_TYPE_0
Definition: ELF.h:1600
X86TargetStreamer.h
llvm::AsmPrinter::GetBlockAddressSymbol
MCSymbol * GetBlockAddressSymbol(const BlockAddress *BA) const
Return the MCSymbol used to satisfy BlockAddress uses of the specified basic block.
Definition: AsmPrinter.cpp:3520
llvm::AsmPrinter::getSymbolPreferLocal
MCSymbol * getSymbolPreferLocal(const GlobalValue &GV) const
Similar to getSymbol() but preferred for references.
Definition: AsmPrinter.cpp:659
isIndirectBranchOrTailCall
static bool isIndirectBranchOrTailCall(const MachineInstr &MI)
Definition: X86AsmPrinter.cpp:430
llvm::X86Subtarget::isTargetCOFF
bool isTargetCOFF() const
Definition: X86Subtarget.h:277
I
#define I(x, y, z)
Definition: MD5.cpp:58
llvm::PointerIntPair::getInt
IntType getInt() const
Definition: PointerIntPair.h:62
llvm::MCInstBuilder
Definition: MCInstBuilder.h:21
MachineConstantPool.h
llvm::X86II::MO_DTPOFF
@ MO_DTPOFF
MO_DTPOFF - On a symbol operand this indicates that the immediate is the offset of the GOT entry with...
Definition: X86BaseInfo.h:516
llvm::X86AsmPrinter::X86AsmPrinter
X86AsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer)
Definition: X86AsmPrinter.cpp:50
llvm::MachineOperand::getType
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
Definition: MachineOperand.h:218
llvm::MachineBasicBlock::getLastNonDebugInstr
iterator getLastNonDebugInstr(bool SkipPseudoOp=true)
Returns an iterator to the last non-debug instruction in the basic block, or end().
Definition: MachineBasicBlock.cpp:264
llvm::ELF::SHF_ALLOC
@ SHF_ALLOC
Definition: ELF.h:1060
llvm::MachineFunction::getName
StringRef getName() const
getName - Return the name of the corresponding LLVM function.
Definition: MachineFunction.cpp:567
llvm::ELF::SHT_NOTE
@ SHT_NOTE
Definition: ELF.h:982
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::ELF::GNU_PROPERTY_X86_FEATURE_1_AND
@ GNU_PROPERTY_X86_FEATURE_1_AND
Definition: ELF.h:1634
llvm::AsmPrinter::getSymbol
MCSymbol * getSymbol(const GlobalValue *GV) const
Definition: AsmPrinter.cpp:655
llvm::X86ATTInstPrinter::getRegisterName
static const char * getRegisterName(unsigned RegNo)
llvm::TargetMachine
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:77
llvm::move
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition: STLExtras.h:1666
llvm::MCStreamer::emitIntValue
virtual void emitIntValue(uint64_t Value, unsigned Size)
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers.
Definition: MCStreamer.cpp:134
llvm::GlobalValue::hasLocalLinkage
bool hasLocalLinkage() const
Definition: GlobalValue.h:521
llvm::MCBinaryExpr::createSub
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
Definition: MCExpr.h:610
llvm::AsmPrinter::MF
MachineFunction * MF
The current machine function.
Definition: AsmPrinter.h:102
llvm::AsmPrinter::OutContext
MCContext & OutContext
This is the context for the output file that we are streaming.
Definition: AsmPrinter.h:94
Mode
SI Whole Quad Mode
Definition: SIWholeQuadMode.cpp:262
llvm::X86MachineFunctionInfo
X86MachineFunctionInfo - This class is derived from MachineFunction and contains private X86 target-s...
Definition: X86MachineFunctionInfo.h:25
llvm::MachineInstr::getInlineAsmDialect
InlineAsm::AsmDialect getInlineAsmDialect() const
Definition: MachineInstr.cpp:791
llvm::MachineOperand::getReg
Register getReg() const
getReg - Returns the register number.
Definition: MachineOperand.h:359
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
llvm::MDNode
Metadata node.
Definition: Metadata.h:944
llvm::X86::AddrIndexReg
@ AddrIndexReg
Definition: X86BaseInfo.h:34
llvm::MachineFunction
Definition: MachineFunction.h:257
Mangler.h
llvm::MachineOperand::MO_JumpTableIndex
@ MO_JumpTableIndex
Address of indexed Jump Table for switch.
Definition: MachineOperand.h:59
llvm::COFF::GuardCF
@ GuardCF
Definition: COFF.h:785
llvm::MCAsmInfo::hasDotTypeDotSizeDirective
bool hasDotTypeDotSizeDirective() const
Definition: MCAsmInfo.h:747
llvm::AsmPrinter::GetExternalSymbolSymbol
MCSymbol * GetExternalSymbolSymbol(StringRef Sym) const
Return the MCSymbol for the specified ExternalSymbol.
Definition: AsmPrinter.cpp:3577
llvm::X86II::MO_DLLIMPORT
@ MO_DLLIMPORT
MO_DLLIMPORT - On a symbol operand "FOO", this indicates that the reference is actually to the "__imp...
Definition: X86BaseInfo.h:537
llvm::X86AsmPrinter::PrintAsmMemoryOperand
bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &O) override
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant as...
Definition: X86AsmPrinter.cpp:710
MCAsmInfo.h
llvm::InlineAsm::AD_Intel
@ AD_Intel
Definition: InlineAsm.h:36
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
this
Analysis the ScalarEvolution expression for r is this
Definition: README.txt:8
LLVMInitializeX86AsmPrinter
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86AsmPrinter()
Definition: X86AsmPrinter.cpp:950
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:143
uint32_t
llvm::COFF::GuardEHCont
@ GuardEHCont
Definition: COFF.h:787
llvm::X86AsmPrinter::emitEndOfAsmFile
void emitEndOfAsmFile(Module &M) override
This virtual method can be overridden by targets that want to emit something at the end of their file...
Definition: X86AsmPrinter.cpp:886
llvm::MCSection
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition: MCSection.h:39
S
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
Definition: README.txt:210
printAsmMRegister
static bool printAsmMRegister(const X86AsmPrinter &P, const MachineOperand &MO, char Mode, raw_ostream &O)
Definition: X86AsmPrinter.cpp:531
llvm::MCSA_IndirectSymbol
@ MCSA_IndirectSymbol
.indirect_symbol (MachO)
Definition: MCDirectives.h:35
llvm::MCContext::createTempSymbol
MCSymbol * createTempSymbol()
Create a temporary symbol with a unique name.
Definition: MCContext.cpp:324
llvm::Register
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
llvm::AsmPrinter::MMI
MachineModuleInfo * MMI
This is a pointer to the current MachineModuleInfo.
Definition: AsmPrinter.h:105
MBB
MachineBasicBlock & MBB
Definition: AArch64SLSHardening.cpp:74
llvm::AMDGPU::HSAMD::Kernel::Key::SymbolName
constexpr char SymbolName[]
Key for Kernel::Metadata::mSymbolName.
Definition: AMDGPUMetadata.h:386
llvm::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:81
llvm::X86AsmPrinter::emitFunctionBodyStart
void emitFunctionBodyStart() override
Targets can override this to emit stuff before the first basic block in the function.
Definition: X86AsmPrinter.cpp:99
std
Definition: BitVector.h:851
llvm::MachineFunction::getFunction
Function & getFunction()
Return the LLVM function that this machine code represents.
Definition: MachineFunction.h:622
llvm::AsmPrinter::emitNops
void emitNops(unsigned N)
Emit N NOP instructions.
Definition: AsmPrinter.cpp:3506
llvm::MCStreamer::emitSymbolAttribute
virtual bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute)=0
Add the given Attribute to Symbol.
llvm::AsmPrinter::getSubtargetInfo
const MCSubtargetInfo & getSubtargetInfo() const
Return information about subtarget.
Definition: AsmPrinter.cpp:397
llvm::N86::ESP
@ ESP
Definition: X86MCTargetDesc.h:51
llvm::MachineOperand::MO_ExternalSymbol
@ MO_ExternalSymbol
Name of external global symbol.
Definition: MachineOperand.h:60
llvm::MachineOperand::getIndex
int getIndex() const
Definition: MachineOperand.h:566
llvm::MachineModuleInfoMachO::GetGVStubList
SymbolListTy GetGVStubList()
Accessor methods to return the set of stubs in sorted order.
Definition: MachineModuleInfoImpls.h:55
llvm::X86II::MO_TLSLD
@ MO_TLSLD
MO_TLSLD - On a symbol operand this indicates that the immediate is the offset of the GOT entry with ...
Definition: X86BaseInfo.h:473
llvm::TargetStackID::Value
Value
Definition: TargetFrameLowering.h:27
llvm::AsmPrinter
This class is intended to be used as a driving class for all asm writers.
Definition: AsmPrinter.h:84
llvm::MCSymbolRefExpr::create
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
Definition: MCExpr.h:386
llvm::X86::AddrSegmentReg
@ AddrSegmentReg
AddrSegmentReg - The operand # of the segment in the memory operand.
Definition: X86BaseInfo.h:38
llvm::MCSA_Global
@ MCSA_Global
.type _foo, @gnu_unique_object
Definition: MCDirectives.h:30
llvm::MachineOperand::isImm
bool isImm() const
isImm - Tests if this is a MO_Immediate operand.
Definition: MachineOperand.h:322
llvm::X86TargetStreamer
X86 target streamer implementing x86-only assembly directives.
Definition: X86TargetStreamer.h:17
llvm::TargetLoweringObjectFile::getSectionForConstant
virtual MCSection * getSectionForConstant(const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const
Given a constant with the SectionKind, return a section that it should be placed in.
Definition: TargetLoweringObjectFile.cpp:380
llvm::MCSA_ELF_TypeFunction
@ MCSA_ELF_TypeFunction
.type _foo, STT_FUNC # aka @function
Definition: MCDirectives.h:23
llvm::CodeModel::Large
@ Large
Definition: CodeGen.h:28
llvm::MachineFunction::getPICBaseSymbol
MCSymbol * getPICBaseSymbol() const
getPICBaseSymbol - Return a function-local symbol to represent the PIC base.
Definition: MachineFunction.cpp:719
X86BaseInfo.h
llvm::PointerIntPair
PointerIntPair - This class implements a pair of a pointer and small integer.
Definition: PointerIntPair.h:46
llvm::MCStreamer::getContext
MCContext & getContext() const
Definition: MCStreamer.h:293
llvm::AsmPrinter::TM
TargetMachine & TM
Target machine description.
Definition: AsmPrinter.h:87
llvm::X86::AddrDisp
@ AddrDisp
Definition: X86BaseInfo.h:35
llvm::COFF::IMAGE_SYM_DTYPE_NULL
@ IMAGE_SYM_DTYPE_NULL
No complex type; simple scalar variable.
Definition: COFF.h:259
llvm::AsmPrinter::getSymbolWithGlobalValueBase
MCSymbol * getSymbolWithGlobalValueBase(const GlobalValue *GV, StringRef Suffix) const
Return the MCSymbol for a private symbol with global value name as its base, with the specified suffi...
Definition: AsmPrinter.cpp:3571
llvm::AsmPrinter::getObjFileLowering
const TargetLoweringObjectFile & getObjFileLowering() const
Return information about object file lowering.
Definition: AsmPrinter.cpp:383
N
#define N
MCStreamer.h
llvm::AsmPrinter::emitFunctionBody
void emitFunctionBody()
This method emits the body and trailer for a function.
Definition: AsmPrinter.cpp:1550
llvm::TargetMachine::getTargetTriple
const Triple & getTargetTriple() const
Definition: TargetMachine.h:126
llvm::isMem
static bool isMem(const MachineInstr &MI, unsigned Op)
Definition: X86InstrInfo.h:131
llvm::AsmPrinter::getDataLayout
const DataLayout & getDataLayout() const
Return information about data layout.
Definition: AsmPrinter.cpp:387
DerivedTypes.h
TM
const char LLVMTargetMachineRef TM
Definition: PassBuilderBindings.cpp:47
llvm::TargetMachine::getCodeModel
CodeModel::Model getCodeModel() const
Returns the code model.
Definition: TargetMachine.h:225
llvm::AsmPrinter::emitXRayTable
void emitXRayTable()
Emit a table with all XRay instrumentation points.
Definition: AsmPrinter.cpp:3879
llvm::RegisterAsmPrinter
RegisterAsmPrinter - Helper template for registering a target specific assembly printer,...
Definition: TargetRegistry.h:1381
llvm::TargetMachine::getTarget
const Target & getTarget() const
Definition: TargetMachine.h:124
llvm::X86II::MO_NTPOFF
@ MO_NTPOFF
MO_NTPOFF - On a symbol operand this indicates that the immediate is the negative thread-pointer offs...
Definition: X86BaseInfo.h:524
llvm::COFF::IMAGE_SYM_DTYPE_FUNCTION
@ IMAGE_SYM_DTYPE_FUNCTION
A function that returns a base type.
Definition: COFF.h:261
X86InstrInfo.h
X86TargetInfo.h
TargetRegistry.h
llvm::MachineFunction::getAlignment
Align getAlignment() const
getAlignment - Return the alignment of the function.
Definition: MachineFunction.h:704
MCExpr.h
llvm::MachineModuleInfo::getModule
const Module * getModule() const
Definition: MachineModuleInfo.h:150
llvm::offsetToAlignment
uint64_t offsetToAlignment(uint64_t Value, Align Alignment)
Returns the offset to the next integer (mod 2**64) that is greater than or equal to Value and is a mu...
Definition: Alignment.h:198
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:35
Debug.h
llvm::MachineBasicBlock::end
iterator end()
Definition: MachineBasicBlock.h:307
llvm::AsmPrinter::PrintAsmOperand
virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS)
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant.
Definition: AsmPrinterInlineAsm.cpp:475
llvm::MachineModuleInfo::getObjFileInfo
Ty & getObjFileInfo()
Keep track of various per-module pieces of information for backends that would like to do so.
Definition: MachineModuleInfo.h:170
llvm::MachineModuleInfoMachO
MachineModuleInfoMachO - This is a MachineModuleInfoImpl implementation for MachO targets.
Definition: MachineModuleInfoImpls.h:28
llvm::MachineOperand::isGlobal
bool isGlobal() const
isGlobal - Tests if this is a MO_GlobalAddress operand.
Definition: MachineOperand.h:338
llvm::MachineModuleInfo::usesMSVCFloatingPoint
bool usesMSVCFloatingPoint() const
Definition: MachineModuleInfo.h:184
llvm::MachineOperand::MO_ConstantPoolIndex
@ MO_ConstantPoolIndex
Address of indexed Constant in Constant Pool.
Definition: MachineOperand.h:57
TargetLoweringObjectFileImpl.h