qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [4946] Fix and improve 64 bit immediate loading
@ 2008-07-26 11:20 malc
  0 siblings, 0 replies; only message in thread
From: malc @ 2008-07-26 11:20 UTC (permalink / raw)
  To: qemu-devel

Revision: 4946
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4946
Author:   malc
Date:     2008-07-26 11:20:50 +0000 (Sat, 26 Jul 2008)

Log Message:
-----------
Fix and improve 64 bit immediate loading

Modified Paths:
--------------
    trunk/tcg/ppc64/tcg-target.c

Modified: trunk/tcg/ppc64/tcg-target.c
===================================================================
--- trunk/tcg/ppc64/tcg-target.c	2008-07-26 11:20:44 UTC (rev 4945)
+++ trunk/tcg/ppc64/tcg-target.c	2008-07-26 11:20:50 UTC (rev 4946)
@@ -448,15 +448,18 @@
     }
     else {
         if ((uint64_t) arg >> 32) {
+            uint16_t h16 = arg >> 16;
+            uint16_t l16 = arg;
+
             tcg_out_movi32 (s, ret, (arg >> 32) + (arg32 < 0));
             tcg_out_rld (s, RLDICR, ret, ret, 32, 31);
-            if (arg32) {
-                tcg_out_movi32 (s, 0, arg32);
-                tcg_out32 (s, ADD | TAB (ret, ret, 0));
-            }
+            if (h16) tcg_out32 (s, ORIS | RS (ret) | RA (ret) | h16);
+            if (l16) tcg_out32 (s, ORI | RS (ret) | RA (ret) | l16);
         }
         else {
             tcg_out_movi32 (s, ret, arg32);
+            if (arg32 < 0)
+                tcg_out_rld (s, RLDICL, ret, ret, 0, 32);
         }
     }
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-26 11:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-26 11:20 [Qemu-devel] [4946] Fix and improve 64 bit immediate loading malc

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