+static void run_step(struct tvec_state *tv, tvec_testfn *fn, void *ctx)
+{
+ static const size_t steps[] = { 1, 5, 6, 7, 8, 23 };
+ struct step step;
+ size_t i;
+
+ fn(tv->in, tv->out, 0);
+ tvec_check(tv, "whole buffer");
+
+ for (i = 0; i < N(steps); i++) {
+ step.s = steps[i];
+ fn(tv->in, tv->out, &step);
+ tvec_check(tv, "step = %lu", (unsigned long)steps[i]);
+ }
+}
+
+static const struct tvec_env step_testenv = { 0, 0, 0, 0, run_step, 0, 0 };
+
+static void before_hash(struct tvec_state *tv, void *ctx)
+ { tvec_allocbuffer(&tv->in[RM].v); }
+
+/*----- CRC32 -------------------------------------------------------------*/
+
+static const struct tvec_regdef bench_regs[] = {
+ { "msz", &tvty_buffer, RM, TVRF_ID },
+ TVEC_ENDREGS
+};
+
+static const struct tvec_regdef crc32_regs[] = {
+ { "m", &tvty_bytes, RM, 0 },
+ { "h", &tvty_uint, RH, 0, { &tvrange_u32 } },
+ TVEC_ENDREGS
+};
+