Correctly check for AVX support in x64CPUDetect It's not enough to check for the CPUID bit to know if AVX is supported since AVX requires OS support (new set of registers == more registers to be saved when context switching). If the OS does not support, the cpuid bit will still be set but using YMM registers will cause an illegal exception fault.