Makes it easier to read.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16409>
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 */
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