clang  3.8.0
Basic/TargetInfo.cpp
Go to the documentation of this file.
1 //===--- TargetInfo.cpp - Information about Target machine ----------------===//
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 implements the TargetInfo and TargetInfoImpl interfaces.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "clang/Basic/TargetInfo.h"
16 #include "clang/Basic/CharInfo.h"
18 #include "llvm/ADT/APFloat.h"
19 #include "llvm/ADT/STLExtras.h"
20 #include "llvm/Support/ErrorHandling.h"
21 #include <cstdlib>
22 using namespace clang;
23 
24 static const LangAS::Map DefaultAddrSpaceMap = { 0 };
25 
26 // TargetInfo Constructor.
27 TargetInfo::TargetInfo(const llvm::Triple &T) : TargetOpts(), Triple(T) {
28  // Set defaults. Defaults are set for a 32-bit RISC platform, like PPC or
29  // SPARC. These should be overridden by concrete targets as needed.
30  BigEndian = true;
31  TLSSupported = true;
32  NoAsmVariants = false;
34  BoolWidth = BoolAlign = 8;
35  IntWidth = IntAlign = 32;
36  LongWidth = LongAlign = 32;
38  SuitableAlign = 64;
40  MinGlobalAlign = 0;
41  HalfWidth = 16;
42  HalfAlign = 16;
43  FloatWidth = 32;
44  FloatAlign = 32;
45  DoubleWidth = 64;
46  DoubleAlign = 64;
47  LongDoubleWidth = 64;
48  LongDoubleAlign = 64;
50  LargeArrayAlign = 0;
52  MaxVectorAlign = 0;
53  MaxTLSAlign = 0;
54  SimdDefaultAlign = 0;
70  HalfFormat = &llvm::APFloat::IEEEhalf;
71  FloatFormat = &llvm::APFloat::IEEEsingle;
72  DoubleFormat = &llvm::APFloat::IEEEdouble;
73  LongDoubleFormat = &llvm::APFloat::IEEEdouble;
74  DataLayoutString = nullptr;
75  UserLabelPrefix = "_";
76  MCountName = "mcount";
77  RegParmMax = 0;
78  SSERegParmMax = 0;
79  HasAlignMac68kSupport = false;
80  HasBuiltinMSVaList = false;
81 
82  // Default to no types using fpret.
84 
85  // Default to not using fp2ret for __Complex long double
87 
88  // Set the C++ ABI based on the triple.
89  TheCXXABI.set(Triple.isKnownWindowsMSVCEnvironment()
92 
93  // Default to an empty address space map.
96 
97  // Default to an unknown platform name.
98  PlatformName = "unknown";
100 }
101 
102 // Out of line virtual dtor for TargetInfo.
104 
105 /// getTypeName - Return the user string for the specified integer type enum.
106 /// For example, SignedShort -> "short".
108  switch (T) {
109  default: llvm_unreachable("not an integer!");
110  case SignedChar: return "signed char";
111  case UnsignedChar: return "unsigned char";
112  case SignedShort: return "short";
113  case UnsignedShort: return "unsigned short";
114  case SignedInt: return "int";
115  case UnsignedInt: return "unsigned int";
116  case SignedLong: return "long int";
117  case UnsignedLong: return "long unsigned int";
118  case SignedLongLong: return "long long int";
119  case UnsignedLongLong: return "long long unsigned int";
120  }
121 }
122 
123 /// getTypeConstantSuffix - Return the constant suffix for the specified
124 /// integer type enum. For example, SignedLong -> "L".
126  switch (T) {
127  default: llvm_unreachable("not an integer!");
128  case SignedChar:
129  case SignedShort:
130  case SignedInt: return "";
131  case SignedLong: return "L";
132  case SignedLongLong: return "LL";
133  case UnsignedChar:
134  if (getCharWidth() < getIntWidth())
135  return "";
136  case UnsignedShort:
137  if (getShortWidth() < getIntWidth())
138  return "";
139  case UnsignedInt: return "U";
140  case UnsignedLong: return "UL";
141  case UnsignedLongLong: return "ULL";
142  }
143 }
144 
145 /// getTypeFormatModifier - Return the printf format modifier for the
146 /// specified integer type enum. For example, SignedLong -> "l".
147 
149  switch (T) {
150  default: llvm_unreachable("not an integer!");
151  case SignedChar:
152  case UnsignedChar: return "hh";
153  case SignedShort:
154  case UnsignedShort: return "h";
155  case SignedInt:
156  case UnsignedInt: return "";
157  case SignedLong:
158  case UnsignedLong: return "l";
159  case SignedLongLong:
160  case UnsignedLongLong: return "ll";
161  }
162 }
163 
164 /// getTypeWidth - Return the width (in bits) of the specified integer type
165 /// enum. For example, SignedInt -> getIntWidth().
167  switch (T) {
168  default: llvm_unreachable("not an integer!");
169  case SignedChar:
170  case UnsignedChar: return getCharWidth();
171  case SignedShort:
172  case UnsignedShort: return getShortWidth();
173  case SignedInt:
174  case UnsignedInt: return getIntWidth();
175  case SignedLong:
176  case UnsignedLong: return getLongWidth();
177  case SignedLongLong:
178  case UnsignedLongLong: return getLongLongWidth();
179  };
180 }
181 
183  unsigned BitWidth, bool IsSigned) const {
184  if (getCharWidth() == BitWidth)
185  return IsSigned ? SignedChar : UnsignedChar;
186  if (getShortWidth() == BitWidth)
187  return IsSigned ? SignedShort : UnsignedShort;
188  if (getIntWidth() == BitWidth)
189  return IsSigned ? SignedInt : UnsignedInt;
190  if (getLongWidth() == BitWidth)
191  return IsSigned ? SignedLong : UnsignedLong;
192  if (getLongLongWidth() == BitWidth)
193  return IsSigned ? SignedLongLong : UnsignedLongLong;
194  return NoInt;
195 }
196 
198  bool IsSigned) const {
199  if (getCharWidth() >= BitWidth)
200  return IsSigned ? SignedChar : UnsignedChar;
201  if (getShortWidth() >= BitWidth)
202  return IsSigned ? SignedShort : UnsignedShort;
203  if (getIntWidth() >= BitWidth)
204  return IsSigned ? SignedInt : UnsignedInt;
205  if (getLongWidth() >= BitWidth)
206  return IsSigned ? SignedLong : UnsignedLong;
207  if (getLongLongWidth() >= BitWidth)
208  return IsSigned ? SignedLongLong : UnsignedLongLong;
209  return NoInt;
210 }
211 
213  if (getFloatWidth() == BitWidth)
214  return Float;
215  if (getDoubleWidth() == BitWidth)
216  return Double;
217 
218  switch (BitWidth) {
219  case 96:
220  if (&getLongDoubleFormat() == &llvm::APFloat::x87DoubleExtended)
221  return LongDouble;
222  break;
223  case 128:
224  if (&getLongDoubleFormat() == &llvm::APFloat::PPCDoubleDouble ||
225  &getLongDoubleFormat() == &llvm::APFloat::IEEEquad)
226  return LongDouble;
227  break;
228  }
229 
230  return NoFloat;
231 }
232 
233 /// getTypeAlign - Return the alignment (in bits) of the specified integer type
234 /// enum. For example, SignedInt -> getIntAlign().
236  switch (T) {
237  default: llvm_unreachable("not an integer!");
238  case SignedChar:
239  case UnsignedChar: return getCharAlign();
240  case SignedShort:
241  case UnsignedShort: return getShortAlign();
242  case SignedInt:
243  case UnsignedInt: return getIntAlign();
244  case SignedLong:
245  case UnsignedLong: return getLongAlign();
246  case SignedLongLong:
247  case UnsignedLongLong: return getLongLongAlign();
248  };
249 }
250 
251 /// isTypeSigned - Return whether an integer types is signed. Returns true if
252 /// the type is signed; false otherwise.
254  switch (T) {
255  default: llvm_unreachable("not an integer!");
256  case SignedChar:
257  case SignedShort:
258  case SignedInt:
259  case SignedLong:
260  case SignedLongLong:
261  return true;
262  case UnsignedChar:
263  case UnsignedShort:
264  case UnsignedInt:
265  case UnsignedLong:
266  case UnsignedLongLong:
267  return false;
268  };
269 }
270 
271 /// adjust - Set forced language options.
272 /// Apply changes to the target information with respect to certain
273 /// language options which change the target configuration.
274 void TargetInfo::adjust(const LangOptions &Opts) {
275  if (Opts.NoBitFieldTypeAlign)
276  UseBitFieldTypeAlignment = false;
277  if (Opts.ShortWChar)
279 
280  if (Opts.OpenCL) {
281  // OpenCL C requires specific widths for types, irrespective of
282  // what these normally are for the target.
283  // We also define long long and long double here, although the
284  // OpenCL standard only mentions these as "reserved".
285  IntWidth = IntAlign = 32;
286  LongWidth = LongAlign = 64;
288  HalfWidth = HalfAlign = 16;
289  FloatWidth = FloatAlign = 32;
290 
291  // Embedded 32-bit targets (OpenCL EP) might have double C type
292  // defined as float. Let's not override this as it might lead
293  // to generating illegal code that uses 64bit doubles.
294  if (DoubleWidth != FloatWidth) {
295  DoubleWidth = DoubleAlign = 64;
296  DoubleFormat = &llvm::APFloat::IEEEdouble;
297  }
299 
300  assert(PointerWidth == 32 || PointerWidth == 64);
301  bool Is32BitArch = PointerWidth == 32;
302  SizeType = Is32BitArch ? UnsignedInt : UnsignedLong;
303  PtrDiffType = Is32BitArch ? SignedInt : SignedLong;
304  IntPtrType = Is32BitArch ? SignedInt : SignedLong;
305 
308 
309  HalfFormat = &llvm::APFloat::IEEEhalf;
310  FloatFormat = &llvm::APFloat::IEEEsingle;
311  LongDoubleFormat = &llvm::APFloat::IEEEquad;
312  }
313 }
314 
316  llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU,
317  const std::vector<std::string> &FeatureVec) const {
318  for (const auto &F : FeatureVec) {
319  StringRef Name = F;
320  // Apply the feature via the target.
321  bool Enabled = Name[0] == '+';
322  setFeatureEnabled(Features, Name.substr(1), Enabled);
323  }
324  return true;
325 }
326 
327 //===----------------------------------------------------------------------===//
328 
329 
330 static StringRef removeGCCRegisterPrefix(StringRef Name) {
331  if (Name[0] == '%' || Name[0] == '#')
332  Name = Name.substr(1);
333 
334  return Name;
335 }
336 
337 /// isValidClobber - Returns whether the passed in string is
338 /// a valid clobber in an inline asm statement. This is used by
339 /// Sema.
340 bool TargetInfo::isValidClobber(StringRef Name) const {
341  return (isValidGCCRegisterName(Name) ||
342  Name == "memory" || Name == "cc");
343 }
344 
345 /// isValidGCCRegisterName - Returns whether the passed in string
346 /// is a valid register name according to GCC. This is used by Sema for
347 /// inline asm statements.
349  if (Name.empty())
350  return false;
351 
352  // Get rid of any register prefix.
353  Name = removeGCCRegisterPrefix(Name);
354  if (Name.empty())
355  return false;
356 
358 
359  // If we have a number it maps to an entry in the register name array.
360  if (isDigit(Name[0])) {
361  unsigned n;
362  if (!Name.getAsInteger(0, n))
363  return n < Names.size();
364  }
365 
366  // Check register names.
367  if (std::find(Names.begin(), Names.end(), Name) != Names.end())
368  return true;
369 
370  // Check any additional names that we have.
371  for (const AddlRegName &ARN : getGCCAddlRegNames())
372  for (const char *AN : ARN.Names) {
373  if (!AN)
374  break;
375  // Make sure the register that the additional name is for is within
376  // the bounds of the register names from above.
377  if (AN == Name && ARN.RegNum < Names.size())
378  return true;
379  }
380 
381  // Now check aliases.
382  for (const GCCRegAlias &GRA : getGCCRegAliases())
383  for (const char *A : GRA.Aliases) {
384  if (!A)
385  break;
386  if (A == Name)
387  return true;
388  }
389 
390  return false;
391 }
392 
393 StringRef
395  assert(isValidGCCRegisterName(Name) && "Invalid register passed in");
396 
397  // Get rid of any register prefix.
398  Name = removeGCCRegisterPrefix(Name);
399 
401 
402  // First, check if we have a number.
403  if (isDigit(Name[0])) {
404  unsigned n;
405  if (!Name.getAsInteger(0, n)) {
406  assert(n < Names.size() && "Out of bounds register number!");
407  return Names[n];
408  }
409  }
410 
411  // Check any additional names that we have.
412  for (const AddlRegName &ARN : getGCCAddlRegNames())
413  for (const char *AN : ARN.Names) {
414  if (!AN)
415  break;
416  // Make sure the register that the additional name is for is within
417  // the bounds of the register names from above.
418  if (AN == Name && ARN.RegNum < Names.size())
419  return Name;
420  }
421 
422  // Now check aliases.
423  for (const GCCRegAlias &RA : getGCCRegAliases())
424  for (const char *A : RA.Aliases) {
425  if (!A)
426  break;
427  if (A == Name)
428  return RA.Register;
429  }
430 
431  return Name;
432 }
433 
435  const char *Name = Info.getConstraintStr().c_str();
436  // An output constraint must start with '=' or '+'
437  if (*Name != '=' && *Name != '+')
438  return false;
439 
440  if (*Name == '+')
441  Info.setIsReadWrite();
442 
443  Name++;
444  while (*Name) {
445  switch (*Name) {
446  default:
447  if (!validateAsmConstraint(Name, Info)) {
448  // FIXME: We temporarily return false
449  // so we can add more constraints as we hit it.
450  // Eventually, an unknown constraint should just be treated as 'g'.
451  return false;
452  }
453  break;
454  case '&': // early clobber.
455  Info.setEarlyClobber();
456  break;
457  case '%': // commutative.
458  // FIXME: Check that there is a another register after this one.
459  break;
460  case 'r': // general register.
461  Info.setAllowsRegister();
462  break;
463  case 'm': // memory operand.
464  case 'o': // offsetable memory operand.
465  case 'V': // non-offsetable memory operand.
466  case '<': // autodecrement memory operand.
467  case '>': // autoincrement memory operand.
468  Info.setAllowsMemory();
469  break;
470  case 'g': // general register, memory operand or immediate integer.
471  case 'X': // any operand.
472  Info.setAllowsRegister();
473  Info.setAllowsMemory();
474  break;
475  case ',': // multiple alternative constraint. Pass it.
476  // Handle additional optional '=' or '+' modifiers.
477  if (Name[1] == '=' || Name[1] == '+')
478  Name++;
479  break;
480  case '#': // Ignore as constraint.
481  while (Name[1] && Name[1] != ',')
482  Name++;
483  break;
484  case '?': // Disparage slightly code.
485  case '!': // Disparage severely.
486  case '*': // Ignore for choosing register preferences.
487  break; // Pass them.
488  }
489 
490  Name++;
491  }
492 
493  // Early clobber with a read-write constraint which doesn't permit registers
494  // is invalid.
495  if (Info.earlyClobber() && Info.isReadWrite() && !Info.allowsRegister())
496  return false;
497 
498  // If a constraint allows neither memory nor register operands it contains
499  // only modifiers. Reject it.
500  return Info.allowsMemory() || Info.allowsRegister();
501 }
502 
504  ArrayRef<ConstraintInfo> OutputConstraints,
505  unsigned &Index) const {
506  assert(*Name == '[' && "Symbolic name did not start with '['");
507  Name++;
508  const char *Start = Name;
509  while (*Name && *Name != ']')
510  Name++;
511 
512  if (!*Name) {
513  // Missing ']'
514  return false;
515  }
516 
517  std::string SymbolicName(Start, Name - Start);
518 
519  for (Index = 0; Index != OutputConstraints.size(); ++Index)
520  if (SymbolicName == OutputConstraints[Index].getName())
521  return true;
522 
523  return false;
524 }
525 
527  MutableArrayRef<ConstraintInfo> OutputConstraints,
528  ConstraintInfo &Info) const {
529  const char *Name = Info.ConstraintStr.c_str();
530 
531  if (!*Name)
532  return false;
533 
534  while (*Name) {
535  switch (*Name) {
536  default:
537  // Check if we have a matching constraint
538  if (*Name >= '0' && *Name <= '9') {
539  const char *DigitStart = Name;
540  while (Name[1] >= '0' && Name[1] <= '9')
541  Name++;
542  const char *DigitEnd = Name;
543  unsigned i;
544  if (StringRef(DigitStart, DigitEnd - DigitStart + 1)
545  .getAsInteger(10, i))
546  return false;
547 
548  // Check if matching constraint is out of bounds.
549  if (i >= OutputConstraints.size()) return false;
550 
551  // A number must refer to an output only operand.
552  if (OutputConstraints[i].isReadWrite())
553  return false;
554 
555  // If the constraint is already tied, it must be tied to the
556  // same operand referenced to by the number.
557  if (Info.hasTiedOperand() && Info.getTiedOperand() != i)
558  return false;
559 
560  // The constraint should have the same info as the respective
561  // output constraint.
562  Info.setTiedOperand(i, OutputConstraints[i]);
563  } else if (!validateAsmConstraint(Name, Info)) {
564  // FIXME: This error return is in place temporarily so we can
565  // add more constraints as we hit it. Eventually, an unknown
566  // constraint should just be treated as 'g'.
567  return false;
568  }
569  break;
570  case '[': {
571  unsigned Index = 0;
572  if (!resolveSymbolicName(Name, OutputConstraints, Index))
573  return false;
574 
575  // If the constraint is already tied, it must be tied to the
576  // same operand referenced to by the number.
577  if (Info.hasTiedOperand() && Info.getTiedOperand() != Index)
578  return false;
579 
580  // A number must refer to an output only operand.
581  if (OutputConstraints[Index].isReadWrite())
582  return false;
583 
584  Info.setTiedOperand(Index, OutputConstraints[Index]);
585  break;
586  }
587  case '%': // commutative
588  // FIXME: Fail if % is used with the last operand.
589  break;
590  case 'i': // immediate integer.
591  case 'n': // immediate integer with a known value.
592  break;
593  case 'I': // Various constant constraints with target-specific meanings.
594  case 'J':
595  case 'K':
596  case 'L':
597  case 'M':
598  case 'N':
599  case 'O':
600  case 'P':
601  if (!validateAsmConstraint(Name, Info))
602  return false;
603  break;
604  case 'r': // general register.
605  Info.setAllowsRegister();
606  break;
607  case 'm': // memory operand.
608  case 'o': // offsettable memory operand.
609  case 'V': // non-offsettable memory operand.
610  case '<': // autodecrement memory operand.
611  case '>': // autoincrement memory operand.
612  Info.setAllowsMemory();
613  break;
614  case 'g': // general register, memory operand or immediate integer.
615  case 'X': // any operand.
616  Info.setAllowsRegister();
617  Info.setAllowsMemory();
618  break;
619  case 'E': // immediate floating point.
620  case 'F': // immediate floating point.
621  case 'p': // address operand.
622  break;
623  case ',': // multiple alternative constraint. Ignore comma.
624  break;
625  case '#': // Ignore as constraint.
626  while (Name[1] && Name[1] != ',')
627  Name++;
628  break;
629  case '?': // Disparage slightly code.
630  case '!': // Disparage severely.
631  case '*': // Ignore for choosing register preferences.
632  break; // Pass them.
633  }
634 
635  Name++;
636  }
637 
638  return true;
639 }
RealType getRealTypeByWidth(unsigned BitWidth) const
Return floating point type with specified width.
static LLVM_READONLY bool isDigit(unsigned char c)
Return true if this character is an ASCII digit: [0-9].
Definition: CharInfo.h:94
Represents a version number in the form major[.minor[.subminor[.build]]].
Definition: VersionTuple.h:26
virtual bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &info) const =0
const llvm::fltSemantics * DoubleFormat
bool validateOutputConstraint(ConstraintInfo &Info) const
virtual ArrayRef< AddlRegName > getGCCAddlRegNames() const
bool validateInputConstraint(MutableArrayRef< ConstraintInfo > OutputConstraints, ConstraintInfo &info) const
TargetInfo(const llvm::Triple &T)
unsigned ZeroLengthBitfieldBoundary
If non-zero, specifies a fixed alignment value for bitfields that follow zero length bitfield...
virtual void adjust(const LangOptions &Opts)
Set forced language options.
unsigned getFloatWidth() const
getFloatWidth/Align/Format - Return the size/align/format of 'float'.
class LLVM_ALIGNAS(8) DependentTemplateSpecializationType const IdentifierInfo * Name
Represents a template specialization type whose template cannot be resolved, e.g. ...
Definition: Type.h:4381
unsigned getDoubleWidth() const
getDoubleWidth/Align/Format - Return the size/align/format of 'double'.
const char * getTypeConstantSuffix(IntType T) const
Return the constant suffix for the specified integer type enum.
virtual bool initFeatureMap(llvm::StringMap< bool > &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector< std::string > &FeatureVec) const
Initialize the map with the default set of target features for the CPU this should include all legal ...
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:48
static bool isTypeSigned(IntType T)
Returns true if the type is signed; false otherwise.
bool resolveSymbolicName(const char *&Name, ArrayRef< ConstraintInfo > OutputConstraints, unsigned &Index) const
unsigned char DefaultAlignForAttributeAligned
The Microsoft ABI is the ABI used by Microsoft Visual Studio (and compatible compilers).
Definition: TargetCXXABI.h:114
bool isValidGCCRegisterName(StringRef Name) const
Returns whether the passed in string is a valid register name according to GCC.
Concrete class used by the front-end to report problems and issues.
Definition: Diagnostic.h:135
static const LangAS::Map DefaultAddrSpaceMap
Provides definitions for the various language-specific address spaces.
unsigned getTypeWidth(IntType T) const
Return the width (in bits) of the specified integer type enum.
Defines the clang::LangOptions interface.
bool isValidClobber(StringRef Name) const
Returns whether the passed in string is a valid clobber in an inline asm statement.
static StringRef removeGCCRegisterPrefix(StringRef Name)
static const char * getTypeName(IntType T)
Return the user string for the specified integer type enum.
unsigned getTypeAlign(IntType T) const
Return the alignment (in bits) of the specified integer type enum.
const LangAS::Map * AddrSpaceMap
virtual void setFeatureEnabled(llvm::StringMap< bool > &Features, StringRef Name, bool Enabled) const
Enable or disable a specific target feature; the feature name must be valid.
The generic Itanium ABI is the standard ABI of most open-source and Unix-like platforms.
Definition: TargetCXXABI.h:35
virtual ArrayRef< GCCRegAlias > getGCCRegAliases() const =0
virtual IntType getIntTypeByWidth(unsigned BitWidth, bool IsSigned) const
Return integer type with specified width.
unsigned UseZeroLengthBitfieldAlignment
Whether zero length bitfields (e.g., int : 0;) force alignment of the next bitfield.
void set(Kind kind)
Definition: TargetCXXABI.h:129
IntType
===-— Target Data Type Query Methods ----------------------------—===//
const llvm::fltSemantics & getLongDoubleFormat() const
static const char * getTypeFormatModifier(IntType T)
Return the printf format modifier for the specified integer type enum.
bool hasTiedOperand() const
Return true if this input operand is a matching constraint that ties it to an output operand...
unsigned getShortWidth() const
Return the size of 'signed short' and 'unsigned short' for this target, in bits.
virtual IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const
Return the smallest integer type with at least the specified width.
unsigned UseSignedCharForObjCBool
Whether Objective-C's built-in boolean type should be signed char.
unsigned Map[Count]
The type of a lookup table which maps from language-specific address spaces to target-specific ones...
Definition: AddressSpaces.h:45
const llvm::fltSemantics * FloatFormat
const llvm::fltSemantics * HalfFormat
unsigned getIntWidth() const
getIntWidth/Align - Return the size of 'signed int' and 'unsigned int' for this target, in bits.
unsigned getLongLongWidth() const
getLongLongWidth/Align - Return the size of 'signed long long' and 'unsigned long long' for this targ...
StringRef getNormalizedGCCRegisterName(StringRef Name) const
Returns the "normalized" GCC register name.
unsigned getLongWidth() const
getLongWidth/Align - Return the size of 'signed long' and 'unsigned long' for this target...
Defines the clang::TargetInfo interface.
const llvm::fltSemantics * LongDoubleFormat
void setTiedOperand(unsigned N, ConstraintInfo &Output)
Indicate that this is an input operand that is tied to the specified output operand.
unsigned UseBitFieldTypeAlignment
Control whether the alignment of bit-field types is respected when laying out structures.
unsigned getShortAlign() const
Return the alignment of 'signed short' and 'unsigned short' for this target.
virtual ArrayRef< const char * > getGCCRegNames() const =0
bool UseAddrSpaceMapMangling
Specify if mangling based on address space map should be used or not for language specific address sp...