Mesa (main): pan/va: Add some whitespace to Valhall disassembly
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon May 9 21:09:37 UTC 2022
Module: Mesa
Branch: main
Commit: 6510c8fa7fc87fb7c8b39c8416384f056c8f654a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6510c8fa7fc87fb7c8b39c8416384f056c8f654a
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Fri May 6 12:57:14 2022 -0400
pan/va: Add some whitespace to Valhall disassembly
Makes it easier to read.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16409>
---
src/panfrost/bifrost/valhall/disassemble.h | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/panfrost/bifrost/valhall/disassemble.h b/src/panfrost/bifrost/valhall/disassemble.h
index 973888cc1ca..38eba1c1cc3 100644
--- a/src/panfrost/bifrost/valhall/disassemble.h
+++ b/src/panfrost/bifrost/valhall/disassemble.h
@@ -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
More information about the mesa-commit
mailing list