mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
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>
This commit is contained in:
parent
4084f6900e
commit
c843b43ccd
1 changed files with 11 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue