qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [7041] target-mips: optimize gen_cp1()
Date: Wed, 08 Apr 2009 21:47:44 +0000	[thread overview]
Message-ID: <E1LrfcW-0002lb-Ii@cvs.savannah.gnu.org> (raw)

Revision: 7041
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7041
Author:   aurel32
Date:     2009-04-08 21:47:44 +0000 (Wed, 08 Apr 2009)
Log Message:
-----------
target-mips: optimize gen_cp1()

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

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

Modified: trunk/target-mips/translate.c
===================================================================
--- trunk/target-mips/translate.c	2009-04-08 21:47:35 UTC (rev 7040)
+++ trunk/target-mips/translate.c	2009-04-08 21:47:44 UTC (rev 7041)
@@ -5578,7 +5578,7 @@
 static void gen_cp1 (DisasContext *ctx, uint32_t opc, int rt, int fs)
 {
     const char *opn = "cp1 move";
-    TCGv t0 = tcg_temp_local_new();
+    TCGv t0 = tcg_temp_new();
 
     switch (opc) {
     case OPC_MFC1:
@@ -5613,28 +5613,18 @@
         gen_helper_1i(ctc1, t0, fs);
         opn = "ctc1";
         break;
+#if defined(TARGET_MIPS64)
     case OPC_DMFC1:
-        {
-            TCGv_i64 fp0 = tcg_temp_new_i64();
-
-            gen_load_fpr64(ctx, fp0, fs);
-            tcg_gen_trunc_i64_tl(t0, fp0);
-            tcg_temp_free_i64(fp0);
-        }
+        gen_load_fpr64(ctx, t0, fs);
         gen_store_gpr(t0, rt);
         opn = "dmfc1";
         break;
     case OPC_DMTC1:
         gen_load_gpr(t0, rt);
-        {
-            TCGv_i64 fp0 = tcg_temp_new_i64();
-
-            tcg_gen_extu_tl_i64(fp0, t0);
-            gen_store_fpr64(ctx, fp0, fs);
-            tcg_temp_free_i64(fp0);
-        }
+        gen_store_fpr64(ctx, t0, fs);
         opn = "dmtc1";
         break;
+#endif
     case OPC_MFHC1:
         {
             TCGv_i32 fp0 = tcg_temp_new_i32();

                 reply	other threads:[~2009-04-08 21:47 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=E1LrfcW-0002lb-Ii@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 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).