• Home
  • Raw
  • Download

Lines Matching refs:Sema

22 FixedPointSemantics Saturated(FixedPointSemantics Sema) {  in Saturated()  argument
23 Sema.setSaturated(true); in Saturated()
24 return Sema; in Saturated()
135 void CheckUnpaddedMax(const FixedPointSemantics &Sema) { in CheckUnpaddedMax() argument
136 ASSERT_EQ(APFixedPoint::getMax(Sema).getValue(), in CheckUnpaddedMax()
137 APSInt::getMaxValue(Sema.getWidth(), !Sema.isSigned())); in CheckUnpaddedMax()
140 void CheckPaddedMax(const FixedPointSemantics &Sema) { in CheckPaddedMax() argument
141 ASSERT_EQ(APFixedPoint::getMax(Sema).getValue(), in CheckPaddedMax()
142 APSInt::getMaxValue(Sema.getWidth(), !Sema.isSigned()) >> 1); in CheckPaddedMax()
145 void CheckMin(const FixedPointSemantics &Sema) { in CheckMin() argument
146 ASSERT_EQ(APFixedPoint::getMin(Sema).getValue(), in CheckMin()
147 APSInt::getMinValue(Sema.getWidth(), !Sema.isSigned())); in CheckMin()
194 void CheckIntPart(const FixedPointSemantics &Sema, int64_t IntPart) { in CheckIntPart() argument
195 unsigned Scale = Sema.getScale(); in CheckIntPart()
198 APFixedPoint ValWithFract(APInt(Sema.getWidth(), in CheckIntPart()
200 Sema.isSigned()), in CheckIntPart()
201 Sema); in CheckIntPart()
206 APInt(Sema.getWidth(), (1ULL << (Scale - 1)), Sema.isSigned()), Sema); in CheckIntPart()
211 APInt(Sema.getWidth(), (IntPart << Scale), Sema.isSigned()), Sema); in CheckIntPart()
215 if (Sema.isSigned()) { in CheckIntPart()
217 APInt(Sema.getWidth(), (IntPart << Scale), Sema.isSigned()), Sema); in CheckIntPart()
222 void CheckIntPartMin(const FixedPointSemantics &Sema, int64_t Expected) { in CheckIntPartMin() argument
223 ASSERT_EQ(APFixedPoint::getMin(Sema).getIntPart(), Expected); in CheckIntPartMin()
226 void CheckIntPartMax(const FixedPointSemantics &Sema, uint64_t Expected) { in CheckIntPartMax() argument
227 ASSERT_EQ(APFixedPoint::getMax(Sema).getIntPart(), Expected); in CheckIntPartMax()
648 void CheckFloatToFixedConversion(APFloat &Val, const FixedPointSemantics &Sema, in CheckFloatToFixedConversion() argument
651 ASSERT_EQ(APFixedPoint::getFromFloatValue(Val, Sema, &Ovf).getValue(), in CheckFloatToFixedConversion()
655 APFixedPoint::getFromFloatValue(Val, Saturated(Sema), &Ovf).getValue(), in CheckFloatToFixedConversion()
660 void CheckFloatToFixedConversion(APFloat &Val, const FixedPointSemantics &Sema, in CheckFloatToFixedConversion() argument
663 (void)APFixedPoint::getFromFloatValue(Val, Sema, &Ovf); in CheckFloatToFixedConversion()
666 APFixedPoint::getFromFloatValue(Val, Saturated(Sema), &Ovf).getValue(), in CheckFloatToFixedConversion()
667 (ExpectedOvf == MinSat ? APFixedPoint::getMin(Sema) in CheckFloatToFixedConversion()
668 : APFixedPoint::getMax(Sema)) in CheckFloatToFixedConversion()
824 void CheckFixedToFloatConversion(int64_t Val, const FixedPointSemantics &Sema, in CheckFixedToFloatConversion() argument
826 APFixedPoint FXVal(Val, Sema); in CheckFixedToFloatConversion()
831 void CheckFixedToHalfConversion(int64_t Val, const FixedPointSemantics &Sema, in CheckFixedToHalfConversion() argument
833 APFixedPoint FXVal(Val, Sema); in CheckFixedToHalfConversion()