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
This commit is contained in:
Andrew W. Nosenko 2012-10-03 17:46:47 +00:00 committed by H.J. Lu
parent 7fb80860d6
commit 953ac96606
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2012-10-03 Andrew W. Nosenko <andrew.w.nosenko@gmail.com>
* 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 <nickc@redhat.com>
* config/rx/rx.c (struct decl_chain): New local structure.

View File

@ -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;