Remove the float/dword union and use the iter->p[f->start / 32]
directly as printf formatter %08x expects uint32_t (Ken)
v2: Make the cleanup much more crispier (Ken)
Signed-off-by: Sirisha Gandikota <Sirisha.Gandikota@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
int *dword_num)
{
struct gen_field *f;
- union {
- uint32_t dw;
- float f;
- } v;
f = iter->group->fields[iter->i - 1];
- v.dw = iter->p[f->start / 32];
+ const int dword = f->start / 32;
- if (*dword_num != (f->start / 32)) {
+ if (*dword_num != dword) {
printf("0x%08lx: 0x%08x : Dword %d\n",
- offset + 4 * (f->start / 32), v.dw, f->start / 32);
- *dword_num = (f->start / 32);
+ offset + 4 * dword, iter->p[dword], dword);
+ *dword_num = dword;
}
}