[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: |
Claudio Fontana |
Subject: |
Re: [PATCH v24 10/18] i386: move TCG btp_helper into sysemu/ |
Date: |
Fri, 26 Feb 2021 16:28:55 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 |
On 2/26/21 4:21 PM, Richard Henderson wrote:
> 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~
>
Ah ok; thanks
- [PATCH v24 01/18] i386: split cpu accelerators from cpu.c, using AccelCPUClass, (continued)
- [PATCH v24 01/18] i386: split cpu accelerators from cpu.c, using AccelCPUClass, Claudio Fontana, 2021/02/26
- [PATCH v24 04/18] target/i386: fix host_cpu_adjust_phys_bits error handling, Claudio Fontana, 2021/02/26
- [PATCH v24 03/18] accel: introduce new accessor functions, Claudio Fontana, 2021/02/26
- [PATCH v24 06/18] meson: add target_user_arch, Claudio Fontana, 2021/02/26
- [PATCH v24 05/18] accel-cpu: make cpu_realizefn return a bool, Claudio Fontana, 2021/02/26
- [PATCH v24 02/18] cpu: call AccelCPUClass::cpu_realizefn in cpu_exec_realizefn, Claudio Fontana, 2021/02/26
- [PATCH v24 08/18] i386: split smm helper (sysemu), Claudio Fontana, 2021/02/26
- [PATCH v24 07/18] i386: split off sysemu-only functionality in tcg-cpu, Claudio Fontana, 2021/02/26
- [PATCH v24 10/18] i386: move TCG btp_helper into sysemu/, Claudio Fontana, 2021/02/26
- [PATCH v24 12/18] i386: separate fpu_helper into user and sysemu parts, Claudio Fontana, 2021/02/26
- [PATCH v24 09/18] i386: split tcg excp_helper into sysemu and user parts, Claudio Fontana, 2021/02/26
- [PATCH v24 13/18] i386: split svm_helper into sysemu and stub-only user, Claudio Fontana, 2021/02/26
- [PATCH v24 14/18] i386: split seg_helper into user-only and sysemu parts, Claudio Fontana, 2021/02/26
- [PATCH v24 16/18] target/i386: gdbstub: introduce aux functions to read/write CS64 regs, Claudio Fontana, 2021/02/26
- [PATCH v24 17/18] target/i386: gdbstub: only write CR0/CR2/CR3/EFER for sysemu, Claudio Fontana, 2021/02/26