]> granicus.if.org Git - llvm/commitdiff
[X86] Add 'fxsr' to the getHostCPUFeatures detection code.
authorCraig Topper <craig.topper@intel.com>
Wed, 13 Feb 2019 18:21:36 +0000 (18:21 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 13 Feb 2019 18:21:36 +0000 (18:21 +0000)
We implicitly mark this feature as enabled when the target is 64-bits, but our detection code for -march=native didn't support it so you can't detect it on 32-bit targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353963 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Host.cpp

index 1b907bc628485f92e5e03af896b0ef23acfd672c..367fd188a1fae33ee898ab5c2cb3505175887cd0 100644 (file)
@@ -1259,6 +1259,7 @@ bool sys::getHostCPUFeatures(StringMap<bool> &Features) {
 
   Features["cmov"]   = (EDX >> 15) & 1;
   Features["mmx"]    = (EDX >> 23) & 1;
+  Features["fxsr"]   = (EDX >> 24) & 1;
   Features["sse"]    = (EDX >> 25) & 1;
   Features["sse2"]   = (EDX >> 26) & 1;