qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v24 10/18] i386: move TCG btp_helper into sysemu/


From: Richard Henderson
Subject: Re: [PATCH v24 10/18] i386: move TCG btp_helper into sysemu/
Date: Fri, 26 Feb 2021 07:21:04 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]