From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: afaerber@suse.de
Subject: [Qemu-devel] [PATCH 2/2] target-alpha: Copy implver to DisasContext
Date: Mon, 1 Jul 2013 13:19:30 -0700 [thread overview]
Message-ID: <1372709970-29244-3-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1372709970-29244-1-git-send-email-rth@twiddle.net>
Which allows removing env from DisasContext.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
target-alpha/translate.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index b59f919..7dac0c8 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -38,7 +38,6 @@
typedef struct DisasContext DisasContext;
struct DisasContext {
struct TranslationBlock *tb;
- CPUAlphaState *env;
uint64_t pc;
int mem_idx;
@@ -47,6 +46,9 @@ struct DisasContext {
/* Current flush-to-zero setting for this TB. */
int tb_ftz;
+ /* implver value for this CPU. */
+ int implver;
+
bool singlestep_enabled;
};
@@ -2246,8 +2248,9 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn)
break;
case 0x6C:
/* IMPLVER */
- if (rc != 31)
- tcg_gen_movi_i64(cpu_ir[rc], ctx->env->implver);
+ if (rc != 31) {
+ tcg_gen_movi_i64(cpu_ir[rc], ctx->implver);
+ }
break;
default:
goto invalid_opc;
@@ -3395,9 +3398,9 @@ static inline void gen_intermediate_code_internal(CPUAlphaState *env,
gen_opc_end = tcg_ctx.gen_opc_buf + OPC_MAX_SIZE;
ctx.tb = tb;
- ctx.env = env;
ctx.pc = pc_start;
ctx.mem_idx = cpu_mmu_index(env);
+ ctx.implver = env->implver;
ctx.singlestep_enabled = env->singlestep_enabled;
/* ??? Every TB begins with unset rounding mode, to be initialized on
--
1.8.1.4
next prev parent reply other threads:[~2013-07-01 20:20 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
2013-07-01 20:19 ` Richard Henderson [this message]
2013-07-06 0:55 ` [Qemu-devel] [PATCH 2/2] target-alpha: Copy implver " 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=1372709970-29244-3-git-send-email-rth@twiddle.net \
--to=rth@twiddle.net \
--cc=afaerber@suse.de \
--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).