From ff5caa1721d23be02ea6023dc2eddeb14b905451 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 10 Aug 2014 22:21:21 -0400 Subject: [PATCH] WinRT build fix for ARM platforms The _xgetbv intrinsic was being used in ARM builds of SDL/WinRT, which was leading to linker errors. This commit limits _xgetbv use to the platforms on which it is available, x86 and x64. --- src/cpuinfo/SDL_cpuinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpuinfo/SDL_cpuinfo.c b/src/cpuinfo/SDL_cpuinfo.c index 3f2308bdb..c725c01a0 100644 --- a/src/cpuinfo/SDL_cpuinfo.c +++ b/src/cpuinfo/SDL_cpuinfo.c @@ -246,7 +246,7 @@ CPU_OSSavesYMM(void) a = 0; #if defined(__GNUC__) && (defined(i386) || defined(__x86_64__)) asm(".byte 0x0f, 0x01, 0xd0" : "=a" (a) : "c" (0) : "%edx"); -#elif defined(_MSC_VER) && (_MSC_FULL_VER >= 160040219) /* VS2010 SP1 */ +#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) && (_MSC_FULL_VER >= 160040219) /* VS2010 SP1 */ a = (int)_xgetbv(0); #elif (defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__) __asm