From: Claudio Fontana <claudio.fontana@huawei.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH 5/5] target-arm/translate.c: Don't pass CPUARMState * to disas_arm_insn()
Date: Tue, 4 Nov 2014 09:55:15 +0100 [thread overview]
Message-ID: <54589473.5040804@huawei.com> (raw)
In-Reply-To: <1414524244-20316-6-git-send-email-peter.maydell@linaro.org>
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com>
On 28.10.2014 20:24, Peter Maydell wrote:
> Refactor to avoid passing a CPUARMState * to disas_arm_insn(). To do this
> we move the "read insn from memory" code to the callsite and pass the
> insn to the function instead.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> target-arm/translate.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/target-arm/translate.c b/target-arm/translate.c
> index 9e2dda2..932fa03 100644
> --- a/target-arm/translate.c
> +++ b/target-arm/translate.c
> @@ -7560,18 +7560,15 @@ static void gen_srs(DisasContext *s,
> tcg_temp_free_i32(addr);
> }
>
> -static void disas_arm_insn(CPUARMState * env, DisasContext *s)
> +static void disas_arm_insn(DisasContext *s, unsigned int insn)
> {
> - unsigned int cond, insn, val, op1, i, shift, rm, rs, rn, rd, sh;
> + unsigned int cond, val, op1, i, shift, rm, rs, rn, rd, sh;
> TCGv_i32 tmp;
> TCGv_i32 tmp2;
> TCGv_i32 tmp3;
> TCGv_i32 addr;
> TCGv_i64 tmp64;
>
> - insn = arm_ldl_code(env, s->pc, s->bswap_code);
> - s->pc += 4;
> -
> /* M variants do not implement ARM mode. */
> if (arm_dc_feature(s, ARM_FEATURE_M)) {
> goto illegal_op;
> @@ -11199,7 +11196,9 @@ static inline void gen_intermediate_code_internal(ARMCPU *cpu,
> }
> }
> } else {
> - disas_arm_insn(env, dc);
> + unsigned int insn = arm_ldl_code(env, dc->pc, dc->bswap_code);
> + dc->pc += 4;
> + disas_arm_insn(dc, insn);
> }
>
> if (dc->condjmp && !dc->is_jmp) {
>
--
Claudio Fontana
Server Virtualization Architect
Huawei Technologies Duesseldorf GmbH
Riesstraße 25 - 80992 München
office: +49 89 158834 4135
mobile: +49 15253060158
prev parent reply other threads:[~2014-11-04 8:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-28 19:23 [Qemu-devel] [PATCH 0/5] target-arm: Avoid passing CPUARMState around the decoder Peter Maydell
2014-10-28 19:24 ` [Qemu-devel] [PATCH 1/5] target-arm/translate.c: Use arm_dc_feature() in ENABLE_ARCH_ macros Peter Maydell
2014-10-31 13:09 ` Alex Bennée
2014-11-04 9:04 ` Claudio Fontana
2014-11-04 12:04 ` Peter Maydell
2014-10-28 19:24 ` [Qemu-devel] [PATCH 2/5] target-arm/translate.c: Use arm_dc_feature() rather than arm_feature() Peter Maydell
2014-10-31 13:40 ` Alex Bennée
2014-11-04 9:02 ` Claudio Fontana
2014-10-28 19:24 ` [Qemu-devel] [PATCH 3/5] target-arm/translate.c: Don't use IS_M() Peter Maydell
2014-10-31 13:42 ` Alex Bennée
2014-11-04 0:38 ` Peter Maydell
2014-11-04 8:59 ` Claudio Fontana
2014-10-28 19:24 ` [Qemu-devel] [PATCH 4/5] target-arm/translate.c: Don't pass CPUARMState around in the decoder Peter Maydell
2014-10-31 13:43 ` Alex Bennée
2014-11-04 8:57 ` Claudio Fontana
2014-10-28 19:24 ` [Qemu-devel] [PATCH 5/5] target-arm/translate.c: Don't pass CPUARMState * to disas_arm_insn() Peter Maydell
2014-10-31 13:47 ` Alex Bennée
2014-11-04 0:40 ` Peter Maydell
2014-11-04 8:55 ` Claudio Fontana [this message]
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=54589473.5040804@huawei.com \
--to=claudio.fontana@huawei.com \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.