qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [4622] Fix for 32-bit MIPS.
@ 2008-05-30  0:12 Thiemo Seufer
  2008-06-01  7:50 ` [Qemu-devel] " Richard Sandiford
  0 siblings, 1 reply; 2+ messages in thread
From: Thiemo Seufer @ 2008-05-30  0:12 UTC (permalink / raw)
  To: qemu-devel

Revision: 4622
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4622
Author:   ths
Date:     2008-05-30 00:12:52 +0000 (Fri, 30 May 2008)

Log Message:
-----------
Fix for 32-bit MIPS.

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

Modified: trunk/target-mips/translate.c
===================================================================
--- trunk/target-mips/translate.c	2008-05-29 18:29:05 UTC (rev 4621)
+++ trunk/target-mips/translate.c	2008-05-30 00:12:52 UTC (rev 4622)
@@ -1904,15 +1904,16 @@
             {
                 TCGv r_tmp1 = tcg_temp_new(TCG_TYPE_I64);
                 TCGv r_tmp2 = tcg_temp_new(TCG_TYPE_I64);
+                TCGv r_tmp3 = tcg_temp_new(TCG_TYPE_I64);
 
-                tcg_gen_ext32s_tl(cpu_T[0], cpu_T[0]);
-                tcg_gen_ext32s_tl(cpu_T[1], cpu_T[1]);
-                tcg_gen_div_i64(r_tmp1, cpu_T[0], cpu_T[1]);
-                tcg_gen_rem_i64(r_tmp2, cpu_T[0], cpu_T[1]);
-                tcg_gen_ext32s_tl(r_tmp1, r_tmp1);
-                tcg_gen_ext32s_tl(r_tmp2, r_tmp2);
-                gen_store_LO(r_tmp1, 0);
-                gen_store_HI(r_tmp2, 0);
+                tcg_gen_ext_tl_i64(r_tmp1, cpu_T[0]);
+                tcg_gen_ext_tl_i64(r_tmp2, cpu_T[1]);
+                tcg_gen_div_i64(r_tmp3, r_tmp1, r_tmp2);
+                tcg_gen_rem_i64(r_tmp2, r_tmp1, r_tmp2);
+                tcg_gen_trunc_i64_tl(cpu_T[0], r_tmp3);
+                tcg_gen_trunc_i64_tl(cpu_T[1], r_tmp2);
+                gen_store_LO(cpu_T[0], 0);
+                gen_store_HI(cpu_T[1], 0);
             }
             gen_set_label(l1);
         }

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

end of thread, other threads:[~2008-06-01  7:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-30  0:12 [Qemu-devel] [4622] Fix for 32-bit MIPS Thiemo Seufer
2008-06-01  7:50 ` [Qemu-devel] " Richard Sandiford

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