Lines Matching refs:Src2
50 Dest.TY##Val = Src1.TY##Val OP Src2.TY##Val; \
54 GenericValue Src2, Type *Ty) {
65 GenericValue Src2, Type *Ty) {
76 GenericValue Src2, Type *Ty) {
87 GenericValue Src2, Type *Ty) {
98 GenericValue Src2, Type *Ty) {
101 Dest.FloatVal = fmod(Src1.FloatVal, Src2.FloatVal);
104 Dest.DoubleVal = fmod(Src1.DoubleVal, Src2.DoubleVal);
114 Dest.IntVal = APInt(1,Src1.IntVal.OP(Src2.IntVal)); \
119 assert(Src1.AggregateVal.size() == Src2.AggregateVal.size()); \
123 Src1.AggregateVal[_i].IntVal.OP(Src2.AggregateVal[_i].IntVal));\
133 (void*)(intptr_t)Src2.PointerVal); \
136 static GenericValue executeICMP_EQ(GenericValue Src1, GenericValue Src2,
150 static GenericValue executeICMP_NE(GenericValue Src1, GenericValue Src2,
164 static GenericValue executeICMP_ULT(GenericValue Src1, GenericValue Src2,
178 static GenericValue executeICMP_SLT(GenericValue Src1, GenericValue Src2,
192 static GenericValue executeICMP_UGT(GenericValue Src1, GenericValue Src2,
206 static GenericValue executeICMP_SGT(GenericValue Src1, GenericValue Src2,
220 static GenericValue executeICMP_ULE(GenericValue Src1, GenericValue Src2,
234 static GenericValue executeICMP_SLE(GenericValue Src1, GenericValue Src2,
248 static GenericValue executeICMP_UGE(GenericValue Src1, GenericValue Src2,
262 static GenericValue executeICMP_SGE(GenericValue Src1, GenericValue Src2,
280 GenericValue Src2 = getOperandValue(I.getOperand(1), SF);
284 case ICmpInst::ICMP_EQ: R = executeICMP_EQ(Src1, Src2, Ty); break;
285 case ICmpInst::ICMP_NE: R = executeICMP_NE(Src1, Src2, Ty); break;
286 case ICmpInst::ICMP_ULT: R = executeICMP_ULT(Src1, Src2, Ty); break;
287 case ICmpInst::ICMP_SLT: R = executeICMP_SLT(Src1, Src2, Ty); break;
288 case ICmpInst::ICMP_UGT: R = executeICMP_UGT(Src1, Src2, Ty); break;
289 case ICmpInst::ICMP_SGT: R = executeICMP_SGT(Src1, Src2, Ty); break;
290 case ICmpInst::ICMP_ULE: R = executeICMP_ULE(Src1, Src2, Ty); break;
291 case ICmpInst::ICMP_SLE: R = executeICMP_SLE(Src1, Src2, Ty); break;
292 case ICmpInst::ICMP_UGE: R = executeICMP_UGE(Src1, Src2, Ty); break;
293 case ICmpInst::ICMP_SGE: R = executeICMP_SGE(Src1, Src2, Ty); break;
304 Dest.IntVal = APInt(1,Src1.TY##Val OP Src2.TY##Val); \
308 assert(Src1.AggregateVal.size() == Src2.AggregateVal.size()); \
312 Src1.AggregateVal[_i].TY##Val OP Src2.AggregateVal[_i].TY##Val);\
323 static GenericValue executeFCMP_OEQ(GenericValue Src1, GenericValue Src2,
373 static GenericValue executeFCMP_ONE(GenericValue Src1, GenericValue Src2,
377 // if input is scalar value and Src1 or Src2 is NaN return false
378 IMPLEMENT_SCALAR_NANS(Ty, Src1, Src2)
380 MASK_VECTOR_NANS(Ty, Src1, Src2, false)
399 static GenericValue executeFCMP_OLE(GenericValue Src1, GenericValue Src2,
413 static GenericValue executeFCMP_OGE(GenericValue Src1, GenericValue Src2,
427 static GenericValue executeFCMP_OLT(GenericValue Src1, GenericValue Src2,
441 static GenericValue executeFCMP_OGT(GenericValue Src1, GenericValue Src2,
469 Dest = _FUNC(Src1, Src2, Ty); \
476 static GenericValue executeFCMP_UEQ(GenericValue Src1, GenericValue Src2,
479 IMPLEMENT_UNORDERED(Ty, Src1, Src2)
480 MASK_VECTOR_NANS(Ty, Src1, Src2, true)
481 IMPLEMENT_VECTOR_UNORDERED(Ty, Src1, Src2, executeFCMP_OEQ)
482 return executeFCMP_OEQ(Src1, Src2, Ty);
486 static GenericValue executeFCMP_UNE(GenericValue Src1, GenericValue Src2,
489 IMPLEMENT_UNORDERED(Ty, Src1, Src2)
490 MASK_VECTOR_NANS(Ty, Src1, Src2, true)
491 IMPLEMENT_VECTOR_UNORDERED(Ty, Src1, Src2, executeFCMP_ONE)
492 return executeFCMP_ONE(Src1, Src2, Ty);
495 static GenericValue executeFCMP_ULE(GenericValue Src1, GenericValue Src2,
498 IMPLEMENT_UNORDERED(Ty, Src1, Src2)
499 MASK_VECTOR_NANS(Ty, Src1, Src2, true)
500 IMPLEMENT_VECTOR_UNORDERED(Ty, Src1, Src2, executeFCMP_OLE)
501 return executeFCMP_OLE(Src1, Src2, Ty);
504 static GenericValue executeFCMP_UGE(GenericValue Src1, GenericValue Src2,
507 IMPLEMENT_UNORDERED(Ty, Src1, Src2)
508 MASK_VECTOR_NANS(Ty, Src1, Src2, true)
509 IMPLEMENT_VECTOR_UNORDERED(Ty, Src1, Src2, executeFCMP_OGE)
510 return executeFCMP_OGE(Src1, Src2, Ty);
513 static GenericValue executeFCMP_ULT(GenericValue Src1, GenericValue Src2,
516 IMPLEMENT_UNORDERED(Ty, Src1, Src2)
517 MASK_VECTOR_NANS(Ty, Src1, Src2, true)
518 IMPLEMENT_VECTOR_UNORDERED(Ty, Src1, Src2, executeFCMP_OLT)
519 return executeFCMP_OLT(Src1, Src2, Ty);
522 static GenericValue executeFCMP_UGT(GenericValue Src1, GenericValue Src2,
525 IMPLEMENT_UNORDERED(Ty, Src1, Src2)
526 MASK_VECTOR_NANS(Ty, Src1, Src2, true)
527 IMPLEMENT_VECTOR_UNORDERED(Ty, Src1, Src2, executeFCMP_OGT)
528 return executeFCMP_OGT(Src1, Src2, Ty);
531 static GenericValue executeFCMP_ORD(GenericValue Src1, GenericValue Src2,
535 assert(Src1.AggregateVal.size() == Src2.AggregateVal.size());
542 (Src2.AggregateVal[_i].FloatVal ==
543 Src2.AggregateVal[_i].FloatVal)));
549 (Src2.AggregateVal[_i].DoubleVal ==
550 Src2.AggregateVal[_i].DoubleVal)));
554 Src2.FloatVal == Src2.FloatVal));
557 Src2.DoubleVal == Src2.DoubleVal));
562 static GenericValue executeFCMP_UNO(GenericValue Src1, GenericValue Src2,
566 assert(Src1.AggregateVal.size() == Src2.AggregateVal.size());
573 (Src2.AggregateVal[_i].FloatVal !=
574 Src2.AggregateVal[_i].FloatVal)));
580 (Src2.AggregateVal[_i].DoubleVal !=
581 Src2.AggregateVal[_i].DoubleVal)));
585 Src2.FloatVal != Src2.FloatVal));
588 Src2.DoubleVal != Src2.DoubleVal));
593 static GenericValue executeFCMP_BOOL(GenericValue Src1, GenericValue Src2,
597 assert(Src1.AggregateVal.size() == Src2.AggregateVal.size());
612 GenericValue Src2 = getOperandValue(I.getOperand(1), SF);
620 case FCmpInst::FCMP_FALSE: R = executeFCMP_BOOL(Src1, Src2, Ty, false);
622 case FCmpInst::FCMP_TRUE: R = executeFCMP_BOOL(Src1, Src2, Ty, true);
624 case FCmpInst::FCMP_ORD: R = executeFCMP_ORD(Src1, Src2, Ty); break;
625 case FCmpInst::FCMP_UNO: R = executeFCMP_UNO(Src1, Src2, Ty); break;
626 case FCmpInst::FCMP_UEQ: R = executeFCMP_UEQ(Src1, Src2, Ty); break;
627 case FCmpInst::FCMP_OEQ: R = executeFCMP_OEQ(Src1, Src2, Ty); break;
628 case FCmpInst::FCMP_UNE: R = executeFCMP_UNE(Src1, Src2, Ty); break;
629 case FCmpInst::FCMP_ONE: R = executeFCMP_ONE(Src1, Src2, Ty); break;
630 case FCmpInst::FCMP_ULT: R = executeFCMP_ULT(Src1, Src2, Ty); break;
631 case FCmpInst::FCMP_OLT: R = executeFCMP_OLT(Src1, Src2, Ty); break;
632 case FCmpInst::FCMP_UGT: R = executeFCMP_UGT(Src1, Src2, Ty); break;
633 case FCmpInst::FCMP_OGT: R = executeFCMP_OGT(Src1, Src2, Ty); break;
634 case FCmpInst::FCMP_ULE: R = executeFCMP_ULE(Src1, Src2, Ty); break;
635 case FCmpInst::FCMP_OLE: R = executeFCMP_OLE(Src1, Src2, Ty); break;
636 case FCmpInst::FCMP_UGE: R = executeFCMP_UGE(Src1, Src2, Ty); break;
637 case FCmpInst::FCMP_OGE: R = executeFCMP_OGE(Src1, Src2, Ty); break;
644 GenericValue Src2, Type *Ty) {
647 case ICmpInst::ICMP_EQ: return executeICMP_EQ(Src1, Src2, Ty);
648 case ICmpInst::ICMP_NE: return executeICMP_NE(Src1, Src2, Ty);
649 case ICmpInst::ICMP_UGT: return executeICMP_UGT(Src1, Src2, Ty);
650 case ICmpInst::ICMP_SGT: return executeICMP_SGT(Src1, Src2, Ty);
651 case ICmpInst::ICMP_ULT: return executeICMP_ULT(Src1, Src2, Ty);
652 case ICmpInst::ICMP_SLT: return executeICMP_SLT(Src1, Src2, Ty);
653 case ICmpInst::ICMP_UGE: return executeICMP_UGE(Src1, Src2, Ty);
654 case ICmpInst::ICMP_SGE: return executeICMP_SGE(Src1, Src2, Ty);
655 case ICmpInst::ICMP_ULE: return executeICMP_ULE(Src1, Src2, Ty);
656 case ICmpInst::ICMP_SLE: return executeICMP_SLE(Src1, Src2, Ty);
657 case FCmpInst::FCMP_ORD: return executeFCMP_ORD(Src1, Src2, Ty);
658 case FCmpInst::FCMP_UNO: return executeFCMP_UNO(Src1, Src2, Ty);
659 case FCmpInst::FCMP_OEQ: return executeFCMP_OEQ(Src1, Src2, Ty);
660 case FCmpInst::FCMP_UEQ: return executeFCMP_UEQ(Src1, Src2, Ty);
661 case FCmpInst::FCMP_ONE: return executeFCMP_ONE(Src1, Src2, Ty);
662 case FCmpInst::FCMP_UNE: return executeFCMP_UNE(Src1, Src2, Ty);
663 case FCmpInst::FCMP_OLT: return executeFCMP_OLT(Src1, Src2, Ty);
664 case FCmpInst::FCMP_ULT: return executeFCMP_ULT(Src1, Src2, Ty);
665 case FCmpInst::FCMP_OGT: return executeFCMP_OGT(Src1, Src2, Ty);
666 case FCmpInst::FCMP_UGT: return executeFCMP_UGT(Src1, Src2, Ty);
667 case FCmpInst::FCMP_OLE: return executeFCMP_OLE(Src1, Src2, Ty);
668 case FCmpInst::FCMP_ULE: return executeFCMP_ULE(Src1, Src2, Ty);
669 case FCmpInst::FCMP_OGE: return executeFCMP_OGE(Src1, Src2, Ty);
670 case FCmpInst::FCMP_UGE: return executeFCMP_UGE(Src1, Src2, Ty);
671 case FCmpInst::FCMP_FALSE: return executeFCMP_BOOL(Src1, Src2, Ty, false);
672 case FCmpInst::FCMP_TRUE: return executeFCMP_BOOL(Src1, Src2, Ty, true);
683 GenericValue Src2 = getOperandValue(I.getOperand(1), SF);
688 assert(Src1.AggregateVal.size() == Src2.AggregateVal.size());
695 Src1.AggregateVal[i].IntVal OP Src2.AggregateVal[i].IntVal;
702 Src1.AggregateVal[i].IntVal.OP(Src2.AggregateVal[i].IntVal);
709 Src1.AggregateVal[i].TY OP Src2.AggregateVal[i].TY;
749 fmod(Src1.AggregateVal[i].FloatVal, Src2.AggregateVal[i].FloatVal);
754 fmod(Src1.AggregateVal[i].DoubleVal, Src2.AggregateVal[i].DoubleVal);
768 case Instruction::Add: R.IntVal = Src1.IntVal + Src2.IntVal; break;
769 case Instruction::Sub: R.IntVal = Src1.IntVal - Src2.IntVal; break;
770 case Instruction::Mul: R.IntVal = Src1.IntVal * Src2.IntVal; break;
771 case Instruction::FAdd: executeFAddInst(R, Src1, Src2, Ty); break;
772 case Instruction::FSub: executeFSubInst(R, Src1, Src2, Ty); break;
773 case Instruction::FMul: executeFMulInst(R, Src1, Src2, Ty); break;
774 case Instruction::FDiv: executeFDivInst(R, Src1, Src2, Ty); break;
775 case Instruction::FRem: executeFRemInst(R, Src1, Src2, Ty); break;
776 case Instruction::UDiv: R.IntVal = Src1.IntVal.udiv(Src2.IntVal); break;
777 case Instruction::SDiv: R.IntVal = Src1.IntVal.sdiv(Src2.IntVal); break;
778 case Instruction::URem: R.IntVal = Src1.IntVal.urem(Src2.IntVal); break;
779 case Instruction::SRem: R.IntVal = Src1.IntVal.srem(Src2.IntVal); break;
780 case Instruction::And: R.IntVal = Src1.IntVal & Src2.IntVal; break;
781 case Instruction::Or: R.IntVal = Src1.IntVal | Src2.IntVal; break;
782 case Instruction::Xor: R.IntVal = Src1.IntVal ^ Src2.IntVal; break;
788 static GenericValue executeSelectInst(GenericValue Src1, GenericValue Src2,
790 return Src1.IntVal == 0 ? Src3 : Src2;
796 GenericValue Src2 = getOperandValue(I.getOperand(1), SF);
798 GenericValue R = executeSelectInst(Src1, Src2, Src3);
1156 GenericValue Src2 = getOperandValue(I.getOperand(1), SF);
1162 assert(src1Size == Src2.AggregateVal.size());
1165 uint64_t shiftAmount = Src2.AggregateVal[i].IntVal.getZExtValue();
1172 uint64_t shiftAmount = Src2.IntVal.getZExtValue();
1183 GenericValue Src2 = getOperandValue(I.getOperand(1), SF);
1189 assert(src1Size == Src2.AggregateVal.size());
1192 uint64_t shiftAmount = Src2.AggregateVal[i].IntVal.getZExtValue();
1199 uint64_t shiftAmount = Src2.IntVal.getZExtValue();
1210 GenericValue Src2 = getOperandValue(I.getOperand(1), SF);
1216 assert(src1Size == Src2.AggregateVal.size());
1219 uint64_t shiftAmount = Src2.AggregateVal[i].IntVal.getZExtValue();
1226 uint64_t shiftAmount = Src2.IntVal.getZExtValue();
1766 GenericValue Src2 = getOperandValue(I.getOperand(1), SF);
1770 const unsigned indx = unsigned(Src2.IntVal.getZExtValue());