Lines Matching refs:Sema
115 APFixedPoint APFixedPoint::getMax(const FixedPointSemantics &Sema) { in getMax() argument
116 bool IsUnsigned = !Sema.isSigned(); in getMax()
117 auto Val = APSInt::getMaxValue(Sema.getWidth(), IsUnsigned); in getMax()
118 if (IsUnsigned && Sema.hasUnsignedPadding()) in getMax()
120 return APFixedPoint(Val, Sema); in getMax()
123 APFixedPoint APFixedPoint::getMin(const FixedPointSemantics &Sema) { in getMin() argument
124 auto Val = APSInt::getMinValue(Sema.getWidth(), !Sema.isSigned()); in getMin()
125 return APFixedPoint(Val, Sema); in getMin()
178 auto CommonFXSema = Sema.getCommonSemantics(Other.getSemantics()); in add()
202 auto CommonFXSema = Sema.getCommonSemantics(Other.getSemantics()); in sub()
226 auto CommonFXSema = Sema.getCommonSemantics(Other.getSemantics()); in mul()
283 auto CommonFXSema = Sema.getCommonSemantics(Other.getSemantics()); in div()
341 unsigned Wide = Sema.getWidth() * 2; in shl()
342 if (Sema.isSigned()) in shl()
350 Result.setIsSigned(Sema.isSigned()); in shl()
354 APSInt Max = APFixedPoint::getMax(Sema).getValue().extOrTrunc(Wide); in shl()
355 APSInt Min = APFixedPoint::getMin(Sema).getValue().extOrTrunc(Wide); in shl()
356 if (Sema.isSaturated()) { in shl()
367 return APFixedPoint(Result.sextOrTrunc(Sema.getWidth()), Sema); in shl()
402 return APFixedPoint(-Val, Sema); in negate()
410 return Val.isMinSignedValue() ? getMax(Sema) : APFixedPoint(-Val, Sema); in negate()
412 return APFixedPoint(Sema); in negate()
466 while (!Sema.fitsInFloatSemantics(*OpSema)) in convertToFloat()
473 APFloat::opStatus S = Flt.convertFromAPInt(Val, Sema.isSigned(), RM); in convertToFloat()
481 APFloat ScaleFactor(std::pow(2, -(int)Sema.getScale())); in convertToFloat()