Commit 4ed1bda7 authored by James Zern's avatar James Zern

x86: correct OSXSAVE + AVX bit check

the result should have both bits set; previously this was converted from
webp incorrectly and resulted in a boolean check...

Change-Id: I2a7c7f2b491945f3a536ab4fca02247eccc892b8
parent 65f60f8e
......@@ -189,7 +189,7 @@ x86_simd_caps(void) {
if (reg_ecx & BIT(19)) flags |= HAS_SSE4_1;
// bits 27 (OSXSAVE) & 28 (256-bit AVX)
if (reg_ecx & (BIT(27) | BIT(28))) {
if ((reg_ecx & (BIT(27) | BIT(28))) == (BIT(27) | BIT(28))) {
if ((xgetbv() & 0x6) == 0x6) {
flags |= HAS_AVX;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment