1 /* Check if the OS supports executing AVX instructions. */
3 #define XCR_XFEATURE_ENABLED_MASK 0x0
12 unsigned int eax
, edx
;
13 unsigned int ecx
= XCR_XFEATURE_ENABLED_MASK
;
15 __asm__ ("xgetbv" : "=a" (eax
), "=d" (edx
) : "c" (ecx
));
17 return (eax
& (XSTATE_SSE
| XSTATE_YMM
)) == (XSTATE_SSE
| XSTATE_YMM
);