Lines Matching refs:Result
185 APSInt Result; in add() local
187 Result = CommonFXSema.isSigned() ? ThisVal.sadd_sat(OtherVal) in add()
190 Result = ThisVal.isSigned() ? ThisVal.sadd_ov(OtherVal, Overflowed) in add()
197 return APFixedPoint(Result, CommonFXSema); in add()
209 APSInt Result; in sub() local
211 Result = CommonFXSema.isSigned() ? ThisVal.ssub_sat(OtherVal) in sub()
214 Result = ThisVal.isSigned() ? ThisVal.ssub_ov(OtherVal, Overflowed) in sub()
221 return APFixedPoint(Result, CommonFXSema); in sub()
250 APSInt Result; in mul() local
252 Result = ThisVal.smul_ov(OtherVal, Overflowed) in mul()
255 Result = ThisVal.umul_ov(OtherVal, Overflowed) in mul()
258 Result.setIsSigned(CommonFXSema.isSigned()); in mul()
267 if (Result < Min) in mul()
268 Result = Min; in mul()
269 else if (Result > Max) in mul()
270 Result = Max; in mul()
272 Overflowed = Result < Min || Result > Max; in mul()
277 return APFixedPoint(Result.sextOrTrunc(CommonFXSema.getWidth()), in mul()
303 APSInt Result; in div() local
306 APInt::sdivrem(ThisVal, OtherVal, Result, Rem); in div()
310 Result = Result - 1; in div()
312 Result = ThisVal.udiv(OtherVal); in div()
313 Result.setIsSigned(CommonFXSema.isSigned()); in div()
322 if (Result < Min) in div()
323 Result = Min; in div()
324 else if (Result > Max) in div()
325 Result = Max; in div()
327 Overflowed = Result < Min || Result > Max; in div()
332 return APFixedPoint(Result.sextOrTrunc(CommonFXSema.getWidth()), in div()
349 APSInt Result = ThisVal << Amt; in shl() local
350 Result.setIsSigned(Sema.isSigned()); in shl()
357 if (Result < Min) in shl()
358 Result = Min; in shl()
359 else if (Result > Max) in shl()
360 Result = Max; in shl()
362 Overflowed = Result < Min || Result > Max; in shl()
367 return APFixedPoint(Result.sextOrTrunc(Sema.getWidth()), Sema); in shl()
417 APSInt Result = getIntPart(); in convertToInt() local
424 Result = Result.extend(DstWidth); in convertToInt()
431 if (Result.isSigned() && !DstSign) { in convertToInt()
432 *Overflow = Result.isNegative() || Result.ugt(DstMax); in convertToInt()
433 } else if (Result.isUnsigned() && DstSign) { in convertToInt()
434 *Overflow = Result.ugt(DstMax); in convertToInt()
436 *Overflow = Result < DstMin || Result > DstMax; in convertToInt()
440 Result.setIsSigned(DstSign); in convertToInt()
441 return Result.extOrTrunc(DstWidth); in convertToInt()