From: Kohn E. D. <em...@cs...> - 2002-07-29 08:19:14
|
Hi Brian, The problem with 64 bit divisions on the 32 bit x86 architecture is that the processor provides support only for dividing a 64 bit number by a 32 bit number. In this case you need just a single instruction. However, if the divisor is 64 bit (i.e. its most significant 32 bits are not all zero), things go messy. As far as I know, all 32 bit compilers rely on a library routine for 64 bit division. So I think you will have to copy the routine from the runtime library. Emil On Sun, 28 Jul 2002, Brian Palmer wrote: > I would like to start using 64-bit integers in FreeLoader. But when I do > a 64-bit divide it doesn't seem to just generate a couple instructions > to do it. Instead it seems to call __udivdi3. Now since I do not use > standard headers or link against standard C-runtime libraries I do not > get this function. I am using DJGPP currently, and I do not know if > Mingw32 uses this crap also. Does anyone know if there is any way to get > around using this function or am I just going to have to copy it from > the compiler source? > > Brian > |