Lines Matching refs:Src1

52      Dest.TY##Val = Src1.TY##Val OP Src2.TY##Val; \
55 static void executeFAddInst(GenericValue &Dest, GenericValue Src1, in executeFAddInst() argument
66 static void executeFSubInst(GenericValue &Dest, GenericValue Src1, in executeFSubInst() argument
77 static void executeFMulInst(GenericValue &Dest, GenericValue Src1, in executeFMulInst() argument
88 static void executeFDivInst(GenericValue &Dest, GenericValue Src1, in executeFDivInst() argument
99 static void executeFRemInst(GenericValue &Dest, GenericValue Src1, in executeFRemInst() argument
103 Dest.FloatVal = fmod(Src1.FloatVal, Src2.FloatVal); in executeFRemInst()
106 Dest.DoubleVal = fmod(Src1.DoubleVal, Src2.DoubleVal); in executeFRemInst()
116 Dest.IntVal = APInt(1,Src1.IntVal.OP(Src2.IntVal)); \
121 assert(Src1.AggregateVal.size() == Src2.AggregateVal.size()); \
122 Dest.AggregateVal.resize( Src1.AggregateVal.size() ); \
123 for( uint32_t _i=0;_i<Src1.AggregateVal.size();_i++) \
125 Src1.AggregateVal[_i].IntVal.OP(Src2.AggregateVal[_i].IntVal));\
134 Dest.IntVal = APInt(1,(void*)(intptr_t)Src1.PointerVal OP \
138 static GenericValue executeICMP_EQ(GenericValue Src1, GenericValue Src2, in executeICMP_EQ() argument
152 static GenericValue executeICMP_NE(GenericValue Src1, GenericValue Src2, in executeICMP_NE() argument
166 static GenericValue executeICMP_ULT(GenericValue Src1, GenericValue Src2, in executeICMP_ULT() argument
180 static GenericValue executeICMP_SLT(GenericValue Src1, GenericValue Src2, in executeICMP_SLT() argument
194 static GenericValue executeICMP_UGT(GenericValue Src1, GenericValue Src2, in executeICMP_UGT() argument
208 static GenericValue executeICMP_SGT(GenericValue Src1, GenericValue Src2, in executeICMP_SGT() argument
222 static GenericValue executeICMP_ULE(GenericValue Src1, GenericValue Src2, in executeICMP_ULE() argument
236 static GenericValue executeICMP_SLE(GenericValue Src1, GenericValue Src2, in executeICMP_SLE() argument
250 static GenericValue executeICMP_UGE(GenericValue Src1, GenericValue Src2, in executeICMP_UGE() argument
264 static GenericValue executeICMP_SGE(GenericValue Src1, GenericValue Src2, in executeICMP_SGE() argument
281 GenericValue Src1 = getOperandValue(I.getOperand(0), SF); in visitICmpInst() local
286 case ICmpInst::ICMP_EQ: R = executeICMP_EQ(Src1, Src2, Ty); break; in visitICmpInst()
287 case ICmpInst::ICMP_NE: R = executeICMP_NE(Src1, Src2, Ty); break; in visitICmpInst()
288 case ICmpInst::ICMP_ULT: R = executeICMP_ULT(Src1, Src2, Ty); break; in visitICmpInst()
289 case ICmpInst::ICMP_SLT: R = executeICMP_SLT(Src1, Src2, Ty); break; in visitICmpInst()
290 case ICmpInst::ICMP_UGT: R = executeICMP_UGT(Src1, Src2, Ty); break; in visitICmpInst()
291 case ICmpInst::ICMP_SGT: R = executeICMP_SGT(Src1, Src2, Ty); break; in visitICmpInst()
292 case ICmpInst::ICMP_ULE: R = executeICMP_ULE(Src1, Src2, Ty); break; in visitICmpInst()
293 case ICmpInst::ICMP_SLE: R = executeICMP_SLE(Src1, Src2, Ty); break; in visitICmpInst()
294 case ICmpInst::ICMP_UGE: R = executeICMP_UGE(Src1, Src2, Ty); break; in visitICmpInst()
295 case ICmpInst::ICMP_SGE: R = executeICMP_SGE(Src1, Src2, Ty); break; in visitICmpInst()
306 Dest.IntVal = APInt(1,Src1.TY##Val OP Src2.TY##Val); \
310 assert(Src1.AggregateVal.size() == Src2.AggregateVal.size()); \
311 Dest.AggregateVal.resize( Src1.AggregateVal.size() ); \
312 for( uint32_t _i=0;_i<Src1.AggregateVal.size();_i++) \
314 Src1.AggregateVal[_i].TY##Val OP Src2.AggregateVal[_i].TY##Val);\
325 static GenericValue executeFCMP_OEQ(GenericValue Src1, GenericValue Src2, in executeFCMP_OEQ() argument
375 static GenericValue executeFCMP_ONE(GenericValue Src1, GenericValue Src2, in executeFCMP_ONE() argument
380 IMPLEMENT_SCALAR_NANS(Ty, Src1, Src2) in executeFCMP_ONE()
382 MASK_VECTOR_NANS(Ty, Src1, Src2, false) in executeFCMP_ONE()
394 for( size_t _i=0; _i<Src1.AggregateVal.size(); _i++) in executeFCMP_ONE()
401 static GenericValue executeFCMP_OLE(GenericValue Src1, GenericValue Src2, in executeFCMP_OLE() argument
415 static GenericValue executeFCMP_OGE(GenericValue Src1, GenericValue Src2, in executeFCMP_OGE() argument
429 static GenericValue executeFCMP_OLT(GenericValue Src1, GenericValue Src2, in executeFCMP_OLT() argument
443 static GenericValue executeFCMP_OGT(GenericValue Src1, GenericValue Src2, in executeFCMP_OGT() argument
471 Dest = FUNC(Src1, Src2, Ty); \
472 for (size_t _i = 0; _i < Src1.AggregateVal.size(); _i++) \
478 static GenericValue executeFCMP_UEQ(GenericValue Src1, GenericValue Src2, in executeFCMP_UEQ() argument
481 IMPLEMENT_UNORDERED(Ty, Src1, Src2) in executeFCMP_UEQ()
482 MASK_VECTOR_NANS(Ty, Src1, Src2, true) in executeFCMP_UEQ()
483 IMPLEMENT_VECTOR_UNORDERED(Ty, Src1, Src2, executeFCMP_OEQ) in executeFCMP_UEQ()
484 return executeFCMP_OEQ(Src1, Src2, Ty); in executeFCMP_UEQ()
488 static GenericValue executeFCMP_UNE(GenericValue Src1, GenericValue Src2, in executeFCMP_UNE() argument
491 IMPLEMENT_UNORDERED(Ty, Src1, Src2) in executeFCMP_UNE()
492 MASK_VECTOR_NANS(Ty, Src1, Src2, true) in executeFCMP_UNE()
493 IMPLEMENT_VECTOR_UNORDERED(Ty, Src1, Src2, executeFCMP_ONE) in executeFCMP_UNE()
494 return executeFCMP_ONE(Src1, Src2, Ty); in executeFCMP_UNE()
497 static GenericValue executeFCMP_ULE(GenericValue Src1, GenericValue Src2, in executeFCMP_ULE() argument
500 IMPLEMENT_UNORDERED(Ty, Src1, Src2) in executeFCMP_ULE()
501 MASK_VECTOR_NANS(Ty, Src1, Src2, true) in executeFCMP_ULE()
502 IMPLEMENT_VECTOR_UNORDERED(Ty, Src1, Src2, executeFCMP_OLE) in executeFCMP_ULE()
503 return executeFCMP_OLE(Src1, Src2, Ty); in executeFCMP_ULE()
506 static GenericValue executeFCMP_UGE(GenericValue Src1, GenericValue Src2, in executeFCMP_UGE() argument
509 IMPLEMENT_UNORDERED(Ty, Src1, Src2) in executeFCMP_UGE()
510 MASK_VECTOR_NANS(Ty, Src1, Src2, true) in executeFCMP_UGE()
511 IMPLEMENT_VECTOR_UNORDERED(Ty, Src1, Src2, executeFCMP_OGE) in executeFCMP_UGE()
512 return executeFCMP_OGE(Src1, Src2, Ty); in executeFCMP_UGE()
515 static GenericValue executeFCMP_ULT(GenericValue Src1, GenericValue Src2, in executeFCMP_ULT() argument
518 IMPLEMENT_UNORDERED(Ty, Src1, Src2) in executeFCMP_ULT()
519 MASK_VECTOR_NANS(Ty, Src1, Src2, true) in executeFCMP_ULT()
520 IMPLEMENT_VECTOR_UNORDERED(Ty, Src1, Src2, executeFCMP_OLT) in executeFCMP_ULT()
521 return executeFCMP_OLT(Src1, Src2, Ty); in executeFCMP_ULT()
524 static GenericValue executeFCMP_UGT(GenericValue Src1, GenericValue Src2, in executeFCMP_UGT() argument
527 IMPLEMENT_UNORDERED(Ty, Src1, Src2) in executeFCMP_UGT()
528 MASK_VECTOR_NANS(Ty, Src1, Src2, true) in executeFCMP_UGT()
529 IMPLEMENT_VECTOR_UNORDERED(Ty, Src1, Src2, executeFCMP_OGT) in executeFCMP_UGT()
530 return executeFCMP_OGT(Src1, Src2, Ty); in executeFCMP_UGT()
533 static GenericValue executeFCMP_ORD(GenericValue Src1, GenericValue Src2, in executeFCMP_ORD() argument
537 assert(Src1.AggregateVal.size() == Src2.AggregateVal.size()); in executeFCMP_ORD()
538 Dest.AggregateVal.resize( Src1.AggregateVal.size() ); in executeFCMP_ORD()
540 for( size_t _i=0;_i<Src1.AggregateVal.size();_i++) in executeFCMP_ORD()
542 ( (Src1.AggregateVal[_i].FloatVal == in executeFCMP_ORD()
543 Src1.AggregateVal[_i].FloatVal) && in executeFCMP_ORD()
547 for( size_t _i=0;_i<Src1.AggregateVal.size();_i++) in executeFCMP_ORD()
549 ( (Src1.AggregateVal[_i].DoubleVal == in executeFCMP_ORD()
550 Src1.AggregateVal[_i].DoubleVal) && in executeFCMP_ORD()
555 Dest.IntVal = APInt(1,(Src1.FloatVal == Src1.FloatVal && in executeFCMP_ORD()
558 Dest.IntVal = APInt(1,(Src1.DoubleVal == Src1.DoubleVal && in executeFCMP_ORD()
564 static GenericValue executeFCMP_UNO(GenericValue Src1, GenericValue Src2, in executeFCMP_UNO() argument
568 assert(Src1.AggregateVal.size() == Src2.AggregateVal.size()); in executeFCMP_UNO()
569 Dest.AggregateVal.resize( Src1.AggregateVal.size() ); in executeFCMP_UNO()
571 for( size_t _i=0;_i<Src1.AggregateVal.size();_i++) in executeFCMP_UNO()
573 ( (Src1.AggregateVal[_i].FloatVal != in executeFCMP_UNO()
574 Src1.AggregateVal[_i].FloatVal) || in executeFCMP_UNO()
578 for( size_t _i=0;_i<Src1.AggregateVal.size();_i++) in executeFCMP_UNO()
580 ( (Src1.AggregateVal[_i].DoubleVal != in executeFCMP_UNO()
581 Src1.AggregateVal[_i].DoubleVal) || in executeFCMP_UNO()
586 Dest.IntVal = APInt(1,(Src1.FloatVal != Src1.FloatVal || in executeFCMP_UNO()
589 Dest.IntVal = APInt(1,(Src1.DoubleVal != Src1.DoubleVal || in executeFCMP_UNO()
595 static GenericValue executeFCMP_BOOL(GenericValue Src1, GenericValue Src2, in executeFCMP_BOOL() argument
599 assert(Src1.AggregateVal.size() == Src2.AggregateVal.size()); in executeFCMP_BOOL()
600 Dest.AggregateVal.resize( Src1.AggregateVal.size() ); in executeFCMP_BOOL()
601 for( size_t _i=0; _i<Src1.AggregateVal.size(); _i++) in executeFCMP_BOOL()
613 GenericValue Src1 = getOperandValue(I.getOperand(0), SF); in visitFCmpInst() local
622 case FCmpInst::FCMP_FALSE: R = executeFCMP_BOOL(Src1, Src2, Ty, false); in visitFCmpInst()
624 case FCmpInst::FCMP_TRUE: R = executeFCMP_BOOL(Src1, Src2, Ty, true); in visitFCmpInst()
626 case FCmpInst::FCMP_ORD: R = executeFCMP_ORD(Src1, Src2, Ty); break; in visitFCmpInst()
627 case FCmpInst::FCMP_UNO: R = executeFCMP_UNO(Src1, Src2, Ty); break; in visitFCmpInst()
628 case FCmpInst::FCMP_UEQ: R = executeFCMP_UEQ(Src1, Src2, Ty); break; in visitFCmpInst()
629 case FCmpInst::FCMP_OEQ: R = executeFCMP_OEQ(Src1, Src2, Ty); break; in visitFCmpInst()
630 case FCmpInst::FCMP_UNE: R = executeFCMP_UNE(Src1, Src2, Ty); break; in visitFCmpInst()
631 case FCmpInst::FCMP_ONE: R = executeFCMP_ONE(Src1, Src2, Ty); break; in visitFCmpInst()
632 case FCmpInst::FCMP_ULT: R = executeFCMP_ULT(Src1, Src2, Ty); break; in visitFCmpInst()
633 case FCmpInst::FCMP_OLT: R = executeFCMP_OLT(Src1, Src2, Ty); break; in visitFCmpInst()
634 case FCmpInst::FCMP_UGT: R = executeFCMP_UGT(Src1, Src2, Ty); break; in visitFCmpInst()
635 case FCmpInst::FCMP_OGT: R = executeFCMP_OGT(Src1, Src2, Ty); break; in visitFCmpInst()
636 case FCmpInst::FCMP_ULE: R = executeFCMP_ULE(Src1, Src2, Ty); break; in visitFCmpInst()
637 case FCmpInst::FCMP_OLE: R = executeFCMP_OLE(Src1, Src2, Ty); break; in visitFCmpInst()
638 case FCmpInst::FCMP_UGE: R = executeFCMP_UGE(Src1, Src2, Ty); break; in visitFCmpInst()
639 case FCmpInst::FCMP_OGE: R = executeFCMP_OGE(Src1, Src2, Ty); break; in visitFCmpInst()
645 static GenericValue executeCmpInst(unsigned predicate, GenericValue Src1, in executeCmpInst() argument
649 case ICmpInst::ICMP_EQ: return executeICMP_EQ(Src1, Src2, Ty); in executeCmpInst()
650 case ICmpInst::ICMP_NE: return executeICMP_NE(Src1, Src2, Ty); in executeCmpInst()
651 case ICmpInst::ICMP_UGT: return executeICMP_UGT(Src1, Src2, Ty); in executeCmpInst()
652 case ICmpInst::ICMP_SGT: return executeICMP_SGT(Src1, Src2, Ty); in executeCmpInst()
653 case ICmpInst::ICMP_ULT: return executeICMP_ULT(Src1, Src2, Ty); in executeCmpInst()
654 case ICmpInst::ICMP_SLT: return executeICMP_SLT(Src1, Src2, Ty); in executeCmpInst()
655 case ICmpInst::ICMP_UGE: return executeICMP_UGE(Src1, Src2, Ty); in executeCmpInst()
656 case ICmpInst::ICMP_SGE: return executeICMP_SGE(Src1, Src2, Ty); in executeCmpInst()
657 case ICmpInst::ICMP_ULE: return executeICMP_ULE(Src1, Src2, Ty); in executeCmpInst()
658 case ICmpInst::ICMP_SLE: return executeICMP_SLE(Src1, Src2, Ty); in executeCmpInst()
659 case FCmpInst::FCMP_ORD: return executeFCMP_ORD(Src1, Src2, Ty); in executeCmpInst()
660 case FCmpInst::FCMP_UNO: return executeFCMP_UNO(Src1, Src2, Ty); in executeCmpInst()
661 case FCmpInst::FCMP_OEQ: return executeFCMP_OEQ(Src1, Src2, Ty); in executeCmpInst()
662 case FCmpInst::FCMP_UEQ: return executeFCMP_UEQ(Src1, Src2, Ty); in executeCmpInst()
663 case FCmpInst::FCMP_ONE: return executeFCMP_ONE(Src1, Src2, Ty); in executeCmpInst()
664 case FCmpInst::FCMP_UNE: return executeFCMP_UNE(Src1, Src2, Ty); in executeCmpInst()
665 case FCmpInst::FCMP_OLT: return executeFCMP_OLT(Src1, Src2, Ty); in executeCmpInst()
666 case FCmpInst::FCMP_ULT: return executeFCMP_ULT(Src1, Src2, Ty); in executeCmpInst()
667 case FCmpInst::FCMP_OGT: return executeFCMP_OGT(Src1, Src2, Ty); in executeCmpInst()
668 case FCmpInst::FCMP_UGT: return executeFCMP_UGT(Src1, Src2, Ty); in executeCmpInst()
669 case FCmpInst::FCMP_OLE: return executeFCMP_OLE(Src1, Src2, Ty); in executeCmpInst()
670 case FCmpInst::FCMP_ULE: return executeFCMP_ULE(Src1, Src2, Ty); in executeCmpInst()
671 case FCmpInst::FCMP_OGE: return executeFCMP_OGE(Src1, Src2, Ty); in executeCmpInst()
672 case FCmpInst::FCMP_UGE: return executeFCMP_UGE(Src1, Src2, Ty); in executeCmpInst()
673 case FCmpInst::FCMP_FALSE: return executeFCMP_BOOL(Src1, Src2, Ty, false); in executeCmpInst()
674 case FCmpInst::FCMP_TRUE: return executeFCMP_BOOL(Src1, Src2, Ty, true); in executeCmpInst()
684 GenericValue Src1 = getOperandValue(I.getOperand(0), SF); in visitBinaryOperator() local
690 assert(Src1.AggregateVal.size() == Src2.AggregateVal.size()); in visitBinaryOperator()
691 R.AggregateVal.resize(Src1.AggregateVal.size()); in visitBinaryOperator()
697 Src1.AggregateVal[i].IntVal OP Src2.AggregateVal[i].IntVal; in visitBinaryOperator()
704 Src1.AggregateVal[i].IntVal.OP(Src2.AggregateVal[i].IntVal); in visitBinaryOperator()
711 Src1.AggregateVal[i].TY OP Src2.AggregateVal[i].TY; in visitBinaryOperator()
751 fmod(Src1.AggregateVal[i].FloatVal, Src2.AggregateVal[i].FloatVal); in visitBinaryOperator()
756 fmod(Src1.AggregateVal[i].DoubleVal, Src2.AggregateVal[i].DoubleVal); in visitBinaryOperator()
770 case Instruction::Add: R.IntVal = Src1.IntVal + Src2.IntVal; break; in visitBinaryOperator()
771 case Instruction::Sub: R.IntVal = Src1.IntVal - Src2.IntVal; break; in visitBinaryOperator()
772 case Instruction::Mul: R.IntVal = Src1.IntVal * Src2.IntVal; break; in visitBinaryOperator()
773 case Instruction::FAdd: executeFAddInst(R, Src1, Src2, Ty); break; in visitBinaryOperator()
774 case Instruction::FSub: executeFSubInst(R, Src1, Src2, Ty); break; in visitBinaryOperator()
775 case Instruction::FMul: executeFMulInst(R, Src1, Src2, Ty); break; in visitBinaryOperator()
776 case Instruction::FDiv: executeFDivInst(R, Src1, Src2, Ty); break; in visitBinaryOperator()
777 case Instruction::FRem: executeFRemInst(R, Src1, Src2, Ty); break; in visitBinaryOperator()
778 case Instruction::UDiv: R.IntVal = Src1.IntVal.udiv(Src2.IntVal); break; in visitBinaryOperator()
779 case Instruction::SDiv: R.IntVal = Src1.IntVal.sdiv(Src2.IntVal); break; in visitBinaryOperator()
780 case Instruction::URem: R.IntVal = Src1.IntVal.urem(Src2.IntVal); break; in visitBinaryOperator()
781 case Instruction::SRem: R.IntVal = Src1.IntVal.srem(Src2.IntVal); break; in visitBinaryOperator()
782 case Instruction::And: R.IntVal = Src1.IntVal & Src2.IntVal; break; in visitBinaryOperator()
783 case Instruction::Or: R.IntVal = Src1.IntVal | Src2.IntVal; break; in visitBinaryOperator()
784 case Instruction::Xor: R.IntVal = Src1.IntVal ^ Src2.IntVal; break; in visitBinaryOperator()
790 static GenericValue executeSelectInst(GenericValue Src1, GenericValue Src2, in executeSelectInst() argument
794 assert(Src1.AggregateVal.size() == Src2.AggregateVal.size()); in executeSelectInst()
796 Dest.AggregateVal.resize( Src1.AggregateVal.size() ); in executeSelectInst()
797 for (size_t i = 0; i < Src1.AggregateVal.size(); ++i) in executeSelectInst()
798 Dest.AggregateVal[i] = (Src1.AggregateVal[i].IntVal == 0) ? in executeSelectInst()
801 Dest = (Src1.IntVal == 0) ? Src3 : Src2; in executeSelectInst()
809 GenericValue Src1 = getOperandValue(I.getOperand(0), SF); in visitSelectInst() local
812 GenericValue R = executeSelectInst(Src1, Src2, Src3, Ty); in visitSelectInst()
1139 GenericValue Src1 = getOperandValue(I.getOperand(0), SF); in visitShl() local
1145 uint32_t src1Size = uint32_t(Src1.AggregateVal.size()); in visitShl()
1150 llvm::APInt valueToShift = Src1.AggregateVal[i].IntVal; in visitShl()
1157 llvm::APInt valueToShift = Src1.IntVal; in visitShl()
1166 GenericValue Src1 = getOperandValue(I.getOperand(0), SF); in visitLShr() local
1172 uint32_t src1Size = uint32_t(Src1.AggregateVal.size()); in visitLShr()
1177 llvm::APInt valueToShift = Src1.AggregateVal[i].IntVal; in visitLShr()
1184 llvm::APInt valueToShift = Src1.IntVal; in visitLShr()
1193 GenericValue Src1 = getOperandValue(I.getOperand(0), SF); in visitAShr() local
1199 size_t src1Size = Src1.AggregateVal.size(); in visitAShr()
1204 llvm::APInt valueToShift = Src1.AggregateVal[i].IntVal; in visitAShr()
1211 llvm::APInt valueToShift = Src1.IntVal; in visitAShr()
1749 GenericValue Src1 = getOperandValue(I.getOperand(0), SF); in visitExtractElementInst() local
1756 if(Src1.AggregateVal.size() > indx) { in visitExtractElementInst()
1764 Dest.IntVal = Src1.AggregateVal[indx].IntVal; in visitExtractElementInst()
1767 Dest.FloatVal = Src1.AggregateVal[indx].FloatVal; in visitExtractElementInst()
1770 Dest.DoubleVal = Src1.AggregateVal[indx].DoubleVal; in visitExtractElementInst()
1787 GenericValue Src1 = getOperandValue(I.getOperand(0), SF); in visitInsertElementInst() local
1795 Dest.AggregateVal = Src1.AggregateVal; in visitInsertElementInst()
1797 if(Src1.AggregateVal.size() <= indx) in visitInsertElementInst()
1822 GenericValue Src1 = getOperandValue(I.getOperand(0), SF); in visitShuffleVectorInst() local
1832 unsigned src1Size = (unsigned)Src1.AggregateVal.size(); in visitShuffleVectorInst()
1846 Dest.AggregateVal[i].IntVal = Src1.AggregateVal[j].IntVal; in visitShuffleVectorInst()
1862 Dest.AggregateVal[i].FloatVal = Src1.AggregateVal[j].FloatVal; in visitShuffleVectorInst()
1873 Dest.AggregateVal[i].DoubleVal = Src1.AggregateVal[j].DoubleVal; in visitShuffleVectorInst()
1932 GenericValue Src1 = getOperandValue(Agg, SF); in visitInsertValueInst() local
1934 GenericValue Dest = Src1; // Dest is a slightly changed Src1 in visitInsertValueInst()