From c1c4f274c34b5281c83191bd765c50e30312799b Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Thu, 4 Mar 2021 18:27:32 +0300 Subject: [PATCH] cpuinfo: updated xgetbv call for windows clang-cl. from a patchset by Vladislav Dmitrievich Turbanov: https://github.com/libsdl-org/SDL/pull/4062 --- 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 3117e84ae..1f134e11b 100644 --- a/src/cpuinfo/SDL_cpuinfo.c +++ b/src/cpuinfo/SDL_cpuinfo.c @@ -289,7 +289,7 @@ CPU_calcCPUIDFeatures(void) /* Check to make sure we can call xgetbv */ if (c & 0x08000000) { /* Call xgetbv to see if YMM (etc) register state is saved */ -#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) +#if (defined(__GNUC__) || defined(__llvm__)) && (defined(__i386__) || defined(__x86_64__)) __asm__(".byte 0x0f, 0x01, 0xd0" : "=a" (a) : "c" (0) : "%edx"); #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) && (_MSC_FULL_VER >= 160040219) /* VS2010 SP1 */ a = (int)_xgetbv(0);