diff options
Diffstat (limited to 'src/as/cpuid.s')
| -rw-r--r-- | src/as/cpuid.s | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/as/cpuid.s b/src/as/cpuid.s new file mode 100644 index 0000000..701fa0d --- /dev/null +++ b/src/as/cpuid.s @@ -0,0 +1,23 @@ +.global cpuid_vendor + +cpuid_vendor: + pushl %ebp + mov %esp, %ebp + pushl %ebx + pushl %edi + pushl %esi + + mov $0x0, %eax + cpuid + + movl 8(%ebp), %eax + + movl %ebx, (%eax) + movl %edx, 4(%eax) + movl %ecx, 8(%eax) + + popl %esi + popl %edi + popl %ebx + popl %ebp + ret |
