On 2/26/21 1:49 AM, Claudio Fontana wrote:
> @@ -8054,6 +8058,7 @@ static target_ulong disas_insn(DisasContext *s,
> CPUState *cpu)
> case 0x123: /* mov drN, reg */
> if (s->cpl != 0) {
> gen_exception(s, EXCP0D_GPF, pc_start - s->cs_base);
> +#ifndef CONFIG_USER_ONLY
> } else {
> modrm = x86_ldub_code(env, s);
> /* Ignore the mod bits (assume (modrm&0xc0)==0xc0).
> @@ -8083,6 +8088,7 @@ static target_ulong disas_insn(DisasContext *s,
> CPUState *cpu)
> gen_helper_get_dr(s->T0, cpu_env, s->tmp2_i32);
> gen_op_mov_reg_v(s, ot, rm, s->T0);
> }
> +#endif /* CONFIG_USER_ONLY */
> }
Better to properly nest the ifdef with the if. I.e.
if (x) {
} else {
#ifndef
#endif
}
Anything else gets confusing quickly.
r~