Lines Matching defs:reg
182 * the component is in the low two bits of the reg #, so
571 unsigned reg; /* base physical reg */
725 struct ir3_register *reg);
736 struct ir3_register *reg,
809 reg_num(const struct ir3_register *reg)
811 return reg->num >> 2;
815 reg_comp(const struct ir3_register *reg)
817 return reg->num & 0x3;
867 /* If the type of dest reg and src reg are different,
877 /* If the type of dest reg and src reg are different,
1137 reg_elems(const struct ir3_register *reg)
1139 if (reg->flags & IR3_REG_ARRAY)
1140 return reg->size;
1142 return util_last_bit(reg->wrmask);
1146 reg_elem_size(const struct ir3_register *reg)
1148 return (reg->flags & IR3_REG_HALF) ? 1 : 2;
1152 reg_size(const struct ir3_register *reg)
1154 return reg_elems(reg) * reg_elem_size(reg);
1225 is_reg_special(const struct ir3_register *reg)
1227 return (reg->flags & IR3_REG_SHARED) || (reg_num(reg) == REG_A0) ||
1228 (reg_num(reg) == REG_P0);
1240 /* returns defining instruction for reg */
1243 ssa(struct ir3_register *reg)
1245 if ((reg->flags & (IR3_REG_SSA | IR3_REG_ARRAY)) && reg->def)
1246 return reg->def->instr;
1600 /* iterator for an instructions's sources (reg), also returns src #: */
1609 /* iterator for an instructions's sources (reg): */
1612 /* iterator for an instructions's destinations (reg), also returns dst #: */
1621 /* iterator for an instructions's destinations (reg): */
1911 struct ir3_register *reg;
1914 reg = ir3_src_create(instr, INVALID_REG, IR3_REG_SSA | flags);
1915 reg->def = src->dsts[0];
1916 reg->wrmask = src->dsts[0]->wrmask;
1917 return reg;
1923 struct ir3_register *reg = ir3_dst_create(instr, INVALID_REG, IR3_REG_SSA);
1924 reg->instr = instr;
1925 return reg;
2571 regmask_set(regmask_t *regmask, struct ir3_register *reg)
2573 bool half = reg->flags & IR3_REG_HALF;
2574 if (reg->flags & IR3_REG_RELATIV) {
2575 for (unsigned i = 0; i < reg->size; i++)
2576 __regmask_set(regmask, half, reg->array.base + i);
2578 for (unsigned mask = reg->wrmask, n = reg->num; mask; mask >>= 1, n++)
2585 regmask_clear(regmask_t *regmask, struct ir3_register *reg)
2587 bool half = reg->flags & IR3_REG_HALF;
2588 if (reg->flags & IR3_REG_RELATIV) {
2589 for (unsigned i = 0; i < reg->size; i++)
2590 __regmask_clear(regmask, half, reg->array.base + i);
2592 for (unsigned mask = reg->wrmask, n = reg->num; mask; mask >>= 1, n++)
2599 regmask_get(regmask_t *regmask, struct ir3_register *reg)
2601 bool half = reg->flags & IR3_REG_HALF;
2602 if (reg->flags & IR3_REG_RELATIV) {
2603 for (unsigned i = 0; i < reg->size; i++)
2604 if (__regmask_get(regmask, half, reg->array.base + i))
2607 for (unsigned mask = reg->wrmask, n = reg->num; mask; mask >>= 1, n++)