Skip to contentSkip to conversation

[4508] converted MUL/IMUL to TCG

Qemu-devel Fabrice Bellard 1 participant 1 message May 21, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 4508

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4508
Author:   bellard
Date:     2008-05-21 10:12:54 +0000 (Wed, 21 May 2008)

Log Message:
-----------
converted MUL/IMUL to TCG

Modified Paths:
--------------

    trunk/target-i386/helper.c
    trunk/target-i386/op.c
    trunk/target-i386/translate.c

Modified: trunk/target-i386/helper.c
===================================================================

target-i386/helper.c +0 -24
@@ -1609,22 +1609,6 @@
 #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 @@
     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 @@
     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;

Modified: trunk/target-i386/op.c
===================================================================

target-i386/op.c +0 -98

104 lines not on this page · raw message

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

target-i386/translate.c +129 -11

184 lines not on this page · raw message