blob: 4c3d4c35b8db86828665d465da9c6092b4a42ca9 (
plain)
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
29
30
31
32
33
34
35
|
; ml64 /c /Cx /nologo /Fo"$(OutDir)\$(InputName).obj" "$(InputPath)"
; call cpuid with args in eax, ecx
; store eax, ebx, ecx, edx to p
_TEXT64 segment page 'CODE'
align 8
PUBLIC cpuid64
cpuid64 PROC FRAME
; void cpuid64(CPUID_ARGS* p);
; rcx <= p
sub rsp, 32
.allocstack 32
push rbx
.pushreg rbx
.endprolog
mov r8, rcx
mov eax, DWORD PTR [r8+0]
mov ecx, DWORD PTR [r8+8]
cpuid
mov DWORD PTR [r8+0], eax
mov DWORD PTR [r8+4], ebx
mov DWORD PTR [r8+8], ecx
mov DWORD PTR [r8+12], edx
pop rbx
add rsp, 32
ret
ALIGN 8
cpuid64 ENDP
_TEXT64 ENDS
END
|