1 #define _XOPEN_SOURCE 600
15 unsigned long cpuflags = 0;
23 #ifndef USE_X86_64_ASM
32 : "%eax", "%ecx", "%edx", "memory"
45 : "%rax", "%rcx", "%rdx", "memory"
48 #endif /* USE_X86_64_ASM */
50 if (cpuflags & (1<<25)) {
51 _flags = Flags (_flags | (HasSSE|HasFlushToZero));
54 if (cpuflags & (1<<26)) {
55 _flags = Flags (_flags | HasSSE2);
58 if (cpuflags & (1 << 24)) {
62 #ifdef NO_POSIX_MEMALIGN
63 if ((fxbuf = (char *) malloc(512)) == 0)
65 if (posix_memalign ((void**)&fxbuf, 16, 512))
68 error << _("cannot allocate 16 byte aligned buffer for h/w feature detection") << endmsg;
78 uint32_t mxcsr_mask = *((uint32_t*) &fxbuf[28]);
80 /* if the mask is zero, set its default value (from intel specs) */
82 if (mxcsr_mask == 0) {
86 if (mxcsr_mask & (1<<6)) {
87 _flags = Flags (_flags | HasDenormalsAreZero);