From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtlZA-0001Ss-2J for qemu-devel@nongnu.org; Mon, 01 Jul 2013 17:23:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UtlZ6-0000et-Q2 for qemu-devel@nongnu.org; Mon, 01 Jul 2013 17:23:19 -0400 Received: from cantor2.suse.de ([195.135.220.15]:47332 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtlNO-0004Sk-EB for qemu-devel@nongnu.org; Mon, 01 Jul 2013 17:11:10 -0400 Message-ID: <51D1F069.6080509@suse.de> Date: Mon, 01 Jul 2013 23:11:05 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1372709970-29244-1-git-send-email-rth@twiddle.net> <1372709970-29244-2-git-send-email-rth@twiddle.net> In-Reply-To: <1372709970-29244-2-git-send-email-rth@twiddle.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] target-alpha: Copy singlestep_enabled to DisasContext List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org Am 01.07.2013 22:19, schrieb Richard Henderson: > Prepare for removing env from DisasContext. >=20 > Signed-off-by: Richard Henderson > --- > target-alpha/translate.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) >=20 > 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=E4rber Thanks, Andreas > }; > =20 > /* 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) =3D=3D 0 > - && !ctx->env->singlestep_enabled > + && !ctx->singlestep_enabled > && !(ctx->tb->cflags & CF_LAST_IO)); > } > =20 > @@ -3396,6 +3398,7 @@ static inline void gen_intermediate_code_internal= (CPUAlphaState *env, > ctx.env =3D env; > ctx.pc =3D pc_start; > ctx.mem_idx =3D cpu_mmu_index(env); > + ctx.singlestep_enabled =3D env->singlestep_enabled; > =20 > /* ??? Every TB begins with unset rounding mode, to be initialized= on > the first fp insn of the TB. Alternately we could define a pro= per > @@ -3452,7 +3455,7 @@ static inline void gen_intermediate_code_internal= (CPUAlphaState *env, > || tcg_ctx.gen_opc_ptr >=3D gen_opc_end > || num_insns >=3D max_insns > || singlestep > - || env->singlestep_enabled)) { > + || ctx.singlestep_enabled)) { > ret =3D EXIT_PC_STALE; > } > } while (ret =3D=3D 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); --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg