#ifdef _M_IX86
__int64 _declspec(naked) _cdecl _allshl(__int64 ll, char shift) {
_asm{
test cl,32
jnz l1
shld edx,eax,cl
shl eax,cl
ret
l1: mov edx,eax
xor eax,eax
shl edx,cl
ret
}
}
__int64 _declspec(naked) _cdecl _allshr(__int64 ll, char shift) {
_asm{
test cl,32
jnz l1
shrd eax,edx,cl
sar edx,cl
ret
l1: mov eax,edx
xor edx,edx
sar eax,cl
ret
}
}
void __declspec(naked) _fltused() {}
void __declspec(naked) _chkstk() { _asm{
cmp eax,4096
jae short probesetup
neg eax
add eax,esp
add eax,4
test dword ptr [eax],eax
xchg eax,esp
jmp dword ptr[eax]
probesetup:
push ecx
lea ecx,[esp] + 8
onepg: sub ecx,4096
sub eax,4096
test dword ptr [ecx],eax
cmp eax,4096
jae short onepg
sub ecx,eax
mov eax,esp
test dword ptr [ecx],eax
mov esp,ecx
mov ecx,dword ptr [eax]
jmp dword ptr[eax+4]
}}
void _declspec(naked) _alloca_probe() {_asm{
jmp _chkstk
}}
void _declspec(naked) _alloca_probe_16() {_asm{
jmp _chkstk
}}
#endif
Vorgefundene Kodierung: ASCII (7 bit) | 2
|