News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

c++ __aulldiv function

Started by ToutEnMasm, October 20, 2010, 12:44:56 PM

Previous topic - Next topic

ToutEnMasm

Translating a c++ cofe with /FA ,I have found this function that isn't in any library.
Is there someone who have his code or his object ?

Quote
   push   0
   push   10000000            ; 00989680H
   push   edx
   push   ecx
   call   __aulldiv


redskull

64-bit division (unsigned long long div)?  It's exported from ntdll.dll, so it's a windows function, not C++

-r
Strange women, lying in ponds, distributing swords, is no basis for a system of government

ToutEnMasm

Yes it is that.
It is in use by the time64 function.

ToutEnMasm


drizz

it is 32bit c runtime hidden function used for unsigned 64 division whenever you write something like:

unsigned __int64 x=nx,y=ny;

x/=y;

is really executed as:  x = __aulldiv(x,y);

ntdll incorporates and exports c-runtime library.


from my libc.inc
; ********************************************
; ***** ADDED (C/C++ hidden functions) *******
; ********************************************
_alldiv proto c
_alldvrm proto c
_allmul proto c
_allrem proto c
_allshl proto c
_allshr proto c
_aulldiv proto c
_aulldvrm proto c
_aullrem proto c
_Aullshr proto c
extern c _FPinit:Dword
_ftol proto c :real8


this is why c/c++ language is always dependent on its runtime library.
The truth cannot be learned ... it can only be recognized.

ToutEnMasm


I have finally found them ...on my disk,here:Microsoft Visual Studio 10.0\VC\crt\src\intel
There are written in asm.A library can be made of them by ml.
This allow to translate any function of the crt in asm like that:
Quote
cl /c /Fa /MT time64.c
There is just to include the intel library to have the full function in asm.