static void dump_regs(FILE *fp, struct bifrost_regs srcs, bool first)
{
struct bifrost_reg_ctrl ctrl = DecodeRegCtrl(fp, srcs, first);
- fprintf(fp, "# ");
+ fprintf(fp, " # ");
if (ctrl.read_reg0)
fprintf(fp, "slot 0: r%d ", get_reg0(srcs));
if (ctrl.read_reg1)
memcpy((char *) ®s, (char *) &instrs[i].reg_bits, sizeof(regs));
if (verbose) {
- fprintf(fp, "# regs: %016" PRIx64 "\n", instrs[i].reg_bits);
+ fprintf(fp, " # regs: %016" PRIx64 "\n", instrs[i].reg_bits);
dump_regs(fp, regs, i == 0);
}
fprintf(fp, "# const%d: %08" PRIx64 "\n", 2 * i + 1, consts.raw[i] >> 32);
}
}
+
+ fprintf(fp, "\n");
return stopbit;
}
template = """void
bi_disasm_${unit}(FILE *fp, unsigned bits, struct bifrost_regs *srcs, struct bifrost_regs *next_regs, unsigned staging_register, unsigned branch_offset, struct bi_constants *consts, bool last)
{
+ fputs(" ", fp);
+
% for (i, (name, (emask, ebits), derived)) in enumerate(options):
% if len(derived) > 0:
${"else " if i > 0 else ""}if (unlikely(((bits & ${hex(emask)}) == ${hex(ebits)})