aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-28 17:36:30 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-28 17:36:30 +0000
commit12a4b2aa1d1aa9626990748544a30fed5af35f54 (patch)
treec6154cb7fe1cb006cb59ffbef0568c6ac13ff205
parentc811cf2c0314e5154deb073dad07ca3f0e39b16c (diff)
Fix ddivu for 32bit hosts, by Aurelien Jarno.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2890 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--target-mips/op_helper.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index 9092ffc39d..3d99d06fd7 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -237,16 +237,16 @@ void do_ddiv (void)
}
}
+#if TARGET_LONG_BITS > HOST_LONG_BITS
void do_ddivu (void)
{
if (T1 != 0) {
- /* XXX: lldivu? */
- lldiv_t res = lldiv(T0, T1);
- env->LO = (uint64_t)res.quot;
- env->HI = (uint64_t)res.rem;
+ env->LO = T0 / T1;
+ env->HI = T0 % T1;
}
}
#endif
+#endif /* TARGET_MIPS64 */
#if defined(CONFIG_USER_ONLY)
void do_mfc0_random (void)