pan/bi: Defer newline printing in disassembler

Easy reduction in generated code, while we're at it. Pretty obvious
change after working on similar fixes for the other generators.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
This commit is contained in:
Alyssa Rosenzweig 2020-12-06 22:50:34 -05:00 committed by Marge Bot
parent 6d81df6e0c
commit 258c1f5b24
1 changed files with 3 additions and 2 deletions

View File

@ -81,7 +81,9 @@ bi_disasm_${unit}(FILE *fp, unsigned bits, struct bifrost_regs *srcs, struct bif
bi_disasm_${name}(fp, bits, srcs, next_regs, staging_register, branch_offset, consts, last);
% endfor
else
fprintf(fp, "INSTR_INVALID_ENC ${unit} %X\\n", bits);
fprintf(fp, "INSTR_INVALID_ENC ${unit} %X", bits);
fputs("\\n", fp);
}"""
return Template(template).render(options = mapped, unit = "fma" if is_fma else "add")
@ -343,7 +345,6 @@ def disasm_op(name, op):
if desc.get('staging'):
body += ' fprintf(fp, ", @r%u", staging_register);\n'
body += ' fputs("\\n", fp);\n'
return disasm_op_template.render(c_name = opname_to_c(name), body = body)
print('#include "util/macros.h"')