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.

(cherry picked from commit 3fca851a20)

Change-Id: I395679bcfc43e94d308d1ceb0c0fbf932b2c378c
This commit is contained in:
James Zern 2014-08-15 15:11:40 -07:00
parent e2159fdff7
commit f4497a1ef5

View File

@ -57,7 +57,7 @@ static WEBP_INLINE uint64_t xgetbv(void) {
} }
#elif defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 160040219 // >= VS2010 SP1 #elif defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 160040219 // >= VS2010 SP1
#define xgetbv() _xgetbv(0) #define xgetbv() _xgetbv(0)
#elif defined(_M_IX86) #elif defined(_MSC_VER) && defined(_M_IX86)
static WEBP_INLINE uint64_t xgetbv(void) { static WEBP_INLINE uint64_t xgetbv(void) {
uint32_t eax_, edx_; uint32_t eax_, edx_;
__asm { __asm {