diff options
author | Yunzhong Gao <Yunzhong_Gao@playstation.sony.com> | 2013-09-24 18:21:52 +0000 |
---|---|---|
committer | Yunzhong Gao <Yunzhong_Gao@playstation.sony.com> | 2013-09-24 18:21:52 +0000 |
commit | 4da61345ec553a4f3ab3cedf6f21452374f1fda1 (patch) | |
tree | 172ce95357aeed0dc7180753b2ac91679daaa572 /lib/Target/X86/X86Subtarget.cpp | |
parent | 09b16f3bb5e2b4194268866e1e8c969335a7aec6 (diff) | |
download | external_llvm-4da61345ec553a4f3ab3cedf6f21452374f1fda1.zip external_llvm-4da61345ec553a4f3ab3cedf6f21452374f1fda1.tar.gz external_llvm-4da61345ec553a4f3ab3cedf6f21452374f1fda1.tar.bz2 |
Adding a feature flag to the llvm backend for x86 TBM instruction set.
Adding TBM feature to bdver2 processor; piledriver supports this instruction set
according to the following document:
http://developer.amd.com/wordpress/media/2012/10/New-Bulldozer-and-Piledriver-Instructions.pdf
Phabricator code review is located here: http://llvm-reviews.chandlerc.com/D1692
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191324 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86Subtarget.cpp')
-rw-r--r-- | lib/Target/X86/X86Subtarget.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp index f5b2614..05db662 100644 --- a/lib/Target/X86/X86Subtarget.cpp +++ b/lib/Target/X86/X86Subtarget.cpp @@ -384,6 +384,10 @@ void X86Subtarget::AutoDetectSubtargetFeatures() { ToggleFeature(X86::FeatureSHA); } } + if (IsAMD && ((ECX >> 21) & 0x1)) { + HasTBM = true; + ToggleFeature(X86::FeatureTBM); + } } } @@ -492,6 +496,7 @@ void X86Subtarget::initializeEnvironment() { HasFMA = false; HasFMA4 = false; HasXOP = false; + HasTBM = false; HasMOVBE = false; HasRDRAND = false; HasF16C = false; |