diff options
author | sigsegv7 <ian@vegaa.systems> | 2023-10-20 15:36:18 -0400 |
---|---|---|
committer | sigsegv7 <ian@vegaa.systems> | 2023-10-20 15:36:18 -0400 |
commit | a548646fdc4affadf04dbbb992c9d1b2d78c81aa (patch) | |
tree | e877c0140c688c4ba42879829c78d9a6d15a0314 | |
parent | 34f4bc9762859df9afd477e251e2f605eccb4590 (diff) |
Ensure cpuid macro is only defined on AMD64
Signed-off-by: sigsegv7 <ian@vegaa.systems>
-rw-r--r-- | src/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -42,10 +42,12 @@ #error "Big endian machines not supported yet" #endif +#if defined(__x86_64__) #define cpuid(level, a, b, c, d) \ __asm__ __volatile__ ("cpuid\n\t" \ : "=a" (a), "=b" (b), "=c" (c), "=d" (d) \ : "0" (level)) +#endif #define flip_block(TMP_VAR, TYPE, BUF, POS) \ TMP_VAR = *(TYPE *)&BUF[POS]; \ |