mirror of
https://github.com/reactos/reactos.git
synced 2024-09-29 22:16:01 +00:00
[USBDRV]
- Get rid of some inline assembly svn path=/trunk/; revision=54354
This commit is contained in:
parent
218b87ee29
commit
d0133a99d0
|
@ -982,31 +982,17 @@ usb_count_list(PLIST_HEAD list_head)
|
|||
__inline BOOLEAN
|
||||
usb_query_clicks(PLARGE_INTEGER clicks)
|
||||
{
|
||||
BOOLEAN ret_val;
|
||||
BOOLEAN ret_val = FALSE;
|
||||
int cpu_info[4];
|
||||
//so we have to use intel's cpu???
|
||||
ret_val = FALSE;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
__asm
|
||||
#if defined(_M_IX86) || defined(_M_AMD64)
|
||||
__cpuid(cpu_info, 1);
|
||||
if (cpu_info[3] & 0x10) // Time Stamp Counter (TSC) bit
|
||||
{
|
||||
push ebx;
|
||||
push eax;
|
||||
mov eax, 1; //read version
|
||||
cpuid;
|
||||
test edx, 0x10; //timer stamp
|
||||
jz LBL_OUT;
|
||||
// cpuid //serialization
|
||||
rdtsc;
|
||||
mov ebx, dword ptr[clicks];
|
||||
mov dword ptr[ebx], eax;
|
||||
mov dword ptr[ebx + 4], edx;
|
||||
mov dword ptr[ret_val], TRUE;
|
||||
LBL_OUT:
|
||||
pop eax;
|
||||
pop ebx;
|
||||
clicks->QuadPart = __rdtsc();
|
||||
ret_val = TRUE;
|
||||
}
|
||||
#else
|
||||
ret_val = FALSE;
|
||||
#endif
|
||||
return ret_val;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue