intel/mi_builder: add mi_ixor()

Just like mi_ior(), but for xor. We're going to use it in one of the
next commits.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39338>
This commit is contained in:
Paulo Zanoni 2026-02-25 11:24:40 -08:00 committed by Marge Bot
parent 36ad561fec
commit 9f7623723e

View file

@ -1066,6 +1066,17 @@ mi_ior(struct mi_builder *b,
MI_ALU_STORE, MI_ALU_ACCU);
}
static inline struct mi_value
mi_ixor(struct mi_builder *b,
struct mi_value src0, struct mi_value src1)
{
if (src0.type == MI_VALUE_TYPE_IMM && src1.type == MI_VALUE_TYPE_IMM)
return mi_imm(mi_value_to_u64(src0) ^ mi_value_to_u64(src1));
return mi_math_binop(b, MI_ALU_XOR, src0, src1,
MI_ALU_STORE, MI_ALU_ACCU);
}
#if GFX_VERx10 >= 125
static inline struct mi_value
mi_ishl(struct mi_builder *b, struct mi_value src0, struct mi_value src1)