summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorsigsegv7 <ian@vegaa.systems>2023-10-20 15:36:18 -0400
committersigsegv7 <ian@vegaa.systems>2023-10-20 15:36:18 -0400
commita548646fdc4affadf04dbbb992c9d1b2d78c81aa (patch)
treee877c0140c688c4ba42879829c78d9a6d15a0314 /src/main.c
parent34f4bc9762859df9afd477e251e2f605eccb4590 (diff)
Ensure cpuid macro is only defined on AMD64
Signed-off-by: sigsegv7 <ian@vegaa.systems>
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index a42d05b..7a05ca6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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]; \