qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Alpha: remove helper_load_implver
@ 2009-04-10  8:56 Tristan Gingold
  2009-04-10 21:27 ` Aurelien Jarno
  0 siblings, 1 reply; 2+ messages in thread
From: Tristan Gingold @ 2009-04-10  8:56 UTC (permalink / raw)
  To: qemu-devel

There is no need to use an helper.  Directly load the value with tcg code.

Signed-off-by: Tristan Gingold <gingold@adacore.com>
---
 target-alpha/helper.h    |    1 -
 target-alpha/op_helper.c |    5 -----
 target-alpha/translate.c |    4 +++-
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/target-alpha/helper.h b/target-alpha/helper.h
index 4c4855d..f62b1c2 100644
--- a/target-alpha/helper.h
+++ b/target-alpha/helper.h
@@ -5,7 +5,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(load_implver, 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 3c95e98..59010fc 100644
--- a/target-alpha/op_helper.c
+++ b/target-alpha/op_helper.c
@@ -58,11 +58,6 @@ uint64_t helper_load_pcc (void)
     return 0;
 }
 
-uint64_t helper_load_implver (void)
-{
-    return env->implver;
-}
-
 uint64_t helper_load_fpcr (void)
 {
     uint64_t ret = 0;
diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index 9702214..11b8139 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -51,6 +51,7 @@ struct DisasContext {
 #if !defined (CONFIG_USER_ONLY)
     int pal_mode;
 #endif
+    CPUAlphaState *env;
     uint32_t amask;
 };
 
@@ -1175,7 +1176,7 @@ static always_inline int translate_one (DisasContext *ctx, uint32_t insn)
         case 0x6C:
             /* IMPLVER */
             if (rc != 31)
-                gen_helper_load_implver(cpu_ir[rc]);
+                tcg_gen_movi_i64(cpu_ir[rc], ctx->env->implver);
             break;
         default:
             goto invalid_opc;
@@ -2346,6 +2347,7 @@ static always_inline void gen_intermediate_code_internal (CPUState *env,
     gen_opc_end = gen_opc_buf + OPC_MAX_SIZE;
     ctx.pc = pc_start;
     ctx.amask = env->amask;
+    ctx.env = env;
 #if defined (CONFIG_USER_ONLY)
     ctx.mem_idx = 0;
 #else
-- 
1.6.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] Alpha: remove helper_load_implver
  2009-04-10  8:56 [Qemu-devel] [PATCH] Alpha: remove helper_load_implver Tristan Gingold
@ 2009-04-10 21:27 ` Aurelien Jarno
  0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Jarno @ 2009-04-10 21:27 UTC (permalink / raw)
  To: Tristan Gingold; +Cc: qemu-devel

On Fri, Apr 10, 2009 at 10:56:31AM +0200, Tristan Gingold wrote:
> There is no need to use an helper.  Directly load the value with tcg code.
> 
> Signed-off-by: Tristan Gingold <gingold@adacore.com>
> ---
>  target-alpha/helper.h    |    1 -
>  target-alpha/op_helper.c |    5 -----
>  target-alpha/translate.c |    4 +++-
>  3 files changed, 3 insertions(+), 7 deletions(-)

Thanks, applied.

> diff --git a/target-alpha/helper.h b/target-alpha/helper.h
> index 4c4855d..f62b1c2 100644
> --- a/target-alpha/helper.h
> +++ b/target-alpha/helper.h
> @@ -5,7 +5,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(load_implver, 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 3c95e98..59010fc 100644
> --- a/target-alpha/op_helper.c
> +++ b/target-alpha/op_helper.c
> @@ -58,11 +58,6 @@ uint64_t helper_load_pcc (void)
>      return 0;
>  }
>  
> -uint64_t helper_load_implver (void)
> -{
> -    return env->implver;
> -}
> -
>  uint64_t helper_load_fpcr (void)
>  {
>      uint64_t ret = 0;
> diff --git a/target-alpha/translate.c b/target-alpha/translate.c
> index 9702214..11b8139 100644
> --- a/target-alpha/translate.c
> +++ b/target-alpha/translate.c
> @@ -51,6 +51,7 @@ struct DisasContext {
>  #if !defined (CONFIG_USER_ONLY)
>      int pal_mode;
>  #endif
> +    CPUAlphaState *env;
>      uint32_t amask;
>  };
>  
> @@ -1175,7 +1176,7 @@ static always_inline int translate_one (DisasContext *ctx, uint32_t insn)
>          case 0x6C:
>              /* IMPLVER */
>              if (rc != 31)
> -                gen_helper_load_implver(cpu_ir[rc]);
> +                tcg_gen_movi_i64(cpu_ir[rc], ctx->env->implver);
>              break;
>          default:
>              goto invalid_opc;
> @@ -2346,6 +2347,7 @@ static always_inline void gen_intermediate_code_internal (CPUState *env,
>      gen_opc_end = gen_opc_buf + OPC_MAX_SIZE;
>      ctx.pc = pc_start;
>      ctx.amask = env->amask;
> +    ctx.env = env;
>  #if defined (CONFIG_USER_ONLY)
>      ctx.mem_idx = 0;
>  #else
> -- 
> 1.6.2
> 
> 
> 
> 

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-10 21:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-10  8:56 [Qemu-devel] [PATCH] Alpha: remove helper_load_implver Tristan Gingold
2009-04-10 21:27 ` Aurelien Jarno

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).