From: "Andreas Färber" <afaerber@suse.de>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] target-alpha: Copy singlestep_enabled to DisasContext
Date: Mon, 01 Jul 2013 23:11:05 +0200 [thread overview]
Message-ID: <51D1F069.6080509@suse.de> (raw)
In-Reply-To: <1372709970-29244-2-git-send-email-rth@twiddle.net>
Am 01.07.2013 22:19, schrieb Richard Henderson:
> Prepare for removing env from DisasContext.
>
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
> target-alpha/translate.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/target-alpha/translate.c b/target-alpha/translate.c
> index 4db16db..b59f919 100644
> --- a/target-alpha/translate.c
> +++ b/target-alpha/translate.c
> @@ -46,6 +46,8 @@ struct DisasContext {
> int tb_rm;
> /* Current flush-to-zero setting for this TB. */
> int tb_ftz;
> +
> + bool singlestep_enabled;
env->singlestep_enabled is an int containing flags. Below it's only used
as a boolean though, so
Reviewed-by: Andreas Färber <afaerber@suse.de>
Thanks,
Andreas
> };
>
> /* Return values from translate_one, indicating the state of the TB.
> @@ -380,7 +382,7 @@ static int use_goto_tb(DisasContext *ctx, uint64_t dest)
> /* Check for the dest on the same page as the start of the TB. We
> also want to suppress goto_tb in the case of single-steping and IO. */
> return (((ctx->tb->pc ^ dest) & TARGET_PAGE_MASK) == 0
> - && !ctx->env->singlestep_enabled
> + && !ctx->singlestep_enabled
> && !(ctx->tb->cflags & CF_LAST_IO));
> }
>
> @@ -3396,6 +3398,7 @@ static inline void gen_intermediate_code_internal(CPUAlphaState *env,
> ctx.env = env;
> ctx.pc = pc_start;
> ctx.mem_idx = cpu_mmu_index(env);
> + ctx.singlestep_enabled = env->singlestep_enabled;
>
> /* ??? Every TB begins with unset rounding mode, to be initialized on
> the first fp insn of the TB. Alternately we could define a proper
> @@ -3452,7 +3455,7 @@ static inline void gen_intermediate_code_internal(CPUAlphaState *env,
> || tcg_ctx.gen_opc_ptr >= gen_opc_end
> || num_insns >= max_insns
> || singlestep
> - || env->singlestep_enabled)) {
> + || ctx.singlestep_enabled)) {
> ret = EXIT_PC_STALE;
> }
> } while (ret == NO_EXIT);
> @@ -3469,7 +3472,7 @@ static inline void gen_intermediate_code_internal(CPUAlphaState *env,
> tcg_gen_movi_i64(cpu_pc, ctx.pc);
> /* FALLTHRU */
> case EXIT_PC_UPDATED:
> - if (env->singlestep_enabled) {
> + if (ctx.singlestep_enabled) {
> gen_excp_1(EXCP_DEBUG, 0);
> } else {
> tcg_gen_exit_tb(0);
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2013-07-01 21:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-01 20:19 [Qemu-devel] [PATCH 0/2] target-alpha prep work for qom cpu changes Richard Henderson
2013-07-01 20:19 ` [Qemu-devel] [PATCH 1/2] target-alpha: Copy singlestep_enabled to DisasContext Richard Henderson
2013-07-01 21:11 ` Andreas Färber [this message]
2013-07-01 20:19 ` [Qemu-devel] [PATCH 2/2] target-alpha: Copy implver " Richard Henderson
2013-07-06 0:55 ` Andreas Färber
2013-07-06 1:43 ` [Qemu-devel] [PATCH 0/2] target-alpha prep work for qom cpu changes Andreas Färber
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=51D1F069.6080509@suse.de \
--to=afaerber@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).