diff options
author | Rob Clark <[email protected]> | 2018-01-29 15:24:17 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-02-10 14:54:58 -0500 |
commit | a84e32484778fb535d3ad8a266b884e14ad194da (patch) | |
tree | d876f6599ecd1db514fed54434caad203f0f6795 /src/gallium | |
parent | a5c28fe07b2822866aaedfe94362918904bd8869 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/disasm-a3xx.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/instr-a3xx.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/disasm-a3xx.c b/src/gallium/drivers/freedreno/ir3/disasm-a3xx.c index 4cb174cb2a4..1c81c387127 100644 --- a/src/gallium/drivers/freedreno/ir3/disasm-a3xx.c +++ b/src/gallium/drivers/freedreno/ir3/disasm-a3xx.c @@ -159,11 +159,11 @@ static void print_instr_cat0(instr_t *instr) 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; } diff --git a/src/gallium/drivers/freedreno/ir3/instr-a3xx.h b/src/gallium/drivers/freedreno/ir3/instr-a3xx.h index 55198cc053e..65fc212c1c2 100644 --- a/src/gallium/drivers/freedreno/ir3/instr-a3xx.h +++ b/src/gallium/drivers/freedreno/ir3/instr-a3xx.h @@ -301,7 +301,7 @@ typedef struct PACKED { uint32_t dummy1 : 12; } a4xx; struct PACKED { - uint32_t immed : 32; + int32_t immed : 32; } a5xx; }; |