diff --git a/include/spdk/util.h b/include/spdk/util.h index a23acfe31..2d5288d0b 100644 --- a/include/spdk/util.h +++ b/include/spdk/util.h @@ -60,7 +60,8 @@ extern "C" { /* The following will automatically generate several version of * this function, targeted at different architectures. This * is only supported by GCC 6 or newer. */ -#if defined(__GNUC__) && __GNUC__ >= 6 && !defined(__clang__) +#if defined(__GNUC__) && __GNUC__ >= 6 && !defined(__clang__) \ + && (defined(__i386__) || defined(__x86_64__)) __attribute__((target_clones("bmi", "arch=core2", "arch=atom", "default"))) #endif static inline uint32_t @@ -82,7 +83,8 @@ spdk_align32pow2(uint32_t x) /* The following will automatically generate several version of * this function, targeted at different architectures. This * is only supported by GCC 6 or newer. */ -#if defined(__GNUC__) && __GNUC__ >= 6 && !defined(__clang__) +#if defined(__GNUC__) && __GNUC__ >= 6 && !defined(__clang__) \ + && (defined(__i386__) || defined(__x86_64__)) __attribute__((target_clones("bmi", "arch=core2", "arch=atom", "default"))) #endif static inline uint64_t