mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
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:
parent
6510c8fa7f
commit
269eb0cdd5
1 changed files with 9 additions and 0 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue