qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [4854] Fix 64 bit constant generation
@ 2008-07-07 19:34 Blue Swirl
  0 siblings, 0 replies; only message in thread
From: Blue Swirl @ 2008-07-07 19:34 UTC (permalink / raw)
  To: qemu-devel

Revision: 4854
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4854
Author:   blueswir1
Date:     2008-07-07 19:34:45 +0000 (Mon, 07 Jul 2008)

Log Message:
-----------
Fix 64 bit constant generation

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

Modified: trunk/tcg/sparc/tcg-target.c
===================================================================
--- trunk/tcg/sparc/tcg-target.c	2008-07-07 19:29:49 UTC (rev 4853)
+++ trunk/tcg/sparc/tcg-target.c	2008-07-07 19:34:45 UTC (rev 4854)
@@ -304,11 +304,10 @@
 {
 #if defined(__sparc_v9__) && !defined(__sparc_v8plus__)
     if (!check_fit_tl(arg, 32) && (arg & ~0xffffffffULL) != 0) {
-        // XXX ret may be I5, need another temp
-        tcg_out_movi_imm32(s, TCG_REG_I5, arg >> 32);
-        tcg_out_arithi(s, TCG_REG_I5, TCG_REG_I5, 32, SHIFT_SLLX);
+        tcg_out_movi_imm32(s, TCG_REG_I4, arg >> 32);
+        tcg_out_arithi(s, TCG_REG_I4, TCG_REG_I4, 32, SHIFT_SLLX);
         tcg_out_movi_imm32(s, ret, arg);
-        tcg_out_arith(s, ret, ret, TCG_REG_I5, ARITH_OR);
+        tcg_out_arith(s, ret, ret, TCG_REG_I4, ARITH_OR);
     } else
 #endif
         tcg_out_movi_imm32(s, ret, arg);
@@ -1137,6 +1136,9 @@
 
     tcg_regset_clear(s->reserved_regs);
     tcg_regset_set_reg(s->reserved_regs, TCG_REG_G0);
+#if defined(__sparc_v9__) && !defined(__sparc_v8plus__)
+    tcg_regset_set_reg(s->reserved_regs, TCG_REG_I4); // for internal use
+#endif
     tcg_regset_set_reg(s->reserved_regs, TCG_REG_I5); // for internal use
     tcg_regset_set_reg(s->reserved_regs, TCG_REG_I6);
     tcg_regset_set_reg(s->reserved_regs, TCG_REG_I7);

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

only message in thread, other threads:[~2008-07-07 19:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-07 19:34 [Qemu-devel] [4854] Fix 64 bit constant generation Blue Swirl

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