1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
__inline __declspec(naked) unsigned long long shl64(unsigned long long a){
__asm {
push ebp
mov ebp, esp
sub esp, __LOCAL_SIZE
mov eax, DWORD PTR 8[ebp]
mov edx, DWORD PTR 8[ebp+4]
shl eax, 1
rcl edx, 1
mov esp, ebp
pop ebp
ret
}
}
__inline __declspec(naked) unsigned long long shr64(unsigned long long a){
__asm {
push ebp
mov ebp, esp
sub esp, __LOCAL_SIZE
mov eax, DWORD PTR 8[ebp]
mov edx, DWORD PTR 8[ebp+4]
shr edx, 1
rcr eax, 1
mov esp, ebp
pop ebp
ret
}
}
|