aboutsummaryrefslogtreecommitdiff
path: root/target-i386/helper.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-21 10:12:54 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-21 10:12:54 +0000
commit0211e5aff995ee55722148923a7fc317796e4114 (patch)
tree0957c189e7296c7b40fbc3a472fa16ae3d54d5bd /target-i386/helper.c
parent30898801ad8c70708ead392b243ca8bcd28ca722 (diff)
converted MUL/IMUL to TCG
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4508 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/helper.c')
-rw-r--r--target-i386/helper.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c
index d888eaf9c3..53224919f8 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -1609,22 +1609,6 @@ void helper_rsm(void)
#endif /* !CONFIG_USER_ONLY */
-#ifdef BUGGY_GCC_DIV64
-/* gcc 2.95.4 on PowerPC does not seem to like using __udivdi3, so we
- call it from another function */
-uint32_t div32(uint64_t *q_ptr, uint64_t num, uint32_t den)
-{
- *q_ptr = num / den;
- return num % den;
-}
-
-int32_t idiv32(int64_t *q_ptr, int64_t num, int32_t den)
-{
- *q_ptr = num / den;
- return num % den;
-}
-#endif
-
/* division, flags are undefined */
void helper_divb_AL(target_ulong t0)
@@ -1707,12 +1691,8 @@ void helper_divl_EAX(target_ulong t0)
if (den == 0) {
raise_exception(EXCP00_DIVZ);
}
-#ifdef BUGGY_GCC_DIV64
- r = div32(&q, num, den);
-#else
q = (num / den);
r = (num % den);
-#endif
if (q > 0xffffffff)
raise_exception(EXCP00_DIVZ);
EAX = (uint32_t)q;
@@ -1729,12 +1709,8 @@ void helper_idivl_EAX(target_ulong t0)
if (den == 0) {
raise_exception(EXCP00_DIVZ);
}
-#ifdef BUGGY_GCC_DIV64
- r = idiv32(&q, num, den);
-#else
q = (num / den);
r = (num % den);
-#endif
if (q != (int32_t)q)
raise_exception(EXCP00_DIVZ);
EAX = (uint32_t)q;