mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
Divide source code from other stuff
This commit is contained in:
12
src/cpuid.c
Normal file
12
src/cpuid.c
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "cpuid.h"
|
||||
|
||||
void cpuid(unsigned int *eax, unsigned int *ebx,
|
||||
unsigned int *ecx, unsigned int *edx)
|
||||
{
|
||||
asm volatile("cpuid"
|
||||
: "=a" (*eax),
|
||||
"=b" (*ebx),
|
||||
"=c" (*ecx),
|
||||
"=d" (*edx)
|
||||
: "0" (*eax), "2" (*ecx));
|
||||
}
|
||||
Reference in New Issue
Block a user