On Wed, 18 Aug 2021 at 22:42, Richard Henderson <richard.hender...@linaro.org> wrote: > > Use the environment variable to test an older ISA from > the one supported by the host. > > Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
I think we should document this environment variable somewhere... > + /* > + * For debugging/testing purposes, allow the ISA to be reduced > + * (but not extended) from the set detected above. > + */ > +#ifdef CONFIG_DEBUG_TCG > + { > + char *opt = g_strdup(getenv("QEMU_TCG_DEBUG")); Consider g_autofree ? > + if (opt) { > + for (char *o = strtok(opt, ","); o ; o = strtok(NULL, ",")) { > + if (o[0] == 'v' && > + o[1] >= '4' && > + o[1] <= '0' + arm_arch && > + o[2] == 0) { > + arm_arch = o[1] - '0'; > + continue; > + } > + if (strcmp(o, "!neon") == 0) { > + use_neon_instructions = false; > + continue; > + } > + if (strcmp(o, "help") == 0) { > + printf("QEMU_TCG_DEBUG=<opt>{,<opt>} where <opt> is\n" > + " v<N> select ARMv<N>\n" > + " !neon disable ARM NEON\n"); > + exit(0); > + } We should complain about something in the variable we don't understand, rather than just ignoring it. > + } > + g_free(opt); > + } > + } > +#endif > + -- PMM