-static void basic_report_status(unsigned disp, int st, struct tvec_state *tv)
- { tvec_write(tv, " %8s status = `%c'\n", stdisp(disp), st); }
-
-static void basic_report_register(unsigned disp,
- const struct tvec_reg *r,
- const struct tvec_regdef *rd,
- struct tvec_state *tv)
-{
- tvec_write(tv, " %8s %s = ", regdisp(disp), rd->name);
- if (r->f&TVRF_LIVE) rd->ty->dump(&r->v, rd, tv, 0);
- else tvec_write(tv, "#<unset>");
- tvec_write(tv, "\n");
-}
-
-static const struct mismatchfns basic_mismatchfns =
- { basic_report_status, basic_report_register };
-
-static void dump_inreg(const struct tvec_regdef *rd,
- const struct mismatchfns *fns, struct tvec_state *tv)
- { fns->report_register(INPUT, TVEC_REG(tv, in, rd->i), rd, tv); }
-
-static void dump_outreg(const struct tvec_regdef *rd,
- const struct mismatchfns *fns, struct tvec_state *tv)
-{
- const struct tvec_reg
- *rin = TVEC_REG(tv, in, rd->i), *rout = TVEC_REG(tv, out, rd->i);
-
- if (tv->st == '.') {
- if (!(rout->f&TVRF_LIVE)) {
- if (!(rin->f&TVRF_LIVE))
- fns->report_register(INPUT, rin, rd, tv);
- else {
- fns->report_register(FOUND, rout, rd, tv);
- fns->report_register(EXPECT, rin, rd, tv);
- }
- } else {
- if (!(rin->f&TVRF_LIVE)) fns->report_register(OUTPUT, rout, rd, tv);
- else if (rd->ty->eq(&rin->v, &rout->v, rd))
- fns->report_register(MATCH, rin, rd, tv);
- else {
- fns->report_register(FOUND, rout, rd, tv);
- fns->report_register(EXPECT, rin, rd, tv);
- }
- }
- }
-}
-
-static void mismatch(const struct mismatchfns *fns, struct tvec_state *tv)
-{
- const struct tvec_regdef *rd;
-
- if (tv->st != tv->expst) {
- fns->report_status(FOUND, tv->st, tv);
- fns->report_status(EXPECT, tv->expst, tv);
- } else if (tv->st != '.')
- fns->report_status(MATCH, tv->st, tv);
-
- for (rd = tv->test->regs; rd->name; rd++) {
- if (rd->i < tv->nrout) dump_outreg(rd, fns, tv);
- else dump_inreg(rd, fns, tv);
- }
-}
-
-static void bench_summary(struct tvec_state *tv)