• Home
  • Raw
  • Download

Lines Matching refs:TI

194                            const TargetInfo &TI, MacroBuilder &Builder) {  in DefineTypeSize()  argument
195 DefineTypeSize(MacroName, TI.getTypeWidth(Ty), TI.getTypeConstantSuffix(Ty), in DefineTypeSize()
196 TI.isTypeSigned(Ty), Builder); in DefineTypeSize()
205 const TargetInfo &TI, MacroBuilder &Builder) { in DefineTypeWidth() argument
206 Builder.defineMacro(MacroName, Twine(TI.getTypeWidth(Ty))); in DefineTypeWidth()
210 const TargetInfo &TI, MacroBuilder &Builder) { in DefineTypeSizeof() argument
212 Twine(BitWidth / TI.getCharWidth())); in DefineTypeSizeof()
216 const TargetInfo &TI, in DefineExactWidthIntType() argument
218 int TypeWidth = TI.getTypeWidth(Ty); in DefineExactWidthIntType()
219 bool IsSigned = TI.isTypeSigned(Ty); in DefineExactWidthIntType()
224 Ty = IsSigned ? TI.getInt64Type() : TI.getIntTypeByWidth(64, false); in DefineExactWidthIntType()
237 const TargetInfo &TI, in DefineExactWidthIntTypeSize() argument
239 int TypeWidth = TI.getTypeWidth(Ty); in DefineExactWidthIntTypeSize()
240 bool IsSigned = TI.isTypeSigned(Ty); in DefineExactWidthIntTypeSize()
245 Ty = IsSigned ? TI.getInt64Type() : TI.getIntTypeByWidth(64, false); in DefineExactWidthIntTypeSize()
248 DefineTypeSize(Prefix + Twine(TypeWidth) + "_MAX__", Ty, TI, Builder); in DefineExactWidthIntTypeSize()
252 const TargetInfo &TI, in DefineLeastWidthIntType() argument
254 TargetInfo::IntType Ty = TI.getLeastIntTypeByWidth(TypeWidth, IsSigned); in DefineLeastWidthIntType()
260 DefineTypeSize(Prefix + Twine(TypeWidth) + "_MAX__", Ty, TI, Builder); in DefineLeastWidthIntType()
264 const TargetInfo &TI, MacroBuilder &Builder) { in DefineFastIntType() argument
267 TargetInfo::IntType Ty = TI.getLeastIntTypeByWidth(TypeWidth, IsSigned); in DefineFastIntType()
273 DefineTypeSize(Prefix + Twine(TypeWidth) + "_MAX__", Ty, TI, Builder); in DefineFastIntType()
344 static void InitializeStandardPredefinedMacros(const TargetInfo &TI, in InitializeStandardPredefinedMacros() argument
431 static void InitializePredefinedMacros(const TargetInfo &TI, in InitializePredefinedMacros() argument
584 if (TI.isBigEndian()) { in InitializePredefinedMacros()
592 if (TI.getPointerWidth(0) == 64 && TI.getLongWidth() == 64 in InitializePredefinedMacros()
593 && TI.getIntWidth() == 32) { in InitializePredefinedMacros()
599 assert(TI.getCharWidth() == 8 && "Only support 8-bit char so far"); in InitializePredefinedMacros()
602 DefineTypeSize("__SCHAR_MAX__", TargetInfo::SignedChar, TI, Builder); in InitializePredefinedMacros()
603 DefineTypeSize("__SHRT_MAX__", TargetInfo::SignedShort, TI, Builder); in InitializePredefinedMacros()
604 DefineTypeSize("__INT_MAX__", TargetInfo::SignedInt, TI, Builder); in InitializePredefinedMacros()
605 DefineTypeSize("__LONG_MAX__", TargetInfo::SignedLong, TI, Builder); in InitializePredefinedMacros()
606 DefineTypeSize("__LONG_LONG_MAX__", TargetInfo::SignedLongLong, TI, Builder); in InitializePredefinedMacros()
607 DefineTypeSize("__WCHAR_MAX__", TI.getWCharType(), TI, Builder); in InitializePredefinedMacros()
608 DefineTypeSize("__INTMAX_MAX__", TI.getIntMaxType(), TI, Builder); in InitializePredefinedMacros()
609 DefineTypeSize("__SIZE_MAX__", TI.getSizeType(), TI, Builder); in InitializePredefinedMacros()
612 DefineTypeSize("__UINTMAX_MAX__", TI.getUIntMaxType(), TI, Builder); in InitializePredefinedMacros()
613 DefineTypeSize("__PTRDIFF_MAX__", TI.getPtrDiffType(0), TI, Builder); in InitializePredefinedMacros()
614 DefineTypeSize("__INTPTR_MAX__", TI.getIntPtrType(), TI, Builder); in InitializePredefinedMacros()
615 DefineTypeSize("__UINTPTR_MAX__", TI.getUIntPtrType(), TI, Builder); in InitializePredefinedMacros()
618 DefineTypeSizeof("__SIZEOF_DOUBLE__", TI.getDoubleWidth(), TI, Builder); in InitializePredefinedMacros()
619 DefineTypeSizeof("__SIZEOF_FLOAT__", TI.getFloatWidth(), TI, Builder); in InitializePredefinedMacros()
620 DefineTypeSizeof("__SIZEOF_INT__", TI.getIntWidth(), TI, Builder); in InitializePredefinedMacros()
621 DefineTypeSizeof("__SIZEOF_LONG__", TI.getLongWidth(), TI, Builder); in InitializePredefinedMacros()
622 DefineTypeSizeof("__SIZEOF_LONG_DOUBLE__",TI.getLongDoubleWidth(),TI,Builder); in InitializePredefinedMacros()
623 DefineTypeSizeof("__SIZEOF_LONG_LONG__", TI.getLongLongWidth(), TI, Builder); in InitializePredefinedMacros()
624 DefineTypeSizeof("__SIZEOF_POINTER__", TI.getPointerWidth(0), TI, Builder); in InitializePredefinedMacros()
625 DefineTypeSizeof("__SIZEOF_SHORT__", TI.getShortWidth(), TI, Builder); in InitializePredefinedMacros()
627 TI.getTypeWidth(TI.getPtrDiffType(0)), TI, Builder); in InitializePredefinedMacros()
629 TI.getTypeWidth(TI.getSizeType()), TI, Builder); in InitializePredefinedMacros()
631 TI.getTypeWidth(TI.getWCharType()), TI, Builder); in InitializePredefinedMacros()
633 TI.getTypeWidth(TI.getWIntType()), TI, Builder); in InitializePredefinedMacros()
634 if (TI.hasInt128Type()) in InitializePredefinedMacros()
635 DefineTypeSizeof("__SIZEOF_INT128__", 128, TI, Builder); in InitializePredefinedMacros()
637 DefineType("__INTMAX_TYPE__", TI.getIntMaxType(), Builder); in InitializePredefinedMacros()
638 DefineType("__UINTMAX_TYPE__", TI.getUIntMaxType(), Builder); in InitializePredefinedMacros()
639 DefineTypeWidth("__INTMAX_WIDTH__", TI.getIntMaxType(), TI, Builder); in InitializePredefinedMacros()
640 DefineType("__PTRDIFF_TYPE__", TI.getPtrDiffType(0), Builder); in InitializePredefinedMacros()
641 DefineTypeWidth("__PTRDIFF_WIDTH__", TI.getPtrDiffType(0), TI, Builder); in InitializePredefinedMacros()
642 DefineType("__INTPTR_TYPE__", TI.getIntPtrType(), Builder); in InitializePredefinedMacros()
643 DefineTypeWidth("__INTPTR_WIDTH__", TI.getIntPtrType(), TI, Builder); in InitializePredefinedMacros()
644 DefineType("__SIZE_TYPE__", TI.getSizeType(), Builder); in InitializePredefinedMacros()
645 DefineTypeWidth("__SIZE_WIDTH__", TI.getSizeType(), TI, Builder); in InitializePredefinedMacros()
646 DefineType("__WCHAR_TYPE__", TI.getWCharType(), Builder); in InitializePredefinedMacros()
647 DefineTypeWidth("__WCHAR_WIDTH__", TI.getWCharType(), TI, Builder); in InitializePredefinedMacros()
648 DefineType("__WINT_TYPE__", TI.getWIntType(), Builder); in InitializePredefinedMacros()
649 DefineTypeWidth("__WINT_WIDTH__", TI.getWIntType(), TI, Builder); in InitializePredefinedMacros()
650 DefineTypeWidth("__SIG_ATOMIC_WIDTH__", TI.getSigAtomicType(), TI, Builder); in InitializePredefinedMacros()
651 DefineType("__CHAR16_TYPE__", TI.getChar16Type(), Builder); in InitializePredefinedMacros()
652 DefineType("__CHAR32_TYPE__", TI.getChar32Type(), Builder); in InitializePredefinedMacros()
655 DefineTypeWidth("__UINTMAX_WIDTH__", TI.getUIntMaxType(), TI, Builder); in InitializePredefinedMacros()
656 DefineType("__UINTPTR_TYPE__", TI.getUIntPtrType(), Builder); in InitializePredefinedMacros()
657 DefineTypeWidth("__UINTPTR_WIDTH__", TI.getUIntPtrType(), TI, Builder); in InitializePredefinedMacros()
660 DefineFloatMacros(Builder, "FLT", &TI.getFloatFormat(), "F"); in InitializePredefinedMacros()
661 DefineFloatMacros(Builder, "DBL", &TI.getDoubleFormat(), ""); in InitializePredefinedMacros()
662 DefineFloatMacros(Builder, "LDBL", &TI.getLongDoubleFormat(), "L"); in InitializePredefinedMacros()
666 Twine((int)TI.getPointerWidth(0))); in InitializePredefinedMacros()
671 if (!TargetInfo::isTypeSigned(TI.getWCharType())) in InitializePredefinedMacros()
674 if (!TargetInfo::isTypeSigned(TI.getWIntType())) in InitializePredefinedMacros()
678 Builder.defineMacro("__INT" + Twine(TI.getCharWidth()) + "_TYPE__", in InitializePredefinedMacros()
681 if (TI.getShortWidth() > TI.getCharWidth()) in InitializePredefinedMacros()
682 DefineExactWidthIntType(TargetInfo::SignedShort, TI, Builder); in InitializePredefinedMacros()
684 if (TI.getIntWidth() > TI.getShortWidth()) in InitializePredefinedMacros()
685 DefineExactWidthIntType(TargetInfo::SignedInt, TI, Builder); in InitializePredefinedMacros()
687 if (TI.getLongWidth() > TI.getIntWidth()) in InitializePredefinedMacros()
688 DefineExactWidthIntType(TargetInfo::SignedLong, TI, Builder); in InitializePredefinedMacros()
690 if (TI.getLongLongWidth() > TI.getLongWidth()) in InitializePredefinedMacros()
691 DefineExactWidthIntType(TargetInfo::SignedLongLong, TI, Builder); in InitializePredefinedMacros()
694 DefineExactWidthIntType(TargetInfo::UnsignedChar, TI, Builder); in InitializePredefinedMacros()
695 DefineExactWidthIntTypeSize(TargetInfo::UnsignedChar, TI, Builder); in InitializePredefinedMacros()
696 DefineExactWidthIntTypeSize(TargetInfo::SignedChar, TI, Builder); in InitializePredefinedMacros()
698 if (TI.getShortWidth() > TI.getCharWidth()) { in InitializePredefinedMacros()
699 DefineExactWidthIntType(TargetInfo::UnsignedShort, TI, Builder); in InitializePredefinedMacros()
700 DefineExactWidthIntTypeSize(TargetInfo::UnsignedShort, TI, Builder); in InitializePredefinedMacros()
701 DefineExactWidthIntTypeSize(TargetInfo::SignedShort, TI, Builder); in InitializePredefinedMacros()
704 if (TI.getIntWidth() > TI.getShortWidth()) { in InitializePredefinedMacros()
705 DefineExactWidthIntType(TargetInfo::UnsignedInt, TI, Builder); in InitializePredefinedMacros()
706 DefineExactWidthIntTypeSize(TargetInfo::UnsignedInt, TI, Builder); in InitializePredefinedMacros()
707 DefineExactWidthIntTypeSize(TargetInfo::SignedInt, TI, Builder); in InitializePredefinedMacros()
710 if (TI.getLongWidth() > TI.getIntWidth()) { in InitializePredefinedMacros()
711 DefineExactWidthIntType(TargetInfo::UnsignedLong, TI, Builder); in InitializePredefinedMacros()
712 DefineExactWidthIntTypeSize(TargetInfo::UnsignedLong, TI, Builder); in InitializePredefinedMacros()
713 DefineExactWidthIntTypeSize(TargetInfo::SignedLong, TI, Builder); in InitializePredefinedMacros()
716 if (TI.getLongLongWidth() > TI.getLongWidth()) { in InitializePredefinedMacros()
717 DefineExactWidthIntType(TargetInfo::UnsignedLongLong, TI, Builder); in InitializePredefinedMacros()
718 DefineExactWidthIntTypeSize(TargetInfo::UnsignedLongLong, TI, Builder); in InitializePredefinedMacros()
719 DefineExactWidthIntTypeSize(TargetInfo::SignedLongLong, TI, Builder); in InitializePredefinedMacros()
722 DefineLeastWidthIntType(8, true, TI, Builder); in InitializePredefinedMacros()
723 DefineLeastWidthIntType(8, false, TI, Builder); in InitializePredefinedMacros()
724 DefineLeastWidthIntType(16, true, TI, Builder); in InitializePredefinedMacros()
725 DefineLeastWidthIntType(16, false, TI, Builder); in InitializePredefinedMacros()
726 DefineLeastWidthIntType(32, true, TI, Builder); in InitializePredefinedMacros()
727 DefineLeastWidthIntType(32, false, TI, Builder); in InitializePredefinedMacros()
728 DefineLeastWidthIntType(64, true, TI, Builder); in InitializePredefinedMacros()
729 DefineLeastWidthIntType(64, false, TI, Builder); in InitializePredefinedMacros()
731 DefineFastIntType(8, true, TI, Builder); in InitializePredefinedMacros()
732 DefineFastIntType(8, false, TI, Builder); in InitializePredefinedMacros()
733 DefineFastIntType(16, true, TI, Builder); in InitializePredefinedMacros()
734 DefineFastIntType(16, false, TI, Builder); in InitializePredefinedMacros()
735 DefineFastIntType(32, true, TI, Builder); in InitializePredefinedMacros()
736 DefineFastIntType(32, false, TI, Builder); in InitializePredefinedMacros()
737 DefineFastIntType(64, true, TI, Builder); in InitializePredefinedMacros()
738 DefineFastIntType(64, false, TI, Builder); in InitializePredefinedMacros()
741 if (const char *Prefix = TI.getUserLabelPrefix()) in InitializePredefinedMacros()
759 unsigned InlineWidthBits = TI.getMaxAtomicInlineWidth(); in InitializePredefinedMacros()
762 getLockFreeValue(TI.get##Type##Width(), \ in InitializePredefinedMacros()
763 TI.get##Type##Align(), \ in InitializePredefinedMacros()
775 getLockFreeValue(TI.getPointerWidth(0), in InitializePredefinedMacros()
776 TI.getPointerAlign(0), in InitializePredefinedMacros()
793 Builder.defineMacro("__FLT_EVAL_METHOD__", Twine(TI.getFloatEvalMethod())); in InitializePredefinedMacros()
795 int Dig = PickFP(&TI.getLongDoubleFormat(), -1/*FIXME*/, 17, 21, 33, 36); in InitializePredefinedMacros()
835 TI.getTargetDefines(LangOpts, Builder); in InitializePredefinedMacros()