Skip to contentSkip to conversation

[6949] target-mips: fix divu instruction

Qemu-devel Aurelien Jarno 1 participant 1 message Mar 29, 2009

lore
Share & tools
lore
#0 lore raw

Revision: 6949

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6949
Author:   aurel32
Date:     2009-03-29 15:36:47 +0000 (Sun, 29 Mar 2009)

Log Message:
-----------
target-mips: fix divu instruction

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

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

target-mips/translate.c +2 -0
@@ -1847,6 +1847,8 @@
         {
             int l1 = gen_new_label();
 
+            tcg_gen_ext32u_tl(t0, t0);
+            tcg_gen_ext32u_tl(t1, t1);
             tcg_gen_brcondi_tl(TCG_COND_EQ, t1, 0, l1);
             tcg_gen_divu_tl(cpu_LO[0], t0, t1);
             tcg_gen_remu_tl(cpu_HI[0], t0, t1);