From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LsCYu-0001Ma-6P for qemu-devel@nongnu.org; Fri, 10 Apr 2009 04:58:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LsCYp-0001Ln-GF for qemu-devel@nongnu.org; Fri, 10 Apr 2009 04:58:11 -0400 Received: from [199.232.76.173] (port=38087 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LsCYo-0001Lf-U5 for qemu-devel@nongnu.org; Fri, 10 Apr 2009 04:58:07 -0400 Received: from mel.act-europe.fr ([212.99.106.210]:48120) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LsCYo-0002cP-AY for qemu-devel@nongnu.org; Fri, 10 Apr 2009 04:58:06 -0400 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id D78A129002D for ; Fri, 10 Apr 2009 10:58:05 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CF+LpCh-n-qo for ; Fri, 10 Apr 2009 10:58:05 +0200 (CEST) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) by mel.act-europe.fr (Postfix) with ESMTP id 26BFF2900BF for ; Fri, 10 Apr 2009 10:58:05 +0200 (CEST) From: Tristan Gingold Date: Fri, 10 Apr 2009 10:58:05 +0200 Message-Id: <1239353885-68017-1-git-send-email-gingold@adacore.com> Subject: [Qemu-devel] [PATCH] Alpha: remove amask helper Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- target-alpha/helper.h | 1 - target-alpha/op_helper.c | 15 --------------- target-alpha/translate.c | 15 +++++++++++++-- 3 files changed, 13 insertions(+), 18 deletions(-) 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