From: James Zern Date: Fri, 23 Jan 2015 22:13:51 +0000 (-0800) Subject: x86: correct OSXSAVE + AVX bit check X-Git-Tag: v1.4.0~224 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ed1bda7af3a5da820068d68c7af80103bc8f3ba;p=libvpx 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 --- diff --git a/vpx_ports/x86.h b/vpx_ports/x86.h index 2a3ebbe22..ae349fb84 100644 --- a/vpx_ports/x86.h +++ b/vpx_ports/x86.h @@ -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;