Lines Matching refs:binop
447 def binop(name, ty, alg_props, const_expr):
483 binop("fadd", tfloat, commutative + associative, "src0 + src1")
484 binop("iadd", tint, commutative + associative, "src0 + src1")
485 binop("iadd_sat", tint, commutative, """
490 binop("uadd_sat", tuint, commutative,
492 binop("isub_sat", tint, "", """
497 binop("usub_sat", tuint, "", "src0 < src1 ? 0 : src0 - src1")
499 binop("fsub", tfloat, "", "src0 - src1")
500 binop("isub", tint, "", "src0 - src1")
502 binop("fmul", tfloat, commutative + associative, "src0 * src1")
504 binop("imul", tint, commutative + associative, "src0 * src1")
513 binop("imul_high", tint, commutative, """
540 binop("umul_high", tuint, commutative, """
553 binop("fdiv", tfloat, "", "src0 / src1")
554 binop("idiv", tint, "", "src1 == 0 ? 0 : (src0 / src1)")
555 binop("udiv", tuint, "", "src1 == 0 ? 0 : (src0 / src1)")
577 binop("ihadd", tint, commutative, "(src0 & src1) + ((src0 ^ src1) >> 1)")
578 binop("uhadd", tuint, commutative, "(src0 & src1) + ((src0 ^ src1) >> 1)")
590 binop("irhadd", tint, commutative, "(src0 | src1) + ((src0 ^ src1) >> 1)")
591 binop("urhadd", tuint, commutative, "(src0 | src1) + ((src0 ^ src1) >> 1)")
593 binop("umod", tuint, "", "src1 == 0 ? 0 : src0 % src1")
603 binop("irem", tint, "", "src1 == 0 ? 0 : src0 % src1")
604 binop("imod", tint, "",
607 binop("fmod", tfloat, "", "src0 - src1 * floorf(src0 / src1)")
608 binop("frem", tfloat, "", "src0 - src1 * truncf(src0 / src1)")
668 binop("slt", tfloat32, "", "(src0 < src1) ? 1.0f : 0.0f") # Set on Less Than
669 binop("sge", tfloat, "", "(src0 >= src1) ? 1.0f : 0.0f") # Set on Greater or Equal
670 binop("seq", tfloat32, commutative, "(src0 == src1) ? 1.0f : 0.0f") # Set on Equal
671 binop("sne", tfloat32, commutative, "(src0 != src1) ? 1.0f : 0.0f") # Set on Not Equal
689 binop("iand", tuint, commutative + associative, "src0 & src1")
690 binop("ior", tuint, commutative + associative, "src0 | src1")
691 binop("ixor", tuint, commutative + associative, "src0 ^ src1")
699 binop("fand", tfloat32, commutative,
701 binop("for", tfloat32, commutative,
703 binop("fxor", tfloat32, commutative,
717 binop("fmin", tfloat, "", "fminf(src0, src1)")
718 binop("imin", tint, commutative + associative, "src1 > src0 ? src0 : src1")
719 binop("umin", tuint, commutative + associative, "src1 > src0 ? src0 : src1")
720 binop("fmax", tfloat, "", "fmaxf(src0, src1)")
721 binop("imax", tint, commutative + associative, "src1 > src0 ? src1 : src0")
722 binop("umax", tuint, commutative + associative, "src1 > src0 ? src1 : src0")
725 binop("usadd_4x8", tint32, commutative + associative, """
733 binop("ussub_4x8", tint32, "", """
744 binop("umin_4x8", tint32, commutative + associative, """
752 binop("umax_4x8", tint32, commutative + associative, """
760 binop("umul_unorm_4x8", tint32, commutative + associative, """
769 binop("fpow", tfloat, "", "bit_size == 64 ? powf(src0, src1) : pow(src0, src1)")
806 binop("extract_u8", tuint, "", "(uint8_t)(src0 >> (src1 * 8))")
807 binop("extract_i8", tint, "", "(int8_t)(src0 >> (src1 * 8))")
810 binop("extract_u16", tuint, "", "(uint16_t)(src0 >> (src1 * 16))")
811 binop("extract_i16", tint, "", "(int16_t)(src0 >> (src1 * 16))")