mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-22 13:08:09 +02:00
agx: Print instructions as "dest = src"
This makes the dataflow easier to read, especially with splits and collects (which take variable numbers of sources/destinations). Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18804>
This commit is contained in:
parent
72a1e1f33f
commit
6c95572ef0
1 changed files with 17 additions and 11 deletions
|
|
@ -108,19 +108,10 @@ agx_print_instr(agx_instr *I, FILE *fp)
|
|||
{
|
||||
assert(I->op < AGX_NUM_OPCODES);
|
||||
struct agx_opcode_info info = agx_opcodes_info[I->op];
|
||||
|
||||
fprintf(fp, " %s", info.name);
|
||||
|
||||
if (I->saturate)
|
||||
fprintf(fp, ".sat");
|
||||
|
||||
if (I->last)
|
||||
fprintf(fp, ".last");
|
||||
|
||||
fprintf(fp, " ");
|
||||
|
||||
bool print_comma = false;
|
||||
|
||||
fprintf(fp, " ");
|
||||
|
||||
agx_foreach_dest(I, d) {
|
||||
if (print_comma)
|
||||
fprintf(fp, ", ");
|
||||
|
|
@ -130,6 +121,21 @@ agx_print_instr(agx_instr *I, FILE *fp)
|
|||
agx_print_index(I->dest[d], false, fp);
|
||||
}
|
||||
|
||||
if (I->nr_dests) {
|
||||
fprintf(fp, " = ");
|
||||
print_comma = false;
|
||||
}
|
||||
|
||||
fprintf(fp, "%s", info.name);
|
||||
|
||||
if (I->saturate)
|
||||
fprintf(fp, ".sat");
|
||||
|
||||
if (I->last)
|
||||
fprintf(fp, ".last");
|
||||
|
||||
fprintf(fp, " ");
|
||||
|
||||
agx_foreach_src(I, s) {
|
||||
if (print_comma)
|
||||
fprintf(fp, ", ");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue