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" 15 #include "clang/AST/Type.h" 16 #include "clang/Basic/AddressSpaces.h" 17 #include "clang/Basic/CharInfo.h" 18 #include "clang/Basic/LangOptions.h" 19 #include "llvm/ADT/APFloat.h" 20 #include "llvm/ADT/STLExtras.h" 21 #include "llvm/Support/ErrorHandling.h" 22 #include "llvm/Support/TargetParser.h" 23 #include <cstdlib> 24 using namespace clang; 25 26 static const LangASMap DefaultAddrSpaceMap = {0}; 27 28 // TargetInfo Constructor. 29 TargetInfo::TargetInfo(const llvm::Triple &T) : TargetOpts(), Triple(T) { 30 // Set defaults. Defaults are set for a 32-bit RISC platform, like PPC or 31 // SPARC. These should be overridden by concrete targets as needed. 32 BigEndian = !T.isLittleEndian(); 33 TLSSupported = true; 34 VLASupported = true; 35 NoAsmVariants = false; 36 HasFloat128 = false; 37 PointerWidth = PointerAlign = 32; 38 BoolWidth = BoolAlign = 8; 39 IntWidth = IntAlign = 32; 40 LongWidth = LongAlign = 32; 41 LongLongWidth = LongLongAlign = 64; 42 SuitableAlign = 64; 43 DefaultAlignForAttributeAligned = 128; 44 MinGlobalAlign = 0; 45 // From the glibc documentation, on GNU systems, malloc guarantees 16-byte 46 // alignment on 64-bit systems and 8-byte alignment on 32-bit systems. See 47 // https://www.gnu.org/software/libc/manual/html_node/Malloc-Examples.html 48 if (T.isGNUEnvironment() || T.isWindowsMSVCEnvironment()) 49 NewAlign = Triple.isArch64Bit() ? 128 : Triple.isArch32Bit() ? 64 : 0; 50 else 51 NewAlign = 0; // Infer from basic type alignment. 52 HalfWidth = 16; 53 HalfAlign = 16; 54 FloatWidth = 32; 55 FloatAlign = 32; 56 DoubleWidth = 64; 57 DoubleAlign = 64; 58 LongDoubleWidth = 64; 59 LongDoubleAlign = 64; 60 Float128Align = 128; 61 LargeArrayMinWidth = 0; 62 LargeArrayAlign = 0; 63 MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 0; 64 MaxVectorAlign = 0; 65 MaxTLSAlign = 0; 66 SimdDefaultAlign = 0; 67 SizeType = UnsignedLong; 68 PtrDiffType = SignedLong; 69 IntMaxType = SignedLongLong; 70 IntPtrType = SignedLong; 71 WCharType = SignedInt; 72 WIntType = SignedInt; 73 Char16Type = UnsignedShort; 74 Char32Type = UnsignedInt; 75 Int64Type = SignedLongLong; 76 SigAtomicType = SignedInt; 77 ProcessIDType = SignedInt; 78 UseSignedCharForObjCBool = true; 79 UseBitFieldTypeAlignment = true; 80 UseZeroLengthBitfieldAlignment = false; 81 UseExplicitBitFieldAlignment = true; 82 ZeroLengthBitfieldBoundary = 0; 83 HalfFormat = &llvm::APFloat::IEEEhalf(); 84 FloatFormat = &llvm::APFloat::IEEEsingle(); 85 DoubleFormat = &llvm::APFloat::IEEEdouble(); 86 LongDoubleFormat = &llvm::APFloat::IEEEdouble(); 87 Float128Format = &llvm::APFloat::IEEEquad(); 88 MCountName = "mcount"; 89 RegParmMax = 0; 90 SSERegParmMax = 0; 91 HasAlignMac68kSupport = false; 92 HasBuiltinMSVaList = false; 93 IsRenderScriptTarget = false; 94 95 // Default to no types using fpret. 96 RealTypeUsesObjCFPRet = 0; 97 98 // Default to not using fp2ret for __Complex long double 99 ComplexLongDoubleUsesFP2Ret = false; 100 101 // Set the C++ ABI based on the triple. 102 TheCXXABI.set(Triple.isKnownWindowsMSVCEnvironment() 103 ? TargetCXXABI::Microsoft 104 : TargetCXXABI::GenericItanium); 105 106 // Default to an empty address space map. 107 AddrSpaceMap = &DefaultAddrSpaceMap; 108 UseAddrSpaceMapMangling = false; 109 110 // Default to an unknown platform name. 111 PlatformName = "unknown"; 112 PlatformMinVersion = VersionTuple(); 113 } 114 115 // Out of line virtual dtor for TargetInfo. 116 TargetInfo::~TargetInfo() {} 117 118 /// getTypeName - Return the user string for the specified integer type enum. 119 /// For example, SignedShort -> "short". 120 const char *TargetInfo::getTypeName(IntType T) { 121 switch (T) { 122 default: llvm_unreachable("not an integer!"); 123 case SignedChar: return "signed char"; 124 case UnsignedChar: return "unsigned char"; 125 case SignedShort: return "short"; 126 case UnsignedShort: return "unsigned short"; 127 case SignedInt: return "int"; 128 case UnsignedInt: return "unsigned int"; 129 case SignedLong: return "long int"; 130 case UnsignedLong: return "long unsigned int"; 131 case SignedLongLong: return "long long int"; 132 case UnsignedLongLong: return "long long unsigned int"; 133 } 134 } 135 136 /// getTypeConstantSuffix - Return the constant suffix for the specified 137 /// integer type enum. For example, SignedLong -> "L". 138 const char *TargetInfo::getTypeConstantSuffix(IntType T) const { 139 switch (T) { 140 default: llvm_unreachable("not an integer!"); 141 case SignedChar: 142 case SignedShort: 143 case SignedInt: return ""; 144 case SignedLong: return "L"; 145 case SignedLongLong: return "LL"; 146 case UnsignedChar: 147 if (getCharWidth() < getIntWidth()) 148 return ""; 149 LLVM_FALLTHROUGH; 150 case UnsignedShort: 151 if (getShortWidth() < getIntWidth()) 152 return ""; 153 LLVM_FALLTHROUGH; 154 case UnsignedInt: return "U"; 155 case UnsignedLong: return "UL"; 156 case UnsignedLongLong: return "ULL"; 157 } 158 } 159 160 /// getTypeFormatModifier - Return the printf format modifier for the 161 /// specified integer type enum. For example, SignedLong -> "l". 162 163 const char *TargetInfo::getTypeFormatModifier(IntType T) { 164 switch (T) { 165 default: llvm_unreachable("not an integer!"); 166 case SignedChar: 167 case UnsignedChar: return "hh"; 168 case SignedShort: 169 case UnsignedShort: return "h"; 170 case SignedInt: 171 case UnsignedInt: return ""; 172 case SignedLong: 173 case UnsignedLong: return "l"; 174 case SignedLongLong: 175 case UnsignedLongLong: return "ll"; 176 } 177 } 178 179 /// getTypeWidth - Return the width (in bits) of the specified integer type 180 /// enum. For example, SignedInt -> getIntWidth(). 181 unsigned TargetInfo::getTypeWidth(IntType T) const { 182 switch (T) { 183 default: llvm_unreachable("not an integer!"); 184 case SignedChar: 185 case UnsignedChar: return getCharWidth(); 186 case SignedShort: 187 case UnsignedShort: return getShortWidth(); 188 case SignedInt: 189 case UnsignedInt: return getIntWidth(); 190 case SignedLong: 191 case UnsignedLong: return getLongWidth(); 192 case SignedLongLong: 193 case UnsignedLongLong: return getLongLongWidth(); 194 }; 195 } 196 197 TargetInfo::IntType TargetInfo::getIntTypeByWidth( 198 unsigned BitWidth, 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 212 TargetInfo::IntType TargetInfo::getLeastIntTypeByWidth(unsigned BitWidth, 213 bool IsSigned) const { 214 if (getCharWidth() >= BitWidth) 215 return IsSigned ? SignedChar : UnsignedChar; 216 if (getShortWidth() >= BitWidth) 217 return IsSigned ? SignedShort : UnsignedShort; 218 if (getIntWidth() >= BitWidth) 219 return IsSigned ? SignedInt : UnsignedInt; 220 if (getLongWidth() >= BitWidth) 221 return IsSigned ? SignedLong : UnsignedLong; 222 if (getLongLongWidth() >= BitWidth) 223 return IsSigned ? SignedLongLong : UnsignedLongLong; 224 return NoInt; 225 } 226 227 TargetInfo::RealType TargetInfo::getRealTypeByWidth(unsigned BitWidth) const { 228 if (getFloatWidth() == BitWidth) 229 return Float; 230 if (getDoubleWidth() == BitWidth) 231 return Double; 232 233 switch (BitWidth) { 234 case 96: 235 if (&getLongDoubleFormat() == &llvm::APFloat::x87DoubleExtended()) 236 return LongDouble; 237 break; 238 case 128: 239 if (&getLongDoubleFormat() == &llvm::APFloat::PPCDoubleDouble() || 240 &getLongDoubleFormat() == &llvm::APFloat::IEEEquad()) 241 return LongDouble; 242 if (hasFloat128Type()) 243 return Float128; 244 break; 245 } 246 247 return NoFloat; 248 } 249 250 /// getTypeAlign - Return the alignment (in bits) of the specified integer type 251 /// enum. For example, SignedInt -> getIntAlign(). 252 unsigned TargetInfo::getTypeAlign(IntType T) const { 253 switch (T) { 254 default: llvm_unreachable("not an integer!"); 255 case SignedChar: 256 case UnsignedChar: return getCharAlign(); 257 case SignedShort: 258 case UnsignedShort: return getShortAlign(); 259 case SignedInt: 260 case UnsignedInt: return getIntAlign(); 261 case SignedLong: 262 case UnsignedLong: return getLongAlign(); 263 case SignedLongLong: 264 case UnsignedLongLong: return getLongLongAlign(); 265 }; 266 } 267 268 /// isTypeSigned - Return whether an integer types is signed. Returns true if 269 /// the type is signed; false otherwise. 270 bool TargetInfo::isTypeSigned(IntType T) { 271 switch (T) { 272 default: llvm_unreachable("not an integer!"); 273 case SignedChar: 274 case SignedShort: 275 case SignedInt: 276 case SignedLong: 277 case SignedLongLong: 278 return true; 279 case UnsignedChar: 280 case UnsignedShort: 281 case UnsignedInt: 282 case UnsignedLong: 283 case UnsignedLongLong: 284 return false; 285 }; 286 } 287 288 /// adjust - Set forced language options. 289 /// Apply changes to the target information with respect to certain 290 /// language options which change the target configuration and adjust 291 /// the language based on the target options where applicable. 292 void TargetInfo::adjust(LangOptions &Opts) { 293 if (Opts.NoBitFieldTypeAlign) 294 UseBitFieldTypeAlignment = false; 295 296 switch (Opts.WCharSize) { 297 default: llvm_unreachable("invalid wchar_t width"); 298 case 0: break; 299 case 1: WCharType = Opts.WCharIsSigned ? SignedChar : UnsignedChar; break; 300 case 2: WCharType = Opts.WCharIsSigned ? SignedShort : UnsignedShort; break; 301 case 4: WCharType = Opts.WCharIsSigned ? SignedInt : UnsignedInt; break; 302 } 303 304 if (Opts.AlignDouble) { 305 DoubleAlign = LongLongAlign = 64; 306 LongDoubleAlign = 64; 307 } 308 309 if (Opts.OpenCL) { 310 // OpenCL C requires specific widths for types, irrespective of 311 // what these normally are for the target. 312 // We also define long long and long double here, although the 313 // OpenCL standard only mentions these as "reserved". 314 IntWidth = IntAlign = 32; 315 LongWidth = LongAlign = 64; 316 LongLongWidth = LongLongAlign = 128; 317 HalfWidth = HalfAlign = 16; 318 FloatWidth = FloatAlign = 32; 319 320 // Embedded 32-bit targets (OpenCL EP) might have double C type 321 // defined as float. Let's not override this as it might lead 322 // to generating illegal code that uses 64bit doubles. 323 if (DoubleWidth != FloatWidth) { 324 DoubleWidth = DoubleAlign = 64; 325 DoubleFormat = &llvm::APFloat::IEEEdouble(); 326 } 327 LongDoubleWidth = LongDoubleAlign = 128; 328 329 unsigned MaxPointerWidth = getMaxPointerWidth(); 330 assert(MaxPointerWidth == 32 || MaxPointerWidth == 64); 331 bool Is32BitArch = MaxPointerWidth == 32; 332 SizeType = Is32BitArch ? UnsignedInt : UnsignedLong; 333 PtrDiffType = Is32BitArch ? SignedInt : SignedLong; 334 IntPtrType = Is32BitArch ? SignedInt : SignedLong; 335 336 IntMaxType = SignedLongLong; 337 Int64Type = SignedLong; 338 339 HalfFormat = &llvm::APFloat::IEEEhalf(); 340 FloatFormat = &llvm::APFloat::IEEEsingle(); 341 LongDoubleFormat = &llvm::APFloat::IEEEquad(); 342 } 343 344 if (Opts.NewAlignOverride) 345 NewAlign = Opts.NewAlignOverride * getCharWidth(); 346 } 347 348 bool TargetInfo::initFeatureMap( 349 llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU, 350 const std::vector<std::string> &FeatureVec) const { 351 for (const auto &F : FeatureVec) { 352 StringRef Name = F; 353 // Apply the feature via the target. 354 bool Enabled = Name[0] == '+'; 355 setFeatureEnabled(Features, Name.substr(1), Enabled); 356 } 357 return true; 358 } 359 360 LangAS TargetInfo::getOpenCLTypeAddrSpace(const Type *T) const { 361 auto BT = dyn_cast<BuiltinType>(T); 362 363 if (!BT) { 364 if (isa<PipeType>(T)) 365 return LangAS::opencl_global; 366 367 return LangAS::Default; 368 } 369 370 switch (BT->getKind()) { 371 #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ 372 case BuiltinType::Id: \ 373 return LangAS::opencl_global; 374 #include "clang/Basic/OpenCLImageTypes.def" 375 376 case BuiltinType::OCLSampler: 377 return LangAS::opencl_constant; 378 379 default: 380 return LangAS::Default; 381 } 382 } 383 384 //===----------------------------------------------------------------------===// 385 386 387 static StringRef removeGCCRegisterPrefix(StringRef Name) { 388 if (Name[0] == '%' || Name[0] == '#') 389 Name = Name.substr(1); 390 391 return Name; 392 } 393 394 /// isValidClobber - Returns whether the passed in string is 395 /// a valid clobber in an inline asm statement. This is used by 396 /// Sema. 397 bool TargetInfo::isValidClobber(StringRef Name) const { 398 return (isValidGCCRegisterName(Name) || 399 Name == "memory" || Name == "cc"); 400 } 401 402 /// isValidGCCRegisterName - Returns whether the passed in string 403 /// is a valid register name according to GCC. This is used by Sema for 404 /// inline asm statements. 405 bool TargetInfo::isValidGCCRegisterName(StringRef Name) const { 406 if (Name.empty()) 407 return false; 408 409 // Get rid of any register prefix. 410 Name = removeGCCRegisterPrefix(Name); 411 if (Name.empty()) 412 return false; 413 414 ArrayRef<const char *> Names = getGCCRegNames(); 415 416 // If we have a number it maps to an entry in the register name array. 417 if (isDigit(Name[0])) { 418 unsigned n; 419 if (!Name.getAsInteger(0, n)) 420 return n < Names.size(); 421 } 422 423 // Check register names. 424 if (std::find(Names.begin(), Names.end(), Name) != Names.end()) 425 return true; 426 427 // Check any additional names that we have. 428 for (const AddlRegName &ARN : getGCCAddlRegNames()) 429 for (const char *AN : ARN.Names) { 430 if (!AN) 431 break; 432 // Make sure the register that the additional name is for is within 433 // the bounds of the register names from above. 434 if (AN == Name && ARN.RegNum < Names.size()) 435 return true; 436 } 437 438 // Now check aliases. 439 for (const GCCRegAlias &GRA : getGCCRegAliases()) 440 for (const char *A : GRA.Aliases) { 441 if (!A) 442 break; 443 if (A == Name) 444 return true; 445 } 446 447 return false; 448 } 449 450 StringRef TargetInfo::getNormalizedGCCRegisterName(StringRef Name, 451 bool ReturnCanonical) const { 452 assert(isValidGCCRegisterName(Name) && "Invalid register passed in"); 453 454 // Get rid of any register prefix. 455 Name = removeGCCRegisterPrefix(Name); 456 457 ArrayRef<const char *> Names = getGCCRegNames(); 458 459 // First, check if we have a number. 460 if (isDigit(Name[0])) { 461 unsigned n; 462 if (!Name.getAsInteger(0, n)) { 463 assert(n < Names.size() && "Out of bounds register number!"); 464 return Names[n]; 465 } 466 } 467 468 // Check any additional names that we have. 469 for (const AddlRegName &ARN : getGCCAddlRegNames()) 470 for (const char *AN : ARN.Names) { 471 if (!AN) 472 break; 473 // Make sure the register that the additional name is for is within 474 // the bounds of the register names from above. 475 if (AN == Name && ARN.RegNum < Names.size()) 476 return ReturnCanonical ? Names[ARN.RegNum] : Name; 477 } 478 479 // Now check aliases. 480 for (const GCCRegAlias &RA : getGCCRegAliases()) 481 for (const char *A : RA.Aliases) { 482 if (!A) 483 break; 484 if (A == Name) 485 return RA.Register; 486 } 487 488 return Name; 489 } 490 491 bool TargetInfo::validateOutputConstraint(ConstraintInfo &Info) const { 492 const char *Name = Info.getConstraintStr().c_str(); 493 // An output constraint must start with '=' or '+' 494 if (*Name != '=' && *Name != '+') 495 return false; 496 497 if (*Name == '+') 498 Info.setIsReadWrite(); 499 500 Name++; 501 while (*Name) { 502 switch (*Name) { 503 default: 504 if (!validateAsmConstraint(Name, Info)) { 505 // FIXME: We temporarily return false 506 // so we can add more constraints as we hit it. 507 // Eventually, an unknown constraint should just be treated as 'g'. 508 return false; 509 } 510 break; 511 case '&': // early clobber. 512 Info.setEarlyClobber(); 513 break; 514 case '%': // commutative. 515 // FIXME: Check that there is a another register after this one. 516 break; 517 case 'r': // general register. 518 Info.setAllowsRegister(); 519 break; 520 case 'm': // memory operand. 521 case 'o': // offsetable memory operand. 522 case 'V': // non-offsetable memory operand. 523 case '<': // autodecrement memory operand. 524 case '>': // autoincrement memory operand. 525 Info.setAllowsMemory(); 526 break; 527 case 'g': // general register, memory operand or immediate integer. 528 case 'X': // any operand. 529 Info.setAllowsRegister(); 530 Info.setAllowsMemory(); 531 break; 532 case ',': // multiple alternative constraint. Pass it. 533 // Handle additional optional '=' or '+' modifiers. 534 if (Name[1] == '=' || Name[1] == '+') 535 Name++; 536 break; 537 case '#': // Ignore as constraint. 538 while (Name[1] && Name[1] != ',') 539 Name++; 540 break; 541 case '?': // Disparage slightly code. 542 case '!': // Disparage severely. 543 case '*': // Ignore for choosing register preferences. 544 case 'i': // Ignore i,n,E,F as output constraints (match from the other 545 // chars) 546 case 'n': 547 case 'E': 548 case 'F': 549 break; // Pass them. 550 } 551 552 Name++; 553 } 554 555 // Early clobber with a read-write constraint which doesn't permit registers 556 // is invalid. 557 if (Info.earlyClobber() && Info.isReadWrite() && !Info.allowsRegister()) 558 return false; 559 560 // If a constraint allows neither memory nor register operands it contains 561 // only modifiers. Reject it. 562 return Info.allowsMemory() || Info.allowsRegister(); 563 } 564 565 bool TargetInfo::resolveSymbolicName(const char *&Name, 566 ArrayRef<ConstraintInfo> OutputConstraints, 567 unsigned &Index) const { 568 assert(*Name == '[' && "Symbolic name did not start with '['"); 569 Name++; 570 const char *Start = Name; 571 while (*Name && *Name != ']') 572 Name++; 573 574 if (!*Name) { 575 // Missing ']' 576 return false; 577 } 578 579 std::string SymbolicName(Start, Name - Start); 580 581 for (Index = 0; Index != OutputConstraints.size(); ++Index) 582 if (SymbolicName == OutputConstraints[Index].getName()) 583 return true; 584 585 return false; 586 } 587 588 bool TargetInfo::validateInputConstraint( 589 MutableArrayRef<ConstraintInfo> OutputConstraints, 590 ConstraintInfo &Info) const { 591 const char *Name = Info.ConstraintStr.c_str(); 592 593 if (!*Name) 594 return false; 595 596 while (*Name) { 597 switch (*Name) { 598 default: 599 // Check if we have a matching constraint 600 if (*Name >= '0' && *Name <= '9') { 601 const char *DigitStart = Name; 602 while (Name[1] >= '0' && Name[1] <= '9') 603 Name++; 604 const char *DigitEnd = Name; 605 unsigned i; 606 if (StringRef(DigitStart, DigitEnd - DigitStart + 1) 607 .getAsInteger(10, i)) 608 return false; 609 610 // Check if matching constraint is out of bounds. 611 if (i >= OutputConstraints.size()) return false; 612 613 // A number must refer to an output only operand. 614 if (OutputConstraints[i].isReadWrite()) 615 return false; 616 617 // If the constraint is already tied, it must be tied to the 618 // same operand referenced to by the number. 619 if (Info.hasTiedOperand() && Info.getTiedOperand() != i) 620 return false; 621 622 // The constraint should have the same info as the respective 623 // output constraint. 624 Info.setTiedOperand(i, OutputConstraints[i]); 625 } else if (!validateAsmConstraint(Name, Info)) { 626 // FIXME: This error return is in place temporarily so we can 627 // add more constraints as we hit it. Eventually, an unknown 628 // constraint should just be treated as 'g'. 629 return false; 630 } 631 break; 632 case '[': { 633 unsigned Index = 0; 634 if (!resolveSymbolicName(Name, OutputConstraints, Index)) 635 return false; 636 637 // If the constraint is already tied, it must be tied to the 638 // same operand referenced to by the number. 639 if (Info.hasTiedOperand() && Info.getTiedOperand() != Index) 640 return false; 641 642 // A number must refer to an output only operand. 643 if (OutputConstraints[Index].isReadWrite()) 644 return false; 645 646 Info.setTiedOperand(Index, OutputConstraints[Index]); 647 break; 648 } 649 case '%': // commutative 650 // FIXME: Fail if % is used with the last operand. 651 break; 652 case 'i': // immediate integer. 653 case 'n': // immediate integer with a known value. 654 break; 655 case 'I': // Various constant constraints with target-specific meanings. 656 case 'J': 657 case 'K': 658 case 'L': 659 case 'M': 660 case 'N': 661 case 'O': 662 case 'P': 663 if (!validateAsmConstraint(Name, Info)) 664 return false; 665 break; 666 case 'r': // general register. 667 Info.setAllowsRegister(); 668 break; 669 case 'm': // memory operand. 670 case 'o': // offsettable memory operand. 671 case 'V': // non-offsettable memory operand. 672 case '<': // autodecrement memory operand. 673 case '>': // autoincrement memory operand. 674 Info.setAllowsMemory(); 675 break; 676 case 'g': // general register, memory operand or immediate integer. 677 case 'X': // any operand. 678 Info.setAllowsRegister(); 679 Info.setAllowsMemory(); 680 break; 681 case 'E': // immediate floating point. 682 case 'F': // immediate floating point. 683 case 'p': // address operand. 684 break; 685 case ',': // multiple alternative constraint. Ignore comma. 686 break; 687 case '#': // Ignore as constraint. 688 while (Name[1] && Name[1] != ',') 689 Name++; 690 break; 691 case '?': // Disparage slightly code. 692 case '!': // Disparage severely. 693 case '*': // Ignore for choosing register preferences. 694 break; // Pass them. 695 } 696 697 Name++; 698 } 699 700 return true; 701 } 702