pan/va: Add whitespace after disassembled branches
To make the disassembly easier to read, add whitespace after disassembled branches. This makes the basic blocks of the original control flow graph more obvious, to aid comparison with the IR. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16409>
This commit is contained in:
committed by
Marge Bot
parent
6510c8fa7f
commit
269eb0cdd5
@@ -61,6 +61,15 @@ disassemble_valhall(FILE *fp, const uint64_t *code, unsigned size, bool verbose)
|
||||
|
||||
va_disasm_instr(fp, instr);
|
||||
fprintf(fp, "\n");
|
||||
|
||||
/* Detect branches */
|
||||
uint64_t opcode = (instr >> 48) & MASK(9);
|
||||
bool branchz = (opcode == 0x1F);
|
||||
bool branchzi = (opcode == 0x2F);
|
||||
|
||||
/* Separate blocks visually by inserting whitespace after branches */
|
||||
if (branchz || branchzi)
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
fprintf(fp, "\n");
|
||||
|
||||
Reference in New Issue
Block a user