Lines Matching refs:APSInt

49 static APSInt popToAPSInt(InterpStack &Stk, PrimType T) {  in popToAPSInt()
54 static void pushInteger(InterpState &S, const APSInt &Val, QualType QT) { in pushInteger()
89 pushInteger(S, APSInt(Val, !std::is_signed_v<T>), QT); in pushInteger()
90 else if constexpr (std::is_same_v<T, APSInt>) in pushInteger()
94 APSInt(APInt(sizeof(T) * 8, static_cast<uint64_t>(Val), in pushInteger()
101 const APSInt &Value) { in assignInteger()
556 APSInt FPClassArg = popToAPSInt(S.Stk, FPClassArgT); in interp__builtin_isfpclass()
574 APSInt Values[5]; in interp__builtin_fpclassify()
626 APSInt Val = popToAPSInt(S.Stk, ArgT); in interp__builtin_abs()
628 APSInt(APInt::getSignedMinValue(Val.getBitWidth()), /*IsUnsigned=*/false)) in interp__builtin_abs()
640 APSInt Val = popToAPSInt(S.Stk, ArgT); in interp__builtin_popcount()
649 APSInt Val = popToAPSInt(S.Stk, ArgT); in interp__builtin_parity()
658 APSInt Val = popToAPSInt(S.Stk, ArgT); in interp__builtin_clrsb()
667 APSInt Val = popToAPSInt(S.Stk, ArgT); in interp__builtin_bitreverse()
701 APSInt Val = popToAPSInt(S.Stk, ArgT); in interp__builtin_expect()
713 APSInt Amount = popToAPSInt(S.Stk, AmountT); in interp__builtin_rotate()
714 APSInt Value = popToAPSInt(S.Stk, ValueT); in interp__builtin_rotate()
716 APSInt Result; in interp__builtin_rotate()
718 Result = APSInt(Value.rotr(Amount.urem(Value.getBitWidth())), in interp__builtin_rotate()
721 Result = APSInt(Value.rotl(Amount.urem(Value.getBitWidth())), in interp__builtin_rotate()
732 APSInt Value = popToAPSInt(S.Stk, ArgT); in interp__builtin_ffs()
761 APSInt Arg = popToAPSInt(S.Stk, ArgT); in interp__builtin_eh_return_data_regno()
779 APSInt RHS = popToAPSInt(S.Stk, RHST); in interp__builtin_overflowop()
780 APSInt LHS = popToAPSInt(S.Stk, LHST); in interp__builtin_overflowop()
785 APSInt Result; in interp__builtin_overflowop()
805 LHS = APSInt(LHS.extOrTrunc(MaxBits), !IsSigned); in interp__builtin_overflowop()
806 RHS = APSInt(RHS.extOrTrunc(MaxBits), !IsSigned); in interp__builtin_overflowop()
807 Result = APSInt(MaxBits, !IsSigned); in interp__builtin_overflowop()
855 APSInt Temp = Result.extOrTrunc(S.getASTContext().getTypeSize(ResultType)); in interp__builtin_overflowop()
858 if (!APSInt::isSameValue(Temp, Result)) in interp__builtin_overflowop()
880 APSInt CarryIn = popToAPSInt(S.Stk, LHST); in interp__builtin_carryop()
881 APSInt RHS = popToAPSInt(S.Stk, RHST); in interp__builtin_carryop()
882 APSInt LHS = popToAPSInt(S.Stk, LHST); in interp__builtin_carryop()
884 APSInt CarryOut; in interp__builtin_carryop()
886 APSInt Result; in interp__builtin_carryop()
931 std::optional<APSInt> Fallback; in interp__builtin_clz()
937 const APSInt &Val = popToAPSInt(S.Stk, ValT); in interp__builtin_clz()
962 std::optional<APSInt> Fallback; in interp__builtin_ctz()
968 const APSInt &Val = popToAPSInt(S.Stk, ValT); in interp__builtin_ctz()
987 const APSInt &Val = popToAPSInt(S.Stk, ValT); in interp__builtin_bswap()
1008 const APSInt &SizeVal = popToAPSInt(S.Stk, ValT); in interp__builtin_atomic_lock_free()
1039 if (APSInt(APInt(64, IntVal, false), true).isAligned(Size.getAsAlign())) in interp__builtin_atomic_lock_free()
1075 const APSInt &SizeVal = popToAPSInt(S.Stk, ValT); in interp__builtin_c11_atomic_is_lock_free()
1121 const APSInt &Alignment = popToAPSInt(S.Stk, AlignmentT); in interp__builtin_is_aligned_up_down()
1128 APSInt MaxValue(APInt::getOneBitSet(SrcWidth, SrcWidth - 1)); in interp__builtin_is_aligned_up_down()
1129 if (APSInt::compareValues(Alignment, MaxValue) > 0) { in interp__builtin_is_aligned_up_down()
1140 const APSInt &Src = popToAPSInt(S.Stk, FirstArgT); in interp__builtin_is_aligned_up_down()
1143 APSInt AlignedVal = in interp__builtin_is_aligned_up_down()
1144 APSInt((Src + AlignMinusOne) & ~AlignMinusOne, Src.isUnsigned()); in interp__builtin_is_aligned_up_down()
1147 APSInt AlignedVal = APSInt(Src & ~AlignMinusOne, Src.isUnsigned()); in interp__builtin_is_aligned_up_down()
1225 std::optional<APSInt> ExtraOffset; in interp__builtin_assume_aligned()
1229 APSInt Alignment = popToAPSInt(S.Stk, *S.Ctx.classify(Call->getArg(1))); in interp__builtin_assume_aligned()
1279 APSInt Index = popToAPSInt(S.Stk, IndexT); in interp__builtin_ia32_bextr()
1280 APSInt Val = popToAPSInt(S.Stk, ValT); in interp__builtin_ia32_bextr()
1311 APSInt Idx = popToAPSInt(S.Stk, IndexT); in interp__builtin_ia32_bzhi()
1312 APSInt Val = popToAPSInt(S.Stk, ValT); in interp__builtin_ia32_bzhi()
1332 APSInt Val = popToAPSInt(S.Stk, *S.Ctx.classify(Call->getArg(0))); in interp__builtin_ia32_lzcnt()
1345 APSInt Val = popToAPSInt(S.Stk, *S.Ctx.classify(Call->getArg(0))); in interp__builtin_ia32_tzcnt()
1360 APSInt Mask = popToAPSInt(S.Stk, MaskT); in interp__builtin_ia32_pdep()
1361 APSInt Val = popToAPSInt(S.Stk, ValT); in interp__builtin_ia32_pdep()
1383 APSInt Mask = popToAPSInt(S.Stk, MaskT); in interp__builtin_ia32_pext()
1384 APSInt Val = popToAPSInt(S.Stk, ValT); in interp__builtin_ia32_pext()
1412 APSInt RHS = popToAPSInt(S.Stk, RHST); in interp__builtin_ia32_addcarry_subborrow()
1413 APSInt LHS = popToAPSInt(S.Stk, LHST); in interp__builtin_ia32_addcarry_subborrow()
1414 APSInt CarryIn = popToAPSInt(S.Stk, CarryInT); in interp__builtin_ia32_addcarry_subborrow()
1426 APSInt CarryOut = in interp__builtin_ia32_addcarry_subborrow()
1427 APSInt(ExResult.extractBits(1, BitWidth), /*IsUnsigned=*/true); in interp__builtin_ia32_addcarry_subborrow()
1431 assignInteger(S, CarryOutPtr, CarryOutT, APSInt(std::move(Result), true)); in interp__builtin_ia32_addcarry_subborrow()
1504 APSInt Bytes = popToAPSInt(S.Stk, *S.getContext().classify(Call->getArg(0))); in interp__builtin_operator_new()
1515 << Bytes << APSInt(ElemSizeAP, true) << ElemType; in interp__builtin_operator_new()
1701 APSInt Val = popToAPSInt(S.Stk, ArgT); in interp__builtin_elementwise_popcount()
1746 APSInt Size = popToAPSInt(S.Stk, SizeT); in interp__builtin_memcpy()
1805 Size *= APSInt(APInt(Size.getBitWidth(), WCharSize, /*IsSigned=*/false), in interp__builtin_memcpy()
1903 const APSInt &Size = popToAPSInt(S.Stk, SizeT); in interp__builtin_memcmp()
2015 std::optional<APSInt> MaxLength; in interp__builtin_memchr()
2021 APSInt Desired = popToAPSInt(S.Stk, DesiredT); in interp__builtin_memchr()
2264 APSInt RHS = popToAPSInt( in interp__builtin_elementwise_sat()
2266 APSInt LHS = popToAPSInt( in interp__builtin_elementwise_sat()
2277 pushInteger(S, APSInt(Result, !LHS.isSigned()), Call->getType()); in interp__builtin_elementwise_sat()
2297 APSInt Elem1; in interp__builtin_elementwise_sat()
2298 APSInt Elem2; in interp__builtin_elementwise_sat()
2304 APSInt Result; in interp__builtin_elementwise_sat()
2306 Result = APSInt(Elem1.isSigned() ? Elem1.sadd_sat(Elem2) in interp__builtin_elementwise_sat()
2310 Result = APSInt(Elem1.isSigned() ? Elem1.ssub_sat(Elem2) in interp__builtin_elementwise_sat()
2820 const Pointer &Ptr, const APSInt &IntValue) { in SetThreeWayComparisonField()