Lines Matching refs:binop
358 def binop(name, ty, alg_props, const_expr): function
391 binop("fadd", tfloat, commutative + associative, "src0 + src1")
392 binop("iadd", tint, commutative + associative, "src0 + src1")
393 binop("fsub", tfloat, "", "src0 - src1")
394 binop("isub", tint, "", "src0 - src1")
396 binop("fmul", tfloat, commutative + associative, "src0 * src1")
398 binop("imul", tint, commutative + associative, "src0 * src1")
400 binop("imul_high", tint32, commutative,
403 binop("umul_high", tuint32, commutative,
406 binop("fdiv", tfloat, "", "src0 / src1")
407 binop("idiv", tint, "", "src1 == 0 ? 0 : (src0 / src1)")
408 binop("udiv", tuint, "", "src1 == 0 ? 0 : (src0 / src1)")
420 binop("umod", tuint, "", "src1 == 0 ? 0 : src0 % src1")
430 binop("irem", tint, "", "src1 == 0 ? 0 : src0 % src1")
431 binop("imod", tint, "",
434 binop("fmod", tfloat, "", "src0 - src1 * floorf(src0 / src1)")
435 binop("frem", tfloat, "", "src0 - src1 * truncf(src0 / src1)")
476 binop("slt", tfloat32, "", "(src0 < src1) ? 1.0f : 0.0f") # Set on Less Than
477 binop("sge", tfloat, "", "(src0 >= src1) ? 1.0f : 0.0f") # Set on Greater or Equal
478 binop("seq", tfloat32, commutative, "(src0 == src1) ? 1.0f : 0.0f") # Set on Equal
479 binop("sne", tfloat32, commutative, "(src0 != src1) ? 1.0f : 0.0f") # Set on Not Equal
492 binop("iand", tuint, commutative + associative, "src0 & src1")
493 binop("ior", tuint, commutative + associative, "src0 | src1")
494 binop("ixor", tuint, commutative + associative, "src0 ^ src1")
502 binop("fand", tfloat32, commutative,
504 binop("for", tfloat32, commutative,
506 binop("fxor", tfloat32, commutative,
520 binop("fmin", tfloat, "", "fminf(src0, src1)")
521 binop("imin", tint, commutative + associative, "src1 > src0 ? src0 : src1")
522 binop("umin", tuint, commutative + associative, "src1 > src0 ? src0 : src1")
523 binop("fmax", tfloat, "", "fmaxf(src0, src1)")
524 binop("imax", tint, commutative + associative, "src1 > src0 ? src1 : src0")
525 binop("umax", tuint, commutative + associative, "src1 > src0 ? src1 : src0")
528 binop("usadd_4x8", tint32, commutative + associative, """
536 binop("ussub_4x8", tint32, "", """
547 binop("umin_4x8", tint32, commutative + associative, """
555 binop("umax_4x8", tint32, commutative + associative, """
563 binop("umul_unorm_4x8", tint32, commutative + associative, """
572 binop("fpow", tfloat, "", "bit_size == 64 ? powf(src0, src1) : pow(src0, src1)")
606 binop("extract_u8", tuint, "", "(uint8_t)(src0 >> (src1 * 8))")
607 binop("extract_i8", tint, "", "(int8_t)(src0 >> (src1 * 8))")
610 binop("extract_u16", tuint, "", "(uint16_t)(src0 >> (src1 * 16))")
611 binop("extract_i16", tint, "", "(int16_t)(src0 >> (src1 * 16))")