From 84a0dca9dffebe7927a388d95ca620d3677acb30 Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Thu, 7 Jul 2022 11:13:51 +0200 Subject: [PATCH] nir: fix documentation for uadd_carry and usub_borry opcodes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These opcodes where fixed to return an integer instead of a boolean value some time ago but the documentation for them was not updated and still talked about a boolean result. Fixes: b0d4ee520 ('nir/opcodes: Fix up uadd_carry and usub_borrow') Reviewed-by: Alejandro PiƱeiro Part-of: --- src/compiler/nir/nir_opcodes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py index a08adc695c6..70d7f1fe3b7 100644 --- a/src/compiler/nir/nir_opcodes.py +++ b/src/compiler/nir/nir_opcodes.py @@ -763,13 +763,13 @@ binop("fdiv", tfloat, "", "src0 / src1") binop("idiv", tint, "", "src1 == 0 ? 0 : (src0 / src1)") binop("udiv", tuint, "", "src1 == 0 ? 0 : (src0 / src1)") -# returns a boolean representing the carry resulting from the addition of -# the two unsigned arguments. +# returns an integer (1 or 0) representing the carry resulting from the +# addition of the two unsigned arguments. binop_convert("uadd_carry", tuint, tuint, _2src_commutative, "src0 + src1 < src0") -# returns a boolean representing the borrow resulting from the subtraction -# of the two unsigned arguments. +# returns an integer (1 or 0) representing the borrow resulting from the +# subtraction of the two unsigned arguments. binop_convert("usub_borrow", tuint, tuint, "", "src0 < src1")