From 3fca851a202e5b1018a2cc491b9e005913394afe Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 15 Aug 2014 15:11:40 -0700 Subject: [PATCH] cpu: check for _MSC_VER before using msvc inline asm _M_IX86 will be defined in mingw builds after including windows.h. as the gcc inline asm is first, this missing check would only have caused an error if the code was reorganized. Change-Id: I395679bcfc43e94d308d1ceb0c0fbf932b2c378c --- src/dsp/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dsp/cpu.c b/src/dsp/cpu.c index 9ae0a3a5..22191426 100644 --- a/src/dsp/cpu.c +++ b/src/dsp/cpu.c @@ -57,7 +57,7 @@ static WEBP_INLINE uint64_t xgetbv(void) { } #elif defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 160040219 // >= VS2010 SP1 #define xgetbv() _xgetbv(0) -#elif defined(_M_IX86) +#elif defined(_MSC_VER) && defined(_M_IX86) static WEBP_INLINE uint64_t xgetbv(void) { uint32_t eax_, edx_; __asm {