diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index d57dd679356..d6d6955607a 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -504,6 +504,22 @@ bi_byte(bi_index idx, unsigned lane) return idx; } +static inline bi_index +bi_abs(bi_index idx) +{ + assert(idx.type != BI_INDEX_CONSTANT); + idx.abs = true; + return idx; +} + +static inline bi_index +bi_neg(bi_index idx) +{ + assert(idx.type != BI_INDEX_CONSTANT); + idx.neg ^= true; + return idx; +} + static inline bi_index bi_imm_u8(uint8_t imm) {