freedreno/ir3: fix printing of relative branch offsets
authorRob Clark <robdclark@gmail.com>
Mon, 29 Jan 2018 20:24:17 +0000 (15:24 -0500)
committerRob Clark <robdclark@gmail.com>
Sat, 10 Feb 2018 19:54:58 +0000 (14:54 -0500)
commita84e32484778fb535d3ad8a266b884e14ad194da
treed876f6599ecd1db514fed54434caad203f0f6795
parenta5c28fe07b2822866aaedfe94362918904bd8869
freedreno/ir3: fix printing of relative branch offsets

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>
src/gallium/drivers/freedreno/ir3/disasm-a3xx.c
src/gallium/drivers/freedreno/ir3/instr-a3xx.h