diff options
Diffstat (limited to 'src/panfrost/midgard/midgard_print.c')
-rw-r--r-- | src/panfrost/midgard/midgard_print.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/panfrost/midgard/midgard_print.c b/src/panfrost/midgard/midgard_print.c index add40511d2f..871d1c5a6de 100644 --- a/src/panfrost/midgard/midgard_print.c +++ b/src/panfrost/midgard/midgard_print.c @@ -148,8 +148,15 @@ mir_print_instruction(midgard_instruction *ins) printf(", "); mir_print_index(args->src[2]); - if (ins->has_constants) - printf(" <%f, %f, %f, %f>", ins->constants[0], ins->constants[1], ins->constants[2], ins->constants[3]); + if (ins->has_constants) { + uint32_t *uc = ins->constants; + float *fc = (float *) uc; + + if (midgard_is_integer_op(ins->alu.op)) + printf(" <0x%X, 0x%X, 0x%X, 0x%x>", uc[0], uc[1], uc[2], uc[3]); + else + printf(" <%f, %f, %f, %f>", fc[0], fc[1], fc[2], fc[3]); + } if (ins->no_spill) printf(" /* no spill */"); |