qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: philmd@linaro.org
Subject: Re: [PATCH 07/10] accel/tcg: Return TCGTBCPUState from cpu_get_tb_cpu_state
Date: Mon, 28 Apr 2025 15:26:38 -0700	[thread overview]
Message-ID: <db0b8cff-b79f-4f4f-8322-c9f41462cdd5@linaro.org> (raw)
In-Reply-To: <31ec7f6c-e5fe-401e-96f4-74bc7b0dee36@linaro.org>

On 4/28/25 3:07 PM, Richard Henderson wrote:
> On 4/28/25 15:00, Pierrick Bouvier wrote:
>> On 4/28/25 1:10 PM, Richard Henderson wrote:
>>> diff --git a/include/accel/tcg/cpu-ops.h b/include/accel/tcg/cpu-ops.h
>>> index f5e5746976..8dbe79ea7c 100644
>>> --- a/include/accel/tcg/cpu-ops.h
>>> +++ b/include/accel/tcg/cpu-ops.h
>>> @@ -18,8 +18,13 @@
>>>    #include "exec/vaddr.h"
>>>    #include "tcg/tcg-mo.h"
>>> -void cpu_get_tb_cpu_state(CPUArchState *env, vaddr *pc,
>>> -                          uint64_t *cs_base, uint32_t *flags);
>>> +struct TCGTBCPUState {
>>> +    vaddr pc;
>>> +    uint32_t flags;
>>> +    uint64_t flags2;
>>
>> Could it be named cs_base instead?
>> flags2 is a little bit generic.
> 
> Of course flags2 is generic -- it's only cs_base for x86.
> 

It seems to be named the same for other architectures as well,
so it's wrong for all other arch too?

My point is that:
tb_gen_code(cpu, s.pc, s.flags2, s.flags, cflags);

is error prone, and it's easy to swap flags and flags2 by mistake.
I don't mind the name, but something more distinct would help.

> 
> r~



  reply	other threads:[~2025-04-28 22:28 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-28 20:10 [PATCH 00/10] accel/tcg: Compile cpu-exec.c twice Richard Henderson
2025-04-28 20:10 ` [PATCH 01/10] accel/tcg: Generalize fake_user_interrupt test Richard Henderson
2025-04-28 21:36   ` Pierrick Bouvier
2025-04-29  6:45   ` Philippe Mathieu-Daudé
2025-04-28 20:10 ` [PATCH 02/10] accel/tcg: Unconditionally use CPU_DUMP_CCOP in log_cpu_exec Richard Henderson
2025-04-28 21:37   ` Pierrick Bouvier
2025-04-28 20:10 ` [PATCH 03/10] accel/tcg: Introduce TCGCPUOps.cpu_exec_reset Richard Henderson
2025-04-28 21:38   ` Pierrick Bouvier
2025-04-29  6:44   ` Philippe Mathieu-Daudé
2025-04-29 19:53     ` Richard Henderson
2025-04-28 20:10 ` [PATCH 04/10] target/i386: Split out x86_cpu_exec_reset Richard Henderson
2025-04-28 21:40   ` Pierrick Bouvier
2025-04-28 20:10 ` [PATCH 05/10] accel/tcg: Hoist cpu_get_tb_cpu_state decl to accl/tcg/cpu-ops.h Richard Henderson
2025-04-28 21:43   ` Pierrick Bouvier
2025-04-28 20:10 ` [PATCH 06/10] target/riscv: Move cpu_get_tb_cpu_state to tcg-cpu.c Richard Henderson
2025-04-28 21:41   ` Pierrick Bouvier
2025-04-29  6:39   ` Philippe Mathieu-Daudé
2025-04-29 20:00     ` Richard Henderson
2025-04-28 20:10 ` [PATCH 07/10] accel/tcg: Return TCGTBCPUState from cpu_get_tb_cpu_state Richard Henderson
2025-04-28 22:00   ` Pierrick Bouvier
2025-04-28 22:07     ` Richard Henderson
2025-04-28 22:26       ` Pierrick Bouvier [this message]
2025-04-28 22:37         ` Richard Henderson
2025-04-29 18:55           ` Richard Henderson
2025-04-29 19:04             ` Pierrick Bouvier
2025-04-28 20:10 ` [PATCH 08/10] accel/tcg: Move cpu_get_tb_cpu_state to TCGCPUOps Richard Henderson
2025-04-28 21:49   ` Pierrick Bouvier
2025-04-28 20:10 ` [PATCH 09/10] accel/tcg: Split out accel/tcg/helper-retaddr.h Richard Henderson
2025-04-28 21:48   ` Pierrick Bouvier
2025-04-29  6:41   ` Philippe Mathieu-Daudé
2025-04-28 20:10 ` [PATCH 10/10] accel/tcg: Compile cpu-exec.c twice Richard Henderson
2025-04-28 21:41   ` Pierrick Bouvier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=db0b8cff-b79f-4f4f-8322-c9f41462cdd5@linaro.org \
    --to=pierrick.bouvier@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).