aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86Subtarget.cpp
diff options
context:
space:
mode:
authorMichael Liao <michael.liao@intel.com>2013-03-28 23:41:26 +0000
committerMichael Liao <michael.liao@intel.com>2013-03-28 23:41:26 +0000
commitc26392aa5d9c2dbca2909d6874d181455f8aeb8f (patch)
treebffcf5f7ba83d78594c585ce428438c30ba0105d /lib/Target/X86/X86Subtarget.cpp
parent258d9b7bc021ebc78f5a3aef3907e225e632edfa (diff)
Add support of RDSEED defined in AVX2 extension
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178314 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86Subtarget.cpp')
-rw-r--r--lib/Target/X86/X86Subtarget.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp
index fa991298a6..4132463ee8 100644
--- a/lib/Target/X86/X86Subtarget.cpp
+++ b/lib/Target/X86/X86Subtarget.cpp
@@ -334,6 +334,10 @@ void X86Subtarget::AutoDetectSubtargetFeatures() {
HasADX = true;
ToggleFeature(X86::FeatureADX);
}
+ if (IsIntel && ((EBX >> 18) & 0x1)) {
+ HasRDSEED = true;
+ ToggleFeature(X86::FeatureRDSEED);
+ }
}
}
}
@@ -454,6 +458,7 @@ void X86Subtarget::initializeEnvironment() {
HasHLE = false;
HasADX = false;
HasPRFCHW = false;
+ HasRDSEED = false;
IsBTMemSlow = false;
IsUAMemFast = false;
HasVectorUAMem = false;