0001-Only-use-__asm__-on-GNU-compatible-compilers.patch (802B)
- From fe88b59e4028952b4d157f0934e14b9eed058cd9 Mon Sep 17 00:00:00 2001
- From: Michael Forney <mforney@mforney.org>
- Date: Mon, 10 Jun 2019 01:47:01 -0700
- Subject: [PATCH] Only use __asm__ on GNU-compatible compilers
- ---
- lib/common/cpu.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- diff --git a/lib/common/cpu.h b/lib/common/cpu.h
- index 3f15d560..8d73a2ab 100644
- --- a/lib/common/cpu.h
- +++ b/lib/common/cpu.h
- @@ -118,7 +118,7 @@ MEM_STATIC ZSTD_cpuid_t ZSTD_cpuid(void) {
- : "a"(7), "c"(0)
- : "edx");
- }
- -#elif defined(__x86_64__) || defined(_M_X64) || defined(__i386__)
- +#elif (defined(__x86_64__) || defined(_M_X64) || defined(__i386__)) && defined(__GNUC__)
- U32 n;
- __asm__("cpuid" : "=a"(n) : "a"(0) : "ebx", "ecx", "edx");
- if (n >= 1) {
- --
- 2.45.2