Lines Matching refs:IntVal
409 GVArgc.IntVal = APInt(32, argv.size()); in runFunctionAsMain()
448 return runFunction(Fn, GVArgs).IntVal.getZExtValue(); in runFunctionAsMain()
587 Result.IntVal = APInt(C->getType()->getPrimitiveSizeInBits(), 0); in getConstantValue()
597 Result.AggregateVal[i].IntVal = in getConstantValue()
615 Result.AggregateVal[i].IntVal = in getConstantValue()
639 GV.IntVal = GV.IntVal.trunc(BitWidth); in getConstantValue()
645 GV.IntVal = GV.IntVal.zext(BitWidth); in getConstantValue()
651 GV.IntVal = GV.IntVal.sext(BitWidth); in getConstantValue()
669 GV.FloatVal = float(GV.IntVal.roundToDouble()); in getConstantValue()
671 GV.DoubleVal = GV.IntVal.roundToDouble(); in getConstantValue()
674 (void)apf.convertFromAPInt(GV.IntVal, in getConstantValue()
677 GV.IntVal = apf.bitcastToAPInt(); in getConstantValue()
684 GV.FloatVal = float(GV.IntVal.signedRoundToDouble()); in getConstantValue()
686 GV.DoubleVal = GV.IntVal.signedRoundToDouble(); in getConstantValue()
689 (void)apf.convertFromAPInt(GV.IntVal, in getConstantValue()
692 GV.IntVal = apf.bitcastToAPInt(); in getConstantValue()
701 GV.IntVal = APIntOps::RoundFloatToAPInt(GV.FloatVal, BitWidth); in getConstantValue()
703 GV.IntVal = APIntOps::RoundDoubleToAPInt(GV.DoubleVal, BitWidth); in getConstantValue()
705 APFloat apf = APFloat(APFloat::x87DoubleExtended, GV.IntVal); in getConstantValue()
711 GV.IntVal = v; // endian? in getConstantValue()
719 GV.IntVal = APInt(PtrWidth, uintptr_t(GV.PointerVal)); in getConstantValue()
721 GV.IntVal = GV.IntVal.zextOrTrunc(IntWidth); in getConstantValue()
727 GV.IntVal = GV.IntVal.zextOrTrunc(PtrWidth); in getConstantValue()
728 assert(GV.IntVal.getBitWidth() <= 64 && "Bad pointer width"); in getConstantValue()
729 GV.PointerVal = PointerTy(uintptr_t(GV.IntVal.getZExtValue())); in getConstantValue()
740 GV.FloatVal = GV.IntVal.bitsToFloat(); in getConstantValue()
742 GV.DoubleVal = GV.IntVal.bitsToDouble(); in getConstantValue()
746 GV.IntVal = APInt::floatToBits(GV.FloatVal); in getConstantValue()
750 GV.IntVal = APInt::doubleToBits(GV.DoubleVal); in getConstantValue()
779 case Instruction::Add: GV.IntVal = LHS.IntVal + RHS.IntVal; break; in getConstantValue()
780 case Instruction::Sub: GV.IntVal = LHS.IntVal - RHS.IntVal; break; in getConstantValue()
781 case Instruction::Mul: GV.IntVal = LHS.IntVal * RHS.IntVal; break; in getConstantValue()
782 case Instruction::UDiv:GV.IntVal = LHS.IntVal.udiv(RHS.IntVal); break; in getConstantValue()
783 case Instruction::SDiv:GV.IntVal = LHS.IntVal.sdiv(RHS.IntVal); break; in getConstantValue()
784 case Instruction::URem:GV.IntVal = LHS.IntVal.urem(RHS.IntVal); break; in getConstantValue()
785 case Instruction::SRem:GV.IntVal = LHS.IntVal.srem(RHS.IntVal); break; in getConstantValue()
786 case Instruction::And: GV.IntVal = LHS.IntVal & RHS.IntVal; break; in getConstantValue()
787 case Instruction::Or: GV.IntVal = LHS.IntVal | RHS.IntVal; break; in getConstantValue()
788 case Instruction::Xor: GV.IntVal = LHS.IntVal ^ RHS.IntVal; break; in getConstantValue()
825 APFloat apfLHS = APFloat(Sem, LHS.IntVal); in getConstantValue()
829 apfLHS.add(APFloat(Sem, RHS.IntVal), APFloat::rmNearestTiesToEven); in getConstantValue()
830 GV.IntVal = apfLHS.bitcastToAPInt(); in getConstantValue()
833 apfLHS.subtract(APFloat(Sem, RHS.IntVal), in getConstantValue()
835 GV.IntVal = apfLHS.bitcastToAPInt(); in getConstantValue()
838 apfLHS.multiply(APFloat(Sem, RHS.IntVal), in getConstantValue()
840 GV.IntVal = apfLHS.bitcastToAPInt(); in getConstantValue()
843 apfLHS.divide(APFloat(Sem, RHS.IntVal), in getConstantValue()
845 GV.IntVal = apfLHS.bitcastToAPInt(); in getConstantValue()
848 apfLHS.mod(APFloat(Sem, RHS.IntVal), in getConstantValue()
850 GV.IntVal = apfLHS.bitcastToAPInt(); in getConstantValue()
880 Result.IntVal = cast <ConstantFP>(C)->getValueAPF().bitcastToAPInt(); in getConstantValue()
883 Result.IntVal = cast<ConstantInt>(C)->getValue(); in getConstantValue()
962 intZero.IntVal = APInt(ElemTy->getScalarSizeInBits(), 0ull); in getConstantValue()
970 Result.AggregateVal[i].IntVal = cast<ConstantInt>( in getConstantValue()
973 Result.AggregateVal[i].IntVal = in getConstantValue()
980 Result.AggregateVal[i].IntVal = APInt( in getConstantValue()
1002 static void StoreIntToMemory(const APInt &IntVal, uint8_t *Dst, in StoreIntToMemory() argument
1004 assert((IntVal.getBitWidth()+7)/8 >= StoreBytes && "Integer too small!"); in StoreIntToMemory()
1005 const uint8_t *Src = (const uint8_t *)IntVal.getRawData(); in StoreIntToMemory()
1035 StoreIntToMemory(Val.IntVal, (uint8_t*)Ptr, StoreBytes); in StoreValueToMemory()
1044 memcpy(Ptr, Val.IntVal.getRawData(), 10); in StoreValueToMemory()
1060 unsigned numOfBytes =(Val.AggregateVal[i].IntVal.getBitWidth()+7)/8; in StoreValueToMemory()
1061 StoreIntToMemory(Val.AggregateVal[i].IntVal, in StoreValueToMemory()
1075 static void LoadIntFromMemory(APInt &IntVal, uint8_t *Src, unsigned LoadBytes) { in LoadIntFromMemory() argument
1076 assert((IntVal.getBitWidth()+7)/8 >= LoadBytes && "Integer too small!"); in LoadIntFromMemory()
1078 const_cast<uint64_t *>(IntVal.getRawData())); in LoadIntFromMemory()
1110 Result.IntVal = APInt(cast<IntegerType>(Ty)->getBitWidth(), 0); in LoadValueFromMemory()
1111 LoadIntFromMemory(Result.IntVal, (uint8_t*)Ptr, LoadBytes); in LoadValueFromMemory()
1127 Result.IntVal = APInt(80, y); in LoadValueFromMemory()
1147 intZero.IntVal = APInt(elemBitWidth, 0); in LoadValueFromMemory()
1150 LoadIntFromMemory(Result.AggregateVal[i].IntVal, in LoadValueFromMemory()