this->type = glsl_type::uint_type;
break;
+ case ir_binop_carry:
+ case ir_binop_borrow:
case ir_binop_lshift:
case ir_binop_rshift:
case ir_binop_bfm:
"-",
"*",
"/",
+ "carry",
+ "borrow",
"%",
"<",
">",
ir_binop_mul,
ir_binop_div,
+ /**
+ * Returns the carry resulting from the addition of the two arguments.
+ */
+ /*@{*/
+ ir_binop_carry,
+ /*@}*/
+
+ /**
+ * Returns the borrow resulting from the subtraction of the second argument
+ * from the first argument.
+ */
+ /*@{*/
+ ir_binop_borrow,
+ /*@}*/
+
/**
* Takes one of two combinations of arguments:
*
return expr(ir_binop_div, a, b);
}
+ir_expression *carry(operand a, operand b)
+{
+ return expr(ir_binop_carry, a, b);
+}
+
+ir_expression *borrow(operand a, operand b)
+{
+ return expr(ir_binop_borrow, a, b);
+}
+
ir_expression *round_even(operand a)
{
return expr(ir_unop_round_even, a);
ir_expression *sub(operand a, operand b);
ir_expression *mul(operand a, operand b);
ir_expression *div(operand a, operand b);
+ir_expression *carry(operand a, operand b);
+ir_expression *borrow(operand a, operand b);
ir_expression *round_even(operand a);
ir_expression *dot(operand a, operand b);
ir_expression *dotlike(operand a, operand b);
}
break;
+ case ir_binop_carry:
+ case ir_binop_borrow:
+ assert(ir->type == ir->operands[0]->type);
+ assert(ir->type == ir->operands[1]->type);
+ assert(ir->type->base_type == GLSL_TYPE_UINT);
+ break;
+
case ir_binop_less:
case ir_binop_greater:
case ir_binop_lequal:
case ir_quadop_bitfield_insert:
case ir_binop_ldexp:
case ir_triop_csel:
+ case ir_binop_carry:
+ case ir_binop_borrow:
assert(!"not supported");
break;
case ir_binop_vector_extract:
case ir_triop_vector_insert:
case ir_binop_ldexp:
+ case ir_binop_carry:
+ case ir_binop_borrow:
/* This operation is not supported, or should have already been handled.
*/
assert(!"Invalid ir opcode in glsl_to_tgsi_visitor::visit()");