From: Aurelien Jarno <aurelien@aurel32.net>
To: Tristan Gingold <gingold@adacore.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Alpha: remove amask helper
Date: Fri, 10 Apr 2009 23:27:30 +0200 [thread overview]
Message-ID: <20090410212730.GC8217@volta.aurel32.net> (raw)
In-Reply-To: <1239353885-68017-1-git-send-email-gingold@adacore.com>
On Fri, Apr 10, 2009 at 10:58:05AM +0200, Tristan Gingold wrote:
> The direct use of helper_amask in translate.c was bogus (as env is not
> assigned). Directly code amask in tcg and remove the helper.
>
> Signed-off-by: Tristan Gingold <gingold@adacore.com>
> ---
> target-alpha/helper.h | 1 -
> target-alpha/op_helper.c | 15 ---------------
> target-alpha/translate.c | 15 +++++++++++++--
> 3 files changed, 13 insertions(+), 18 deletions(-)
Thanks, applied
> diff --git a/target-alpha/helper.h b/target-alpha/helper.h
> index f62b1c2..a4faca2 100644
> --- a/target-alpha/helper.h
> +++ b/target-alpha/helper.h
> @@ -3,7 +3,6 @@
> DEF_HELPER_0(tb_flush, void)
>
> DEF_HELPER_2(excp, void, int, int)
> -DEF_HELPER_1(amask, i64, i64)
> DEF_HELPER_0(load_pcc, i64)
> DEF_HELPER_0(rc, i64)
> DEF_HELPER_0(rs, i64)
> diff --git a/target-alpha/op_helper.c b/target-alpha/op_helper.c
> index 59010fc..e9c7d28 100644
> --- a/target-alpha/op_helper.c
> +++ b/target-alpha/op_helper.c
> @@ -37,21 +37,6 @@ void helper_excp (int excp, int error)
> cpu_loop_exit();
> }
>
> -uint64_t helper_amask (uint64_t arg)
> -{
> - switch (env->implver) {
> - case IMPLVER_2106x:
> - /* EV4, EV45, LCA, LCA45 & EV5 */
> - break;
> - case IMPLVER_21164:
> - case IMPLVER_21264:
> - case IMPLVER_21364:
> - arg &= ~env->amask;
> - break;
> - }
> - return arg;
> -}
> -
> uint64_t helper_load_pcc (void)
> {
> /* XXX: TODO */
> diff --git a/target-alpha/translate.c b/target-alpha/translate.c
> index 11b8139..a971b03 100644
> --- a/target-alpha/translate.c
> +++ b/target-alpha/translate.c
> @@ -1160,9 +1160,20 @@ static always_inline int translate_one (DisasContext *ctx, uint32_t insn)
> /* AMASK */
> if (likely(rc != 31)) {
> if (islit)
> - tcg_gen_movi_i64(cpu_ir[rc], helper_amask(lit));
> + tcg_gen_movi_i64(cpu_ir[rc], lit);
> else
> - gen_helper_amask(cpu_ir[rc], cpu_ir[rb]);
> + tcg_gen_mov_i64(cpu_ir[rc], cpu_ir[rb]);
> + switch (ctx->env->implver) {
> + case IMPLVER_2106x:
> + /* EV4, EV45, LCA, LCA45 & EV5 */
> + break;
> + case IMPLVER_21164:
> + case IMPLVER_21264:
> + case IMPLVER_21364:
> + tcg_gen_andi_i64(cpu_ir[rc], cpu_ir[rc],
> + ~(uint64_t)ctx->amask);
> + break;
> + }
> }
> break;
> case 0x64:
> --
> 1.6.2
>
>
>
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
prev parent reply other threads:[~2009-04-10 21:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-10 8:58 [Qemu-devel] [PATCH] Alpha: remove amask helper Tristan Gingold
2009-04-10 21:27 ` Aurelien Jarno [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=20090410212730.GC8217@volta.aurel32.net \
--to=aurelien@aurel32.net \
--cc=gingold@adacore.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).