• Home
  • Raw
  • Download

Lines Matching refs:LHS

57 static bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec,
457 static bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec, in EvaluateDirectiveSubExpr() argument
464 << LHS.getRange(); in EvaluateDirectiveSubExpr()
482 if (Operator == tok::ampamp && LHS.Val == 0) in EvaluateDirectiveSubExpr()
484 else if (Operator == tok::pipepipe && LHS.Val != 0) in EvaluateDirectiveSubExpr()
486 else if (Operator == tok::question && LHS.Val == 0) in EvaluateDirectiveSubExpr()
495 PPValue RHS(LHS.getBitWidth()); in EvaluateDirectiveSubExpr()
538 llvm::APSInt Res(LHS.getBitWidth()); in EvaluateDirectiveSubExpr()
548 Res.setIsUnsigned(LHS.isUnsigned()|RHS.isUnsigned()); in EvaluateDirectiveSubExpr()
552 if (!LHS.isUnsigned() && LHS.Val.isNegative()) in EvaluateDirectiveSubExpr()
554 << LHS.Val.toString(10, true) + " to " + in EvaluateDirectiveSubExpr()
555 LHS.Val.toString(10, false) in EvaluateDirectiveSubExpr()
556 << LHS.getRange() << RHS.getRange(); in EvaluateDirectiveSubExpr()
561 << LHS.getRange() << RHS.getRange(); in EvaluateDirectiveSubExpr()
563 LHS.Val.setIsUnsigned(Res.isUnsigned()); in EvaluateDirectiveSubExpr()
572 Res = LHS.Val % RHS.Val; in EvaluateDirectiveSubExpr()
575 << LHS.getRange() << RHS.getRange(); in EvaluateDirectiveSubExpr()
581 if (LHS.Val.isSigned()) in EvaluateDirectiveSubExpr()
582 Res = llvm::APSInt(LHS.Val.sdiv_ov(RHS.Val, Overflow), false); in EvaluateDirectiveSubExpr()
584 Res = LHS.Val / RHS.Val; in EvaluateDirectiveSubExpr()
587 << LHS.getRange() << RHS.getRange(); in EvaluateDirectiveSubExpr()
594 Res = llvm::APSInt(LHS.Val.smul_ov(RHS.Val, Overflow), false); in EvaluateDirectiveSubExpr()
596 Res = LHS.Val * RHS.Val; in EvaluateDirectiveSubExpr()
601 if (LHS.isUnsigned()) { in EvaluateDirectiveSubExpr()
602 Overflow = ShAmt >= LHS.Val.getBitWidth(); in EvaluateDirectiveSubExpr()
604 ShAmt = LHS.Val.getBitWidth()-1; in EvaluateDirectiveSubExpr()
605 Res = LHS.Val << ShAmt; in EvaluateDirectiveSubExpr()
607 Res = llvm::APSInt(LHS.Val.sshl_ov(ShAmt, Overflow), false); in EvaluateDirectiveSubExpr()
614 if (ShAmt >= LHS.getBitWidth()) in EvaluateDirectiveSubExpr()
615 Overflow = true, ShAmt = LHS.getBitWidth()-1; in EvaluateDirectiveSubExpr()
616 Res = LHS.Val >> ShAmt; in EvaluateDirectiveSubExpr()
620 if (LHS.isUnsigned()) in EvaluateDirectiveSubExpr()
621 Res = LHS.Val + RHS.Val; in EvaluateDirectiveSubExpr()
623 Res = llvm::APSInt(LHS.Val.sadd_ov(RHS.Val, Overflow), false); in EvaluateDirectiveSubExpr()
626 if (LHS.isUnsigned()) in EvaluateDirectiveSubExpr()
627 Res = LHS.Val - RHS.Val; in EvaluateDirectiveSubExpr()
629 Res = llvm::APSInt(LHS.Val.ssub_ov(RHS.Val, Overflow), false); in EvaluateDirectiveSubExpr()
632 Res = LHS.Val <= RHS.Val; in EvaluateDirectiveSubExpr()
636 Res = LHS.Val < RHS.Val; in EvaluateDirectiveSubExpr()
640 Res = LHS.Val >= RHS.Val; in EvaluateDirectiveSubExpr()
644 Res = LHS.Val > RHS.Val; in EvaluateDirectiveSubExpr()
648 Res = LHS.Val != RHS.Val; in EvaluateDirectiveSubExpr()
652 Res = LHS.Val == RHS.Val; in EvaluateDirectiveSubExpr()
656 Res = LHS.Val & RHS.Val; in EvaluateDirectiveSubExpr()
659 Res = LHS.Val ^ RHS.Val; in EvaluateDirectiveSubExpr()
662 Res = LHS.Val | RHS.Val; in EvaluateDirectiveSubExpr()
665 Res = (LHS.Val != 0 && RHS.Val != 0); in EvaluateDirectiveSubExpr()
669 Res = (LHS.Val != 0 || RHS.Val != 0); in EvaluateDirectiveSubExpr()
677 << LHS.getRange() << RHS.getRange(); in EvaluateDirectiveSubExpr()
684 << tok::colon << LHS.getRange() << RHS.getRange(); in EvaluateDirectiveSubExpr()
692 bool AfterColonLive = ValueLive && LHS.Val == 0; in EvaluateDirectiveSubExpr()
693 PPValue AfterColonVal(LHS.getBitWidth()); in EvaluateDirectiveSubExpr()
705 Res = LHS.Val != 0 ? RHS.Val : AfterColonVal.Val; in EvaluateDirectiveSubExpr()
719 << LHS.getRange() << RHS.getRange(); in EvaluateDirectiveSubExpr()
726 << LHS.getRange() << RHS.getRange(); in EvaluateDirectiveSubExpr()
729 LHS.Val = Res; in EvaluateDirectiveSubExpr()
730 LHS.setEnd(RHS.getRange().getEnd()); in EvaluateDirectiveSubExpr()