From: Andrew W. Nosenko Date: Wed, 3 Oct 2012 17:46:47 +0000 (+0000) Subject: Fix SSE and YMM state support check logic for -march=native X-Git-Tag: misc/gccgo-go1_1_2~443 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=953ac96606791f50ed0c4bdc886b79279cda9e35;p=thirdparty%2Fgcc.git Fix SSE and YMM state support check logic for -march=native * config/i386/driver-i386.c (host_detect_local_cpu): Fix logic in SSE and YMM state support check for -march=native. From-SVN: r192044 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 23515ec1a655..2bfafc5e60ce 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-10-03 Andrew W. Nosenko + + * config/i386/driver-i386.c (host_detect_local_cpu): Fix logic + in SSE and YMM state support check for -march=native. + 2012-10-03 Nick Clifton * config/rx/rx.c (struct decl_chain): New local structure. diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c index 4dffc51e4c9f..36d80b1e6217 100644 --- a/gcc/config/i386/driver-i386.c +++ b/gcc/config/i386/driver-i386.c @@ -473,7 +473,8 @@ const char *host_detect_local_cpu (int argc, const char **argv) : "c" (XCR_XFEATURE_ENABLED_MASK)); /* Check if SSE and YMM states are supported. */ - if ((eax & (XSTATE_SSE | XSTATE_YMM)) == (XSTATE_SSE | XSTATE_YMM)) + if (!has_osxsave + || (eax & (XSTATE_SSE | XSTATE_YMM)) != (XSTATE_SSE | XSTATE_YMM)) { has_avx = 0; has_avx2 = 0;