mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-20 23:10:30 +01:00
pan/va: Add some whitespace to Valhall disassembly
Makes it easier to read. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16409>
This commit is contained in:
parent
324898f5c6
commit
6510c8fa7f
1 changed files with 8 additions and 2 deletions
|
|
@ -43,9 +43,10 @@ disassemble_valhall(FILE *fp, const uint64_t *code, unsigned size, bool verbose)
|
|||
for (unsigned i = 0; i < (size / 8); ++i) {
|
||||
uint64_t instr = code[i];
|
||||
|
||||
/* TODO: is there a stop-bit? or does all-0's mean stop? */
|
||||
if (instr == 0)
|
||||
if (instr == 0) {
|
||||
fprintf(fp, "\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (verbose) {
|
||||
/* Print byte pattern */
|
||||
|
|
@ -53,11 +54,16 @@ disassemble_valhall(FILE *fp, const uint64_t *code, unsigned size, bool verbose)
|
|||
fprintf(fp, "%02x ", (uint8_t) (instr >> (j * 8)));
|
||||
|
||||
fprintf(fp, " ");
|
||||
} else {
|
||||
/* Print whitespace */
|
||||
fprintf(fp, " ");
|
||||
}
|
||||
|
||||
va_disasm_instr(fp, instr);
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue