All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [5803] target-ppc: simplify evsplati and evsplatfi
Date: Thu, 27 Nov 2008 19:30:39 +0000	[thread overview]
Message-ID: <E1L5mZS-0001Hj-Sy@cvs.savannah.gnu.org> (raw)

Revision: 5803
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5803
Author:   aurel32
Date:     2008-11-27 19:30:38 +0000 (Thu, 27 Nov 2008)

Log Message:
-----------
target-ppc: simplify evsplati and evsplatfi

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

Modified Paths:
--------------
    trunk/target-ppc/translate.c

Modified: trunk/target-ppc/translate.c
===================================================================
--- trunk/target-ppc/translate.c	2008-11-27 15:47:15 UTC (rev 5802)
+++ trunk/target-ppc/translate.c	2008-11-27 19:30:38 UTC (rev 5803)
@@ -6569,16 +6569,10 @@
 }
 static always_inline void gen_evsplati (DisasContext *ctx)
 {
-    int32_t imm = (int32_t)(rA(ctx->opcode) << 11) >> 27;
+    uint64_t imm = ((int32_t)(rA(ctx->opcode) << 11)) >> 27;
 
 #if defined(TARGET_PPC64)
-    TCGv t0 = tcg_temp_new();
-    TCGv t1 = tcg_temp_new();
-    tcg_gen_movi_tl(t0, imm);
-    tcg_gen_shri_tl(t1, t0, 32);
-    tcg_gen_or_tl(cpu_gpr[rD(ctx->opcode)], t0, t1);
-    tcg_temp_free(t0);
-    tcg_temp_free(t1);
+    tcg_gen_movi_tl(cpu_gpr[rD(ctx->opcode)], (imm << 32) | imm);
 #else
     tcg_gen_movi_i32(cpu_gpr[rD(ctx->opcode)], imm);
     tcg_gen_movi_i32(cpu_gprh[rD(ctx->opcode)], imm);
@@ -6586,16 +6580,10 @@
 }
 static always_inline void gen_evsplatfi (DisasContext *ctx)
 {
-    uint32_t imm = rA(ctx->opcode) << 11;
+    uint64_t imm = rA(ctx->opcode) << 11;
 
 #if defined(TARGET_PPC64)
-    TCGv t0 = tcg_temp_new();
-    TCGv t1 = tcg_temp_new();
-    tcg_gen_movi_tl(t0, imm);
-    tcg_gen_shri_tl(t1, t0, 32);
-    tcg_gen_or_tl(cpu_gpr[rD(ctx->opcode)], t0, t1);
-    tcg_temp_free(t0);
-    tcg_temp_free(t1);
+    tcg_gen_movi_tl(cpu_gpr[rD(ctx->opcode)], (imm << 32) | imm);
 #else
     tcg_gen_movi_i32(cpu_gpr[rD(ctx->opcode)], imm);
     tcg_gen_movi_i32(cpu_gprh[rD(ctx->opcode)], imm);

                 reply	other threads:[~2008-11-27 19:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E1L5mZS-0001Hj-Sy@cvs.savannah.gnu.org \
    --to=aurelien@aurel32.net \
    --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.