For working with registers in units of half-regs in the new RA.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9842>
return (opc_cat(instr->opc) == -1);
}
+static inline unsigned reg_elems(const struct ir3_register *reg)
+{
+ if (reg->flags & IR3_REG_ARRAY)
+ return reg->size;
+ else
+ return util_last_bit(reg->wrmask);
+}
+
+static inline unsigned
+reg_elem_size(const struct ir3_register *reg)
+{
+ return (reg->flags & IR3_REG_HALF) ? 1 : 2;
+}
+
+static inline unsigned
+reg_size(const struct ir3_register *reg)
+{
+ return reg_elems(reg) * reg_elem_size(reg);
+}
+
static inline unsigned dest_regs(struct ir3_instruction *instr)
{
if ((instr->regs_count == 0) || is_store(instr) || is_flow(instr))