inline unsigned int Div_RADIX(unsigned __int64 x, unsigned __int64 *pRemainder)
{
_asm
{
mov eax,dword ptr [x]
mov edx,dword ptr [x+4]
mov ebx,RADIX
div ebx
mov ebx,pRemainder
mov dword ptr [ebx+4],0
mov [ebx],edx
//return eax
}
}
inline unsigned Div_RADIX(ULONGLONG x,PULONGLONG pRemainder)
{
__asm__ __volatile__("movl (%0),%%eax;"
"movl 4(%0),%%edx;mov %1,%%ebx;"
"divl %%ebx;movl %2,%%ebx;movl $0,4(%%ebx);"
"movl %%edx,(%%ebx)"::"c"(&x),"i"(RADIX),"S"(pRemainder));
return *(PULONG)&x;
}
时间: 2024-12-26 09:12:34