diff options
Diffstat (limited to 'src/broadcom/qpu/qpu_disasm.c')
-rw-r--r-- | src/broadcom/qpu/qpu_disasm.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/broadcom/qpu/qpu_disasm.c b/src/broadcom/qpu/qpu_disasm.c index 73b43f8c3d6..32e7ba12a4c 100644 --- a/src/broadcom/qpu/qpu_disasm.c +++ b/src/broadcom/qpu/qpu_disasm.c @@ -62,7 +62,21 @@ v3d_qpu_disasm_raddr(struct disasm_state *disasm, if (mux == V3D_QPU_MUX_A) { append(disasm, "rf%d", instr->raddr_a); } else if (mux == V3D_QPU_MUX_B) { - append(disasm, "rf%d", instr->raddr_b); + if (instr->sig.small_imm) { + uint32_t val; + MAYBE_UNUSED bool ok = + v3d_qpu_small_imm_unpack(disasm->devinfo, + instr->raddr_b, + &val); + + if ((int)val >= -16 && (int)val <= 15) + append(disasm, "%d", val); + else + append(disasm, "0x%08x", val); + assert(ok); + } else { + append(disasm, "rf%d", instr->raddr_b); + } } else { append(disasm, "r%d", mux); } |