aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew W. Nosenko <andrew.w.nosenko@gmail.com>2012-10-03 17:46:47 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2012-10-03 10:46:47 -0700
commit953ac96606791f50ed0c4bdc886b79279cda9e35 (patch)
treecf419a6f6ceabd168988e5ab9d6ed73171c3139a /gcc
parent7fb80860d62c9b64c969213a475a556a3c816a25 (diff)
downloadgcc-953ac96606791f50ed0c4bdc886b79279cda9e35.zip
gcc-953ac96606791f50ed0c4bdc886b79279cda9e35.tar.gz
gcc-953ac96606791f50ed0c4bdc886b79279cda9e35.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/driver-i386.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 23515ec..2bfafc5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c
index 4dffc51..36d80b1 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;