summaryrefslogtreecommitdiff
path: root/src/as/cpuid.s
blob: 043b2a47ffe579d1ef7b8af910164b972720265e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.global cpuid_vendor

cpuid_vendor:
    pushl %ebp
    mov %esp, %ebp
    pushl %edi
    pushl %esi
    pushl %ebx

    mov $0x0, %eax
    cpuid

    movl 8(%ebp), %eax

    movl %ebx, (%eax)
    movl %edx, 4(%eax)
    movl %ecx, 8(%eax)

    popl %ebx
    popl %esi
    popl %edi
    popl %ebp
    ret