clang  6.0.0svn
X86.h
Go to the documentation of this file.
1 //===--- X86.h - Declare X86 target feature support -------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares X86 TargetInfo objects.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_X86_H
15 #define LLVM_CLANG_LIB_BASIC_TARGETS_X86_H
16 
17 #include "OSTargets.h"
18 #include "clang/Basic/TargetInfo.h"
20 #include "llvm/ADT/Triple.h"
21 #include "llvm/Support/Compiler.h"
22 
23 namespace clang {
24 namespace targets {
25 
26 // X86 target abstract base class; x86-32 and x86-64 are very close, so
27 // most of the implementation can be shared.
28 class LLVM_LIBRARY_VISIBILITY X86TargetInfo : public TargetInfo {
29 
30  enum X86SSEEnum {
31  NoSSE,
32  SSE1,
33  SSE2,
34  SSE3,
35  SSSE3,
36  SSE41,
37  SSE42,
38  AVX,
39  AVX2,
40  AVX512F
41  } SSELevel = NoSSE;
42  enum MMX3DNowEnum {
43  NoMMX3DNow,
44  MMX,
45  AMD3DNow,
46  AMD3DNowAthlon
47  } MMX3DNowLevel = NoMMX3DNow;
48  enum XOPEnum { NoXOP, SSE4A, FMA4, XOP } XOPLevel = NoXOP;
49 
50  bool HasAES = false;
51  bool HasPCLMUL = false;
52  bool HasLZCNT = false;
53  bool HasRDRND = false;
54  bool HasFSGSBASE = false;
55  bool HasBMI = false;
56  bool HasBMI2 = false;
57  bool HasPOPCNT = false;
58  bool HasRTM = false;
59  bool HasPRFCHW = false;
60  bool HasRDSEED = false;
61  bool HasADX = false;
62  bool HasTBM = false;
63  bool HasLWP = false;
64  bool HasFMA = false;
65  bool HasF16C = false;
66  bool HasAVX512CD = false;
67  bool HasAVX512VPOPCNTDQ = false;
68  bool HasAVX512ER = false;
69  bool HasAVX512PF = false;
70  bool HasAVX512DQ = false;
71  bool HasAVX512BW = false;
72  bool HasAVX512VL = false;
73  bool HasAVX512VBMI = false;
74  bool HasAVX512IFMA = false;
75  bool HasSHA = false;
76  bool HasMPX = false;
77  bool HasSGX = false;
78  bool HasCX16 = false;
79  bool HasFXSR = false;
80  bool HasXSAVE = false;
81  bool HasXSAVEOPT = false;
82  bool HasXSAVEC = false;
83  bool HasXSAVES = false;
84  bool HasMWAITX = false;
85  bool HasCLZERO = false;
86  bool HasPKU = false;
87  bool HasCLFLUSHOPT = false;
88  bool HasCLWB = false;
89  bool HasMOVBE = false;
90  bool HasPREFETCHWT1 = false;
91 
92  /// \brief Enumeration of all of the X86 CPUs supported by Clang.
93  ///
94  /// Each enumeration represents a particular CPU supported by Clang. These
95  /// loosely correspond to the options passed to '-march' or '-mtune' flags.
96  enum CPUKind {
97  CK_Generic,
98 
99  /// \name i386
100  /// i386-generation processors.
101  //@{
102  CK_i386,
103  //@}
104 
105  /// \name i486
106  /// i486-generation processors.
107  //@{
108  CK_i486,
109  CK_WinChipC6,
110  CK_WinChip2,
111  CK_C3,
112  //@}
113 
114  /// \name i586
115  /// i586-generation processors, P5 microarchitecture based.
116  //@{
117  CK_i586,
118  CK_Pentium,
119  CK_PentiumMMX,
120  //@}
121 
122  /// \name i686
123  /// i686-generation processors, P6 / Pentium M microarchitecture based.
124  //@{
125  CK_i686,
126  CK_PentiumPro,
127  CK_Pentium2,
128  CK_Pentium3,
129  CK_PentiumM,
130  CK_C3_2,
131 
132  /// This enumerator is a bit odd, as GCC no longer accepts -march=yonah.
133  /// Clang however has some logic to support this.
134  // FIXME: Warn, deprecate, and potentially remove this.
135  CK_Yonah,
136  //@}
137 
138  /// \name Netburst
139  /// Netburst microarchitecture based processors.
140  //@{
141  CK_Pentium4,
142  CK_Prescott,
143  CK_Nocona,
144  //@}
145 
146  /// \name Core
147  /// Core microarchitecture based processors.
148  //@{
149  CK_Core2,
150 
151  /// This enumerator, like \see CK_Yonah, is a bit odd. It is another
152  /// codename which GCC no longer accepts as an option to -march, but Clang
153  /// has some logic for recognizing it.
154  // FIXME: Warn, deprecate, and potentially remove this.
155  CK_Penryn,
156  //@}
157 
158  /// \name Atom
159  /// Atom processors
160  //@{
161  CK_Bonnell,
162  CK_Silvermont,
163  CK_Goldmont,
164  //@}
165 
166  /// \name Nehalem
167  /// Nehalem microarchitecture based processors.
168  CK_Nehalem,
169 
170  /// \name Westmere
171  /// Westmere microarchitecture based processors.
172  CK_Westmere,
173 
174  /// \name Sandy Bridge
175  /// Sandy Bridge microarchitecture based processors.
176  CK_SandyBridge,
177 
178  /// \name Ivy Bridge
179  /// Ivy Bridge microarchitecture based processors.
180  CK_IvyBridge,
181 
182  /// \name Haswell
183  /// Haswell microarchitecture based processors.
184  CK_Haswell,
185 
186  /// \name Broadwell
187  /// Broadwell microarchitecture based processors.
188  CK_Broadwell,
189 
190  /// \name Skylake Client
191  /// Skylake client microarchitecture based processors.
192  CK_SkylakeClient,
193 
194  /// \name Skylake Server
195  /// Skylake server microarchitecture based processors.
196  CK_SkylakeServer,
197 
198  /// \name Cannonlake Client
199  /// Cannonlake client microarchitecture based processors.
200  CK_Cannonlake,
201 
202  /// \name Knights Landing
203  /// Knights Landing processor.
204  CK_KNL,
205 
206  /// \name Knights Mill
207  /// Knights Mill processor.
208  CK_KNM,
209 
210  /// \name Lakemont
211  /// Lakemont microarchitecture based processors.
212  CK_Lakemont,
213 
214  /// \name K6
215  /// K6 architecture processors.
216  //@{
217  CK_K6,
218  CK_K6_2,
219  CK_K6_3,
220  //@}
221 
222  /// \name K7
223  /// K7 architecture processors.
224  //@{
225  CK_Athlon,
226  CK_AthlonXP,
227  //@}
228 
229  /// \name K8
230  /// K8 architecture processors.
231  //@{
232  CK_K8,
233  CK_K8SSE3,
234  CK_AMDFAM10,
235  //@}
236 
237  /// \name Bobcat
238  /// Bobcat architecture processors.
239  //@{
240  CK_BTVER1,
241  CK_BTVER2,
242  //@}
243 
244  /// \name Bulldozer
245  /// Bulldozer architecture processors.
246  //@{
247  CK_BDVER1,
248  CK_BDVER2,
249  CK_BDVER3,
250  CK_BDVER4,
251  //@}
252 
253  /// \name zen
254  /// Zen architecture processors.
255  //@{
256  CK_ZNVER1,
257  //@}
258 
259  /// This specification is deprecated and will be removed in the future.
260  /// Users should prefer \see CK_K8.
261  // FIXME: Warn on this when the CPU is set to it.
262  //@{
263  CK_x86_64,
264  //@}
265 
266  /// \name Geode
267  /// Geode processors.
268  //@{
269  CK_Geode
270  //@}
271  } CPU = CK_Generic;
272 
273  bool checkCPUKind(CPUKind Kind) const {
274  // Perform any per-CPU checks necessary to determine if this CPU is
275  // acceptable.
276  // FIXME: This results in terrible diagnostics. Clang just says the CPU is
277  // invalid without explaining *why*.
278  switch (Kind) {
279  case CK_Generic:
280  // No processor selected!
281  return false;
282 
283  case CK_i386:
284  case CK_i486:
285  case CK_WinChipC6:
286  case CK_WinChip2:
287  case CK_C3:
288  case CK_i586:
289  case CK_Pentium:
290  case CK_PentiumMMX:
291  case CK_i686:
292  case CK_PentiumPro:
293  case CK_Pentium2:
294  case CK_Pentium3:
295  case CK_PentiumM:
296  case CK_Yonah:
297  case CK_C3_2:
298  case CK_Pentium4:
299  case CK_Lakemont:
300  case CK_Prescott:
301  case CK_K6:
302  case CK_K6_2:
303  case CK_K6_3:
304  case CK_Athlon:
305  case CK_AthlonXP:
306  case CK_Geode:
307  // Only accept certain architectures when compiling in 32-bit mode.
308  if (getTriple().getArch() != llvm::Triple::x86)
309  return false;
310 
311  LLVM_FALLTHROUGH;
312  case CK_Nocona:
313  case CK_Core2:
314  case CK_Penryn:
315  case CK_Bonnell:
316  case CK_Silvermont:
317  case CK_Goldmont:
318  case CK_Nehalem:
319  case CK_Westmere:
320  case CK_SandyBridge:
321  case CK_IvyBridge:
322  case CK_Haswell:
323  case CK_Broadwell:
324  case CK_SkylakeClient:
325  case CK_SkylakeServer:
326  case CK_Cannonlake:
327  case CK_KNL:
328  case CK_KNM:
329  case CK_K8:
330  case CK_K8SSE3:
331  case CK_AMDFAM10:
332  case CK_BTVER1:
333  case CK_BTVER2:
334  case CK_BDVER1:
335  case CK_BDVER2:
336  case CK_BDVER3:
337  case CK_BDVER4:
338  case CK_ZNVER1:
339  case CK_x86_64:
340  return true;
341  }
342  llvm_unreachable("Unhandled CPU kind");
343  }
344 
345  CPUKind getCPUKind(StringRef CPU) const;
346 
347  enum FPMathKind { FP_Default, FP_SSE, FP_387 } FPMath = FP_Default;
348 
349 public:
350  X86TargetInfo(const llvm::Triple &Triple, const TargetOptions &)
351  : TargetInfo(Triple) {
352  LongDoubleFormat = &llvm::APFloat::x87DoubleExtended();
353  }
354 
355  unsigned getFloatEvalMethod() const override {
356  // X87 evaluates with 80 bits "long double" precision.
357  return SSELevel == NoSSE ? 2 : 0;
358  }
359 
360  ArrayRef<const char *> getGCCRegNames() const override;
361 
363  return None;
364  }
365 
366  ArrayRef<TargetInfo::AddlRegName> getGCCAddlRegNames() const override;
367 
368  bool validateCpuSupports(StringRef Name) const override;
369 
370  bool validateCpuIs(StringRef Name) const override;
371 
372  bool validateAsmConstraint(const char *&Name,
373  TargetInfo::ConstraintInfo &info) const override;
374 
375  bool validateGlobalRegisterVariable(StringRef RegName, unsigned RegSize,
376  bool &HasSizeMismatch) const override {
377  // esp and ebp are the only 32-bit registers the x86 backend can currently
378  // handle.
379  if (RegName.equals("esp") || RegName.equals("ebp")) {
380  // Check that the register size is 32-bit.
381  HasSizeMismatch = RegSize != 32;
382  return true;
383  }
384 
385  return false;
386  }
387 
388  bool validateOutputSize(StringRef Constraint, unsigned Size) const override;
389 
390  bool validateInputSize(StringRef Constraint, unsigned Size) const override;
391 
392  virtual bool validateOperandSize(StringRef Constraint, unsigned Size) const;
393 
394  std::string convertConstraint(const char *&Constraint) const override;
395  const char *getClobbers() const override {
396  return "~{dirflag},~{fpsr},~{flags}";
397  }
398 
399  StringRef getConstraintRegister(const StringRef &Constraint,
400  const StringRef &Expression) const override {
401  StringRef::iterator I, E;
402  for (I = Constraint.begin(), E = Constraint.end(); I != E; ++I) {
403  if (isalpha(*I))
404  break;
405  }
406  if (I == E)
407  return "";
408  switch (*I) {
409  // For the register constraints, return the matching register name
410  case 'a':
411  return "ax";
412  case 'b':
413  return "bx";
414  case 'c':
415  return "cx";
416  case 'd':
417  return "dx";
418  case 'S':
419  return "si";
420  case 'D':
421  return "di";
422  // In case the constraint is 'r' we need to return Expression
423  case 'r':
424  return Expression;
425  // Double letters Y<x> constraints
426  case 'Y':
427  if ((++I != E) && ((*I == '0') || (*I == 'z')))
428  return "xmm0";
429  default:
430  break;
431  }
432  return "";
433  }
434 
435  void getTargetDefines(const LangOptions &Opts,
436  MacroBuilder &Builder) const override;
437 
438  static void setSSELevel(llvm::StringMap<bool> &Features, X86SSEEnum Level,
439  bool Enabled);
440 
441  static void setMMXLevel(llvm::StringMap<bool> &Features, MMX3DNowEnum Level,
442  bool Enabled);
443 
444  static void setXOPLevel(llvm::StringMap<bool> &Features, XOPEnum Level,
445  bool Enabled);
446 
447  void setFeatureEnabled(llvm::StringMap<bool> &Features, StringRef Name,
448  bool Enabled) const override {
449  setFeatureEnabledImpl(Features, Name, Enabled);
450  }
451 
452  // This exists purely to cut down on the number of virtual calls in
453  // initFeatureMap which calls this repeatedly.
454  static void setFeatureEnabledImpl(llvm::StringMap<bool> &Features,
455  StringRef Name, bool Enabled);
456 
457  bool
458  initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags,
459  StringRef CPU,
460  const std::vector<std::string> &FeaturesVec) const override;
461 
462  bool isValidFeatureName(StringRef Name) const override;
463 
464  bool hasFeature(StringRef Feature) const override;
465 
466  bool handleTargetFeatures(std::vector<std::string> &Features,
467  DiagnosticsEngine &Diags) override;
468 
469  StringRef getABI() const override {
470  if (getTriple().getArch() == llvm::Triple::x86_64 && SSELevel >= AVX512F)
471  return "avx512";
472  if (getTriple().getArch() == llvm::Triple::x86_64 && SSELevel >= AVX)
473  return "avx";
474  if (getTriple().getArch() == llvm::Triple::x86 &&
475  MMX3DNowLevel == NoMMX3DNow)
476  return "no-mmx";
477  return "";
478  }
479 
480  bool isValidCPUName(StringRef Name) const override {
481  return checkCPUKind(getCPUKind(Name));
482  }
483 
484  bool setCPU(const std::string &Name) override {
485  return checkCPUKind(CPU = getCPUKind(Name));
486  }
487 
488  bool setFPMath(StringRef Name) override;
489 
491  // Most of the non-ARM calling conventions are i386 conventions.
492  switch (CC) {
493  case CC_X86ThisCall:
494  case CC_X86FastCall:
495  case CC_X86StdCall:
496  case CC_X86VectorCall:
497  case CC_X86RegCall:
498  case CC_C:
499  case CC_Swift:
500  case CC_X86Pascal:
501  case CC_IntelOclBicc:
502  case CC_OpenCLKernel:
503  return CCCR_OK;
504  default:
505  return CCCR_Warning;
506  }
507  }
508 
510  return MT == CCMT_Member ? CC_X86ThisCall : CC_C;
511  }
512 
513  bool hasSjLjLowering() const override { return true; }
514 
515  void setSupportedOpenCLOpts() override {
516  getSupportedOpenCLOpts().supportAll();
517  }
518 };
519 
520 // X86-32 generic target
521 class LLVM_LIBRARY_VISIBILITY X86_32TargetInfo : public X86TargetInfo {
522 public:
523  X86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
524  : X86TargetInfo(Triple, Opts) {
525  DoubleAlign = LongLongAlign = 32;
526  LongDoubleWidth = 96;
527  LongDoubleAlign = 32;
528  SuitableAlign = 128;
529  resetDataLayout("e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128");
530  SizeType = UnsignedInt;
531  PtrDiffType = SignedInt;
532  IntPtrType = SignedInt;
533  RegParmMax = 3;
534 
535  // Use fpret for all types.
536  RealTypeUsesObjCFPRet =
537  ((1 << TargetInfo::Float) | (1 << TargetInfo::Double) |
538  (1 << TargetInfo::LongDouble));
539 
540  // x86-32 has atomics up to 8 bytes
541  // FIXME: Check that we actually have cmpxchg8b before setting
542  // MaxAtomicInlineWidth. (cmpxchg8b is an i586 instruction.)
543  MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
544  }
545 
548  }
549 
550  int getEHDataRegisterNumber(unsigned RegNo) const override {
551  if (RegNo == 0)
552  return 0;
553  if (RegNo == 1)
554  return 2;
555  return -1;
556  }
557 
558  bool validateOperandSize(StringRef Constraint, unsigned Size) const override {
559  switch (Constraint[0]) {
560  default:
561  break;
562  case 'R':
563  case 'q':
564  case 'Q':
565  case 'a':
566  case 'b':
567  case 'c':
568  case 'd':
569  case 'S':
570  case 'D':
571  return Size <= 32;
572  case 'A':
573  return Size <= 64;
574  }
575 
576  return X86TargetInfo::validateOperandSize(Constraint, Size);
577  }
578 
579  ArrayRef<Builtin::Info> getTargetBuiltins() const override;
580 };
581 
582 class LLVM_LIBRARY_VISIBILITY NetBSDI386TargetInfo
583  : public NetBSDTargetInfo<X86_32TargetInfo> {
584 public:
585  NetBSDI386TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
586  : NetBSDTargetInfo<X86_32TargetInfo>(Triple, Opts) {}
587 
588  unsigned getFloatEvalMethod() const override {
589  unsigned Major, Minor, Micro;
590  getTriple().getOSVersion(Major, Minor, Micro);
591  // New NetBSD uses the default rounding mode.
592  if (Major >= 7 || (Major == 6 && Minor == 99 && Micro >= 26) || Major == 0)
594  // NetBSD before 6.99.26 defaults to "double" rounding.
595  return 1;
596  }
597 };
598 
599 class LLVM_LIBRARY_VISIBILITY OpenBSDI386TargetInfo
600  : public OpenBSDTargetInfo<X86_32TargetInfo> {
601 public:
602  OpenBSDI386TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
603  : OpenBSDTargetInfo<X86_32TargetInfo>(Triple, Opts) {
604  SizeType = UnsignedLong;
605  IntPtrType = SignedLong;
606  PtrDiffType = SignedLong;
607  }
608 };
609 
610 class LLVM_LIBRARY_VISIBILITY DarwinI386TargetInfo
611  : public DarwinTargetInfo<X86_32TargetInfo> {
612 public:
613  DarwinI386TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
614  : DarwinTargetInfo<X86_32TargetInfo>(Triple, Opts) {
615  LongDoubleWidth = 128;
616  LongDoubleAlign = 128;
617  SuitableAlign = 128;
618  MaxVectorAlign = 256;
619  // The watchOS simulator uses the builtin bool type for Objective-C.
620  llvm::Triple T = llvm::Triple(Triple);
621  if (T.isWatchOS())
622  UseSignedCharForObjCBool = false;
623  SizeType = UnsignedLong;
624  IntPtrType = SignedLong;
625  resetDataLayout("e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128");
626  HasAlignMac68kSupport = true;
627  }
628 
629  bool handleTargetFeatures(std::vector<std::string> &Features,
630  DiagnosticsEngine &Diags) override {
632  Diags))
633  return false;
634  // We now know the features we have: we can decide how to align vectors.
635  MaxVectorAlign =
636  hasFeature("avx512f") ? 512 : hasFeature("avx") ? 256 : 128;
637  return true;
638  }
639 };
640 
641 // x86-32 Windows target
642 class LLVM_LIBRARY_VISIBILITY WindowsX86_32TargetInfo
643  : public WindowsTargetInfo<X86_32TargetInfo> {
644 public:
645  WindowsX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
646  : WindowsTargetInfo<X86_32TargetInfo>(Triple, Opts) {
647  DoubleAlign = LongLongAlign = 64;
648  bool IsWinCOFF =
649  getTriple().isOSWindows() && getTriple().isOSBinFormatCOFF();
650  resetDataLayout(IsWinCOFF
651  ? "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
652  : "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32");
653  }
654 
655  void getTargetDefines(const LangOptions &Opts,
656  MacroBuilder &Builder) const override {
658  }
659 };
660 
661 // x86-32 Windows Visual Studio target
662 class LLVM_LIBRARY_VISIBILITY MicrosoftX86_32TargetInfo
663  : public WindowsX86_32TargetInfo {
664 public:
665  MicrosoftX86_32TargetInfo(const llvm::Triple &Triple,
666  const TargetOptions &Opts)
667  : WindowsX86_32TargetInfo(Triple, Opts) {
668  LongDoubleWidth = LongDoubleAlign = 64;
669  LongDoubleFormat = &llvm::APFloat::IEEEdouble();
670  }
671 
672  void getTargetDefines(const LangOptions &Opts,
673  MacroBuilder &Builder) const override {
676  // The value of the following reflects processor type.
677  // 300=386, 400=486, 500=Pentium, 600=Blend (default)
678  // We lost the original triple, so we use the default.
679  Builder.defineMacro("_M_IX86", "600");
680  }
681 };
682 
683 // x86-32 MinGW target
684 class LLVM_LIBRARY_VISIBILITY MinGWX86_32TargetInfo
685  : public WindowsX86_32TargetInfo {
686 public:
687  MinGWX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
688  : WindowsX86_32TargetInfo(Triple, Opts) {
689  HasFloat128 = true;
690  }
691 
692  void getTargetDefines(const LangOptions &Opts,
693  MacroBuilder &Builder) const override {
695  DefineStd(Builder, "WIN32", Opts);
696  DefineStd(Builder, "WINNT", Opts);
697  Builder.defineMacro("_X86_");
698  addMinGWDefines(Opts, Builder);
699  }
700 };
701 
702 // x86-32 Cygwin target
703 class LLVM_LIBRARY_VISIBILITY CygwinX86_32TargetInfo : public X86_32TargetInfo {
704 public:
705  CygwinX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
706  : X86_32TargetInfo(Triple, Opts) {
707  this->WCharType = TargetInfo::UnsignedShort;
708  DoubleAlign = LongLongAlign = 64;
709  resetDataLayout("e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32");
710  }
711 
712  void getTargetDefines(const LangOptions &Opts,
713  MacroBuilder &Builder) const override {
714  X86_32TargetInfo::getTargetDefines(Opts, Builder);
715  Builder.defineMacro("_X86_");
716  Builder.defineMacro("__CYGWIN__");
717  Builder.defineMacro("__CYGWIN32__");
718  addCygMingDefines(Opts, Builder);
719  DefineStd(Builder, "unix", Opts);
720  if (Opts.CPlusPlus)
721  Builder.defineMacro("_GNU_SOURCE");
722  }
723 };
724 
725 // x86-32 Haiku target
726 class LLVM_LIBRARY_VISIBILITY HaikuX86_32TargetInfo
727  : public HaikuTargetInfo<X86_32TargetInfo> {
728 public:
729  HaikuX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
730  : HaikuTargetInfo<X86_32TargetInfo>(Triple, Opts) {}
731 
732  void getTargetDefines(const LangOptions &Opts,
733  MacroBuilder &Builder) const override {
735  Builder.defineMacro("__INTEL__");
736  }
737 };
738 
739 // X86-32 MCU target
740 class LLVM_LIBRARY_VISIBILITY MCUX86_32TargetInfo : public X86_32TargetInfo {
741 public:
742  MCUX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
743  : X86_32TargetInfo(Triple, Opts) {
744  LongDoubleWidth = 64;
745  LongDoubleFormat = &llvm::APFloat::IEEEdouble();
746  resetDataLayout("e-m:e-p:32:32-i64:32-f64:32-f128:32-n8:16:32-a:0:32-S32");
747  WIntType = UnsignedInt;
748  }
749 
751  // On MCU we support only C calling convention.
752  return CC == CC_C ? CCCR_OK : CCCR_Warning;
753  }
754 
755  void getTargetDefines(const LangOptions &Opts,
756  MacroBuilder &Builder) const override {
757  X86_32TargetInfo::getTargetDefines(Opts, Builder);
758  Builder.defineMacro("__iamcu");
759  Builder.defineMacro("__iamcu__");
760  }
761 
762  bool allowsLargerPreferedTypeAlignment() const override { return false; }
763 };
764 
765 // x86-32 RTEMS target
766 class LLVM_LIBRARY_VISIBILITY RTEMSX86_32TargetInfo : public X86_32TargetInfo {
767 public:
768  RTEMSX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
769  : X86_32TargetInfo(Triple, Opts) {
770  SizeType = UnsignedLong;
771  IntPtrType = SignedLong;
772  PtrDiffType = SignedLong;
773  }
774 
775  void getTargetDefines(const LangOptions &Opts,
776  MacroBuilder &Builder) const override {
777  X86_32TargetInfo::getTargetDefines(Opts, Builder);
778  Builder.defineMacro("__INTEL__");
779  Builder.defineMacro("__rtems__");
780  }
781 };
782 
783 // x86-64 generic target
784 class LLVM_LIBRARY_VISIBILITY X86_64TargetInfo : public X86TargetInfo {
785 public:
786  X86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
787  : X86TargetInfo(Triple, Opts) {
788  const bool IsX32 = getTriple().getEnvironment() == llvm::Triple::GNUX32;
789  bool IsWinCOFF =
790  getTriple().isOSWindows() && getTriple().isOSBinFormatCOFF();
791  LongWidth = LongAlign = PointerWidth = PointerAlign = IsX32 ? 32 : 64;
792  LongDoubleWidth = 128;
793  LongDoubleAlign = 128;
794  LargeArrayMinWidth = 128;
795  LargeArrayAlign = 128;
796  SuitableAlign = 128;
797  SizeType = IsX32 ? UnsignedInt : UnsignedLong;
798  PtrDiffType = IsX32 ? SignedInt : SignedLong;
799  IntPtrType = IsX32 ? SignedInt : SignedLong;
800  IntMaxType = IsX32 ? SignedLongLong : SignedLong;
801  Int64Type = IsX32 ? SignedLongLong : SignedLong;
802  RegParmMax = 6;
803 
804  // Pointers are 32-bit in x32.
805  resetDataLayout(IsX32
806  ? "e-m:e-p:32:32-i64:64-f80:128-n8:16:32:64-S128"
807  : IsWinCOFF ? "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
808  : "e-m:e-i64:64-f80:128-n8:16:32:64-S128");
809 
810  // Use fpret only for long double.
811  RealTypeUsesObjCFPRet = (1 << TargetInfo::LongDouble);
812 
813  // Use fp2ret for _Complex long double.
814  ComplexLongDoubleUsesFP2Ret = true;
815 
816  // Make __builtin_ms_va_list available.
817  HasBuiltinMSVaList = true;
818 
819  // x86-64 has atomics up to 16 bytes.
820  MaxAtomicPromoteWidth = 128;
821  MaxAtomicInlineWidth = 64;
822  }
823 
826  }
827 
828  int getEHDataRegisterNumber(unsigned RegNo) const override {
829  if (RegNo == 0)
830  return 0;
831  if (RegNo == 1)
832  return 1;
833  return -1;
834  }
835 
837  switch (CC) {
838  case CC_C:
839  case CC_Swift:
840  case CC_X86VectorCall:
841  case CC_IntelOclBicc:
842  case CC_Win64:
843  case CC_PreserveMost:
844  case CC_PreserveAll:
845  case CC_X86RegCall:
846  case CC_OpenCLKernel:
847  return CCCR_OK;
848  default:
849  return CCCR_Warning;
850  }
851  }
852 
854  return CC_C;
855  }
856 
857  // for x32 we need it here explicitly
858  bool hasInt128Type() const override { return true; }
859 
860  unsigned getUnwindWordWidth() const override { return 64; }
861 
862  unsigned getRegisterWidth() const override { return 64; }
863 
864  bool validateGlobalRegisterVariable(StringRef RegName, unsigned RegSize,
865  bool &HasSizeMismatch) const override {
866  // rsp and rbp are the only 64-bit registers the x86 backend can currently
867  // handle.
868  if (RegName.equals("rsp") || RegName.equals("rbp")) {
869  // Check that the register size is 64-bit.
870  HasSizeMismatch = RegSize != 64;
871  return true;
872  }
873 
874  // Check if the register is a 32-bit register the backend can handle.
875  return X86TargetInfo::validateGlobalRegisterVariable(RegName, RegSize,
876  HasSizeMismatch);
877  }
878 
879  void setMaxAtomicWidth() override {
880  if (hasFeature("cx16"))
881  MaxAtomicInlineWidth = 128;
882  }
883 
884  ArrayRef<Builtin::Info> getTargetBuiltins() const override;
885 };
886 
887 // x86-64 Windows target
888 class LLVM_LIBRARY_VISIBILITY WindowsX86_64TargetInfo
889  : public WindowsTargetInfo<X86_64TargetInfo> {
890 public:
891  WindowsX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
892  : WindowsTargetInfo<X86_64TargetInfo>(Triple, Opts) {
893  LongWidth = LongAlign = 32;
894  DoubleAlign = LongLongAlign = 64;
895  IntMaxType = SignedLongLong;
896  Int64Type = SignedLongLong;
897  SizeType = UnsignedLongLong;
898  PtrDiffType = SignedLongLong;
899  IntPtrType = SignedLongLong;
900  }
901 
902  void getTargetDefines(const LangOptions &Opts,
903  MacroBuilder &Builder) const override {
905  Builder.defineMacro("_WIN64");
906  }
907 
910  }
911 
913  switch (CC) {
914  case CC_X86StdCall:
915  case CC_X86ThisCall:
916  case CC_X86FastCall:
917  return CCCR_Ignore;
918  case CC_C:
919  case CC_X86VectorCall:
920  case CC_IntelOclBicc:
921  case CC_PreserveMost:
922  case CC_PreserveAll:
923  case CC_X86_64SysV:
924  case CC_Swift:
925  case CC_X86RegCall:
926  case CC_OpenCLKernel:
927  return CCCR_OK;
928  default:
929  return CCCR_Warning;
930  }
931  }
932 };
933 
934 // x86-64 Windows Visual Studio target
935 class LLVM_LIBRARY_VISIBILITY MicrosoftX86_64TargetInfo
936  : public WindowsX86_64TargetInfo {
937 public:
938  MicrosoftX86_64TargetInfo(const llvm::Triple &Triple,
939  const TargetOptions &Opts)
940  : WindowsX86_64TargetInfo(Triple, Opts) {
941  LongDoubleWidth = LongDoubleAlign = 64;
942  LongDoubleFormat = &llvm::APFloat::IEEEdouble();
943  }
944 
945  void getTargetDefines(const LangOptions &Opts,
946  MacroBuilder &Builder) const override {
949  Builder.defineMacro("_M_X64", "100");
950  Builder.defineMacro("_M_AMD64", "100");
951  }
952 };
953 
954 // x86-64 MinGW target
955 class LLVM_LIBRARY_VISIBILITY MinGWX86_64TargetInfo
956  : public WindowsX86_64TargetInfo {
957 public:
958  MinGWX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
959  : WindowsX86_64TargetInfo(Triple, Opts) {
960  // Mingw64 rounds long double size and alignment up to 16 bytes, but sticks
961  // with x86 FP ops. Weird.
962  LongDoubleWidth = LongDoubleAlign = 128;
963  LongDoubleFormat = &llvm::APFloat::x87DoubleExtended();
964  HasFloat128 = true;
965  }
966 
967  void getTargetDefines(const LangOptions &Opts,
968  MacroBuilder &Builder) const override {
970  DefineStd(Builder, "WIN64", Opts);
971  Builder.defineMacro("__MINGW64__");
972  addMinGWDefines(Opts, Builder);
973 
974  // GCC defines this macro when it is using __gxx_personality_seh0.
975  if (!Opts.SjLjExceptions)
976  Builder.defineMacro("__SEH__");
977  }
978 };
979 
980 // x86-64 Cygwin target
981 class LLVM_LIBRARY_VISIBILITY CygwinX86_64TargetInfo : public X86_64TargetInfo {
982 public:
983  CygwinX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
984  : X86_64TargetInfo(Triple, Opts) {
985  this->WCharType = TargetInfo::UnsignedShort;
986  TLSSupported = false;
987  }
988 
989  void getTargetDefines(const LangOptions &Opts,
990  MacroBuilder &Builder) const override {
991  X86_64TargetInfo::getTargetDefines(Opts, Builder);
992  Builder.defineMacro("__x86_64__");
993  Builder.defineMacro("__CYGWIN__");
994  Builder.defineMacro("__CYGWIN64__");
995  addCygMingDefines(Opts, Builder);
996  DefineStd(Builder, "unix", Opts);
997  if (Opts.CPlusPlus)
998  Builder.defineMacro("_GNU_SOURCE");
999 
1000  // GCC defines this macro when it is using __gxx_personality_seh0.
1001  if (!Opts.SjLjExceptions)
1002  Builder.defineMacro("__SEH__");
1003  }
1004 };
1005 
1006 class LLVM_LIBRARY_VISIBILITY DarwinX86_64TargetInfo
1007  : public DarwinTargetInfo<X86_64TargetInfo> {
1008 public:
1009  DarwinX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
1010  : DarwinTargetInfo<X86_64TargetInfo>(Triple, Opts) {
1011  Int64Type = SignedLongLong;
1012  // The 64-bit iOS simulator uses the builtin bool type for Objective-C.
1013  llvm::Triple T = llvm::Triple(Triple);
1014  if (T.isiOS())
1015  UseSignedCharForObjCBool = false;
1016  resetDataLayout("e-m:o-i64:64-f80:128-n8:16:32:64-S128");
1017  }
1018 
1019  bool handleTargetFeatures(std::vector<std::string> &Features,
1020  DiagnosticsEngine &Diags) override {
1022  Diags))
1023  return false;
1024  // We now know the features we have: we can decide how to align vectors.
1025  MaxVectorAlign =
1026  hasFeature("avx512f") ? 512 : hasFeature("avx") ? 256 : 128;
1027  return true;
1028  }
1029 };
1030 
1031 class LLVM_LIBRARY_VISIBILITY OpenBSDX86_64TargetInfo
1032  : public OpenBSDTargetInfo<X86_64TargetInfo> {
1033 public:
1034  OpenBSDX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
1035  : OpenBSDTargetInfo<X86_64TargetInfo>(Triple, Opts) {
1036  IntMaxType = SignedLongLong;
1037  Int64Type = SignedLongLong;
1038  }
1039 };
1040 
1041 // x86_32 Android target
1042 class LLVM_LIBRARY_VISIBILITY AndroidX86_32TargetInfo
1043  : public LinuxTargetInfo<X86_32TargetInfo> {
1044 public:
1045  AndroidX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
1046  : LinuxTargetInfo<X86_32TargetInfo>(Triple, Opts) {
1047  SuitableAlign = 32;
1048  LongDoubleWidth = 64;
1049  LongDoubleFormat = &llvm::APFloat::IEEEdouble();
1050  }
1051 };
1052 
1053 // x86_64 Android target
1054 class LLVM_LIBRARY_VISIBILITY AndroidX86_64TargetInfo
1055  : public LinuxTargetInfo<X86_64TargetInfo> {
1056 public:
1057  AndroidX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
1058  : LinuxTargetInfo<X86_64TargetInfo>(Triple, Opts) {
1059  LongDoubleFormat = &llvm::APFloat::IEEEquad();
1060  }
1061 
1062  bool useFloat128ManglingForLongDouble() const override { return true; }
1063 };
1064 } // namespace targets
1065 } // namespace clang
1066 #endif // LLVM_CLANG_LIB_BASIC_TARGETS_X86_H
const char * getClobbers() const override
Returns a string of target-specific clobbers, in LLVM format.
Definition: X86.h:395
void setMaxAtomicWidth() override
Set the maximum inline or promote width lock-free atomic operation for the given target.
Definition: X86.h:879
void DefineStd(MacroBuilder &Builder, StringRef MacroName, const LangOptions &Opts)
DefineStd - Define a macro name and standard variants.
Definition: Targets.cpp:53
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this parti...
Definition: X86.h:655
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this parti...
Definition: X86.h:672
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this parti...
Definition: X86.h:732
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override
Determines whether a given calling convention is valid for the target.
Definition: X86.h:836
static bool hasFeature(StringRef Feature, const LangOptions &LangOpts, const TargetInfo &Target)
Determine whether a translation unit built using the current language options has the given feature...
Definition: Module.cpp:63
bool isValidCPUName(StringRef Name) const override
brief Determine whether this TargetInfo supports the given CPU name.
Definition: X86.h:480
unsigned getUnwindWordWidth() const override
Definition: X86.h:860
__builtin_va_list as defined by the x86-64 ABI: http://refspecs.linuxbase.org/elf/x86_64-abi-0.21.pdf
Definition: TargetInfo.h:174
X86TargetInfo(const llvm::Triple &Triple, const TargetOptions &)
Definition: X86.h:350
Options for controlling the target.
Definition: TargetOptions.h:26
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this parti...
Definition: X86.h:989
virtual bool validateOperandSize(StringRef Constraint, unsigned Size) const
Definition: X86.cpp:1429
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this parti...
Definition: X86.h:775
bool validateGlobalRegisterVariable(StringRef RegName, unsigned RegSize, bool &HasSizeMismatch) const override
Validate register name used for global register variables.
Definition: X86.h:864
WindowsX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:891
AndroidX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:1045
int getEHDataRegisterNumber(unsigned RegNo) const override
Return the register number that __builtin_eh_return_regno would return with the specified argument...
Definition: X86.h:550
bool useFloat128ManglingForLongDouble() const override
Return true if the &#39;long double&#39; type should be mangled like __float128.
Definition: X86.h:1062
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:48
unsigned getFloatEvalMethod() const override
Return the value for the C99 FLT_EVAL_METHOD macro.
Definition: X86.h:588
MicrosoftX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:938
CygwinX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:983
X86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:786
DarwinX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:1009
CallingConv getDefaultCallingConv(CallingConvMethodType MT) const override
Gets the default calling convention for the given target and declaration context. ...
Definition: X86.h:853
StringRef getConstraintRegister(const StringRef &Constraint, const StringRef &Expression) const override
Definition: X86.h:399
MicrosoftX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:665
Concrete class used by the front-end to report problems and issues.
Definition: Diagnostic.h:147
unsigned getRegisterWidth() const override
Return the "preferred" register width on this target.
Definition: X86.h:862
bool validateGlobalRegisterVariable(StringRef RegName, unsigned RegSize, bool &HasSizeMismatch) const override
Validate register name used for global register variables.
Definition: X86.h:375
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override
Determines whether a given calling convention is valid for the target.
Definition: X86.h:912
bool allowsLargerPreferedTypeAlignment() const override
Whether target allows to overalign ABI-specified preferred alignment.
Definition: X86.h:762
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this parti...
Definition: X86.h:712
Exposes information about the current target.
Definition: TargetInfo.h:55
AndroidX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:1057
const FunctionProtoType * T
void getVisualStudioDefines(const LangOptions &Opts, MacroBuilder &Builder) const
Definition: OSTargets.h:576
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
Definition: OSTargets.h:32
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
Definition: X86.h:546
CallingConv
CallingConv - Specifies the calling convention that a function uses.
Definition: Specifiers.h:233
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override
Determines whether a given calling convention is valid for the target.
Definition: X86.h:750
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override
Determines whether a given calling convention is valid for the target.
Definition: X86.h:490
HaikuX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:729
ArrayRef< TargetInfo::GCCRegAlias > getGCCRegAliases() const override
Definition: X86.h:362
bool setCPU(const std::string &Name) override
Target the specified CPU.
Definition: X86.h:484
Kind
StringRef getABI() const override
Get the ABI currently in use.
Definition: X86.h:469
void addCygMingDefines(const LangOptions &Opts, MacroBuilder &Builder)
Definition: Targets.cpp:76
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this parti...
Definition: X86.h:755
NetBSDI386TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:585
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this parti...
Definition: X86.h:902
Defines the clang::TargetOptions class.
CallingConv getDefaultCallingConv(CallingConvMethodType MT) const override
Gets the default calling convention for the given target and declaration context. ...
Definition: X86.h:509
RTEMSX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:768
OpenBSDI386TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:602
Dataflow Directional Tag Classes.
typedef char* __builtin_va_list;
Definition: TargetInfo.h:154
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
Definition: X86.h:908
void addMinGWDefines(const LangOptions &Opts, MacroBuilder &Builder)
Definition: Targets.cpp:100
bool validateOperandSize(StringRef Constraint, unsigned Size) const override
Definition: X86.h:558
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
Definition: X86.h:824
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this parti...
Definition: X86.cpp:757
int getEHDataRegisterNumber(unsigned RegNo) const override
Return the register number that __builtin_eh_return_regno would return with the specified argument...
Definition: X86.h:828
bool handleTargetFeatures(std::vector< std::string > &Features, DiagnosticsEngine &Diags) override
handleTargetFeatures - Perform initialization based on the user configured set of features...
Definition: X86.h:1019
bool hasSjLjLowering() const override
Controls if __builtin_longjmp / __builtin_setjmp can be lowered to llvm.eh.sjlj.longjmp / llvm...
Definition: X86.h:513
unsigned getFloatEvalMethod() const override
Return the value for the C99 FLT_EVAL_METHOD macro.
Definition: X86.h:355
MCUX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:742
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
Definition: TargetInfo.h:152
WindowsX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:645
bool hasInt128Type() const override
Determine whether the __int128 type is supported on this target.
Definition: X86.h:858
void setSupportedOpenCLOpts() override
Set supported OpenCL extensions and optional core features.
Definition: X86.h:515
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this parti...
Definition: X86.h:967
MinGWX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:958
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this parti...
Definition: X86.h:692
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this parti...
Definition: X86.h:945
Defines the clang::TargetInfo interface.
void setFeatureEnabled(llvm::StringMap< bool > &Features, StringRef Name, bool Enabled) const override
Enable or disable a specific target feature; the feature name must be valid.
Definition: X86.h:447
bool handleTargetFeatures(std::vector< std::string > &Features, DiagnosticsEngine &Diags) override
handleTargetFeatures - Perform initialization based on the user configured set of features...
Definition: X86.h:629
CygwinX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:705
OpenBSDX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:1034
void defineMacro(const Twine &Name, const Twine &Value="1")
Append a #define line for macro of the form "\#define Name Value\n".
Definition: MacroBuilder.h:30
MinGWX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:687
X86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:523
DarwinI386TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: X86.h:613