From a548646fdc4affadf04dbbb992c9d1b2d78c81aa Mon Sep 17 00:00:00 2001 From: sigsegv7 Date: Fri, 20 Oct 2023 15:36:18 -0400 Subject: Ensure cpuid macro is only defined on AMD64 Signed-off-by: sigsegv7 --- src/main.c | 2 ++ 1 file changed, 2 insertions(+) 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]; \ -- cgit v1.2.3