We'd like the comparisons to mean "the exact same bits". Comparing
doubles won't do that for NaN values or positive vs. negative zero.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
};
double df;
+ uint64_t u64;
float f;
int d;
unsigned ud;
brw_regs_equal(const struct brw_reg *a, const struct brw_reg *b)
{
const bool df = a->type == BRW_REGISTER_TYPE_DF && a->file == IMM;
- return a->bits == b->bits && (df ? a->df == b->df : a->ud == b->ud);
+ return a->bits == b->bits && (df ? a->u64 == b->u64 : a->ud == b->ud);
}
struct brw_indirect {