]> git.ozlabs.org Git - ccan/blobdiff - ccan/cpuid/issupprted.S
cpuid: only compile source file if x86 cpu
[ccan] / ccan / cpuid / issupprted.S
index 8fe859633c7050155ace309aa32b3abdf409781d..80ed0fd0113fe797e010598cc67d1fe86b123fd2 100644 (file)
@@ -2,6 +2,10 @@
   Test if the CPUID instruction is available.
   returns 1 if so, 0 otherwise.  */
 
+/* Only compile this file if we're on a x86 machine.  */
+#if defined(__i386__) || defined(__i386) || defined(__x86_64) \
+       || defined(_M_AMD64) || defined(__M_X64)
+
 .section .text
 .global cpuid_is_supported
 .type cpuid_is_supported, @function
@@ -26,4 +30,5 @@ cpuid_is_supported:
        ret
 
        .size cpuid_is_supported, .-cpuid_is_supported
+#endif