1 /* Test case for x86-64 preserved registers in dynamic linker. */
13 unsigned int eax
, ebx
, ecx
, edx
;
15 if (__get_cpuid (1, &eax
, &ebx
, &ecx
, &edx
) == 0
16 || (ecx
& (bit_AVX
| bit_OSXSAVE
)) != (bit_AVX
| bit_OSXSAVE
))
19 /* Check the OS has AVX and SSE saving enabled. */
20 asm ("xgetbv" : "=a" (eax
), "=d" (edx
) : "c" (0));
22 return (eax
& 6) == 6;
26 extern __m256i
audit_test (__m256i
, __m256i
, __m256i
, __m256i
,
27 __m256i
, __m256i
, __m256i
, __m256i
);
31 /* Run AVX test only if AVX is supported. */
34 __m256i ymm
= _mm256_setzero_si256 ();
35 __m256i ret
= audit_test (ymm
, ymm
, ymm
, ymm
, ymm
, ymm
, ymm
, ymm
);
37 ymm
= _mm256_set1_epi32 (0x12349876);
38 if (memcmp (&ymm
, &ret
, sizeof (ret
)))