}
bool
-src_reg::equals(src_reg *r)
+src_reg::equals(const src_reg &r) const
{
- return (file == r->file &&
- reg == r->reg &&
- reg_offset == r->reg_offset &&
- type == r->type &&
- negate == r->negate &&
- abs == r->abs &&
- swizzle == r->swizzle &&
- !reladdr && !r->reladdr &&
- memcmp(&fixed_hw_reg, &r->fixed_hw_reg,
+ return (file == r.file &&
+ reg == r.reg &&
+ reg_offset == r.reg_offset &&
+ type == r.type &&
+ negate == r.negate &&
+ abs == r.abs &&
+ swizzle == r.swizzle &&
+ !reladdr && !r.reladdr &&
+ memcmp(&fixed_hw_reg, &r.fixed_hw_reg,
sizeof(fixed_hw_reg)) == 0 &&
- imm.u == r->imm.u);
+ imm.u == r.imm.u);
}
static bool
src_reg(int32_t i);
src_reg(struct brw_reg reg);
- bool equals(src_reg *r);
+ bool equals(const src_reg &r) const;
bool is_zero() const;
bool is_one() const;
bool is_accumulator() const;
*/
src_reg value = *values[0];
for (int i = 1; i < 4; i++) {
- if (!value.equals(values[i]))
+ if (!value.equals(*values[i]))
return false;
}
return false;
/* Don't report progress if this is a noop. */
- if (value.equals(&inst->src[arg]))
+ if (value.equals(inst->src[arg]))
return false;
value.type = inst->src[arg].type;