From: Richard Henderson <richard.henderson@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH 03/16] target/i386: document and group DISAS_* constants
Date: Fri, 24 May 2024 07:23:30 -0700 [thread overview]
Message-ID: <a11a973a-bd0f-4f46-ae39-4dc1d7a65615@linaro.org> (raw)
In-Reply-To: <20240524081019.1141359-4-pbonzini@redhat.com>
On 5/24/24 01:10, Paolo Bonzini wrote:
> Place DISAS_* constants that update cpu_eip first, and
> the "jump" ones last. Add comments explaining the differences
> and usage.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> target/i386/tcg/translate.c | 25 ++++++++++++++++++++++---
> 1 file changed, 22 insertions(+), 3 deletions(-)
>
> diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
> index 3c7d8d72144..52d758a224b 100644
> --- a/target/i386/tcg/translate.c
> +++ b/target/i386/tcg/translate.c
> @@ -144,9 +144,28 @@ typedef struct DisasContext {
> TCGOp *prev_insn_end;
> } DisasContext;
>
> -#define DISAS_EOB_ONLY DISAS_TARGET_0
> -#define DISAS_EOB_NEXT DISAS_TARGET_1
> -#define DISAS_EOB_INHIBIT_IRQ DISAS_TARGET_2
> +/*
> + * Point EIP to next instruction before ending translation.
> + * For instructions that can change hflags.
> + */
> +#define DISAS_EOB_NEXT DISAS_TARGET_0
> +
> +/*
> + * Point EIP to next instruction and set HF_INHIBIT_IRQ if not
> + * already set. For instructions that activate interrupt shadow.
> + */
> +#define DISAS_EOB_INHIBIT_IRQ DISAS_TARGET_1
> +
> +/*
> + * EIP has already been updated. For jumps that do not use
> + * lookup_and_goto_ptr()
> + */
> +#define DISAS_EOB_ONLY DISAS_TARGET_2
Better as "for instructions that must return to the main loop", because pure jumps should
either use goto_tb (DISAS_NORETURN) or lookup_and_goto_ptr (DISAS_JUMP).
Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2024-05-24 14:24 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-24 8:10 [PATCH 00/16] target/i386/tcg: translation cleanups Paolo Bonzini
2024-05-24 8:10 ` [PATCH 01/16] target/i386: remove unnecessary gen_update_cc_op before gen_eob* Paolo Bonzini
2024-05-24 14:11 ` Richard Henderson
2024-05-24 8:10 ` [PATCH 02/16] target/i386: cleanup eob handling of RSM Paolo Bonzini
2024-05-24 14:14 ` Richard Henderson
2024-05-24 8:10 ` [PATCH 03/16] target/i386: document and group DISAS_* constants Paolo Bonzini
2024-05-24 14:20 ` Richard Henderson
2024-05-24 14:23 ` Richard Henderson [this message]
2024-05-24 15:02 ` Paolo Bonzini
2024-05-24 15:04 ` Paolo Bonzini
2024-05-24 15:13 ` Richard Henderson
2024-05-24 15:18 ` Paolo Bonzini
2024-05-24 8:10 ` [PATCH 04/16] target/i386: avoid calling gen_eob_syscall before tb_stop Paolo Bonzini
2024-05-24 14:27 ` Richard Henderson
2024-05-24 8:10 ` [PATCH 05/16] target/i386: avoid calling gen_eob_inhibit_irq " Paolo Bonzini
2024-05-24 14:29 ` Richard Henderson
2024-05-24 8:10 ` [PATCH 06/16] target/i386: assert that gen_update_eip_cur and gen_update_eip_next are the same in tb_stop Paolo Bonzini
2024-05-24 14:30 ` Richard Henderson
2024-05-24 8:10 ` [PATCH 07/16] target/i386: raze the gen_eob* jungle Paolo Bonzini
2024-05-24 14:32 ` Richard Henderson
2024-05-24 8:10 ` [PATCH 08/16] target/i386: reg in gen_ldst_modrm is always OR_TMP0 Paolo Bonzini
2024-05-24 14:33 ` Richard Henderson
2024-05-24 8:10 ` [PATCH 09/16] target/i386: split gen_ldst_modrm for load and store Paolo Bonzini
2024-05-24 14:34 ` Richard Henderson
2024-05-24 8:10 ` [PATCH 10/16] target/i386: inline gen_add_A0_ds_seg Paolo Bonzini
2024-05-24 14:35 ` Richard Henderson
2024-05-24 8:10 ` [PATCH 11/16] target/i386: use mo_stacksize more Paolo Bonzini
2024-05-24 14:36 ` Richard Henderson
2024-05-24 8:10 ` [PATCH 12/16] target/i386: introduce gen_lea_ss_ofs Paolo Bonzini
2024-05-24 14:53 ` Richard Henderson
2024-05-24 8:10 ` [PATCH 13/16] target/i386: clean up repeated string operations Paolo Bonzini
2024-05-24 14:58 ` Richard Henderson
2024-05-24 8:10 ` [PATCH 14/16] target/i386: remove aflag argument of gen_lea_v_seg Paolo Bonzini
2024-05-24 14:59 ` Richard Henderson
2024-05-24 8:10 ` [PATCH 15/16] target/i386: cpu_load_eflags already sets cc_op Paolo Bonzini
2024-05-24 15:02 ` Richard Henderson
2024-05-24 8:10 ` [PATCH 16/16] target/i386: set CC_OP in helpers if they want CC_OP_EFLAGS Paolo Bonzini
2024-05-24 15:07 ` Richard Henderson
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=a11a973a-bd0f-4f46-ae39-4dc1d7a65615@linaro.org \
--to=richard.henderson@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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).