The number of bits depends on generation. But printing negative values
with a5xx encoding (largest size) but compiling for a3xx or a4xx, would
result in negative values printed as large positive values.
I guess in practice huge negative branch offsets aren't likely (and if
that is the case, the shader is probably too big to grok by reading the
assembly). So just print using smallest bitfield size.
Signed-off-by: Rob Clark <robdclark@gmail.com>
break;
case OPC_BR:
printf(" %sp0.%c, #%d", cat0->inv ? "!" : "",
- component[cat0->comp], cat0->a5xx.immed);
+ component[cat0->comp], cat0->a3xx.immed);
break;
case OPC_JUMP:
case OPC_CALL:
- printf(" #%d", cat0->a5xx.immed);
+ printf(" #%d", cat0->a3xx.immed);
break;
}
uint32_t dummy1 : 12;
} a4xx;
struct PACKED {
- uint32_t immed : 32;
+ int32_t immed : 32;
} a5xx;
};