summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86Subtarget.cpp
diff options
context:
space:
mode:
authorAshutosh Nema <ashu1212@gmail.com>2016-05-18 11:59:12 +0000
committerAshutosh Nema <ashu1212@gmail.com>2016-05-18 11:59:12 +0000
commit348af9cc6b448d739465de991cc0caf032af0eb9 (patch)
tree4b9c7faed9c512f32c27d6f104e856957ca83801 /llvm/lib/Target/X86/X86Subtarget.cpp
parente64e230decbdaa2eab8699641476de9897ce5080 (diff)
downloadbcm5719-llvm-348af9cc6b448d739465de991cc0caf032af0eb9.tar.gz
bcm5719-llvm-348af9cc6b448d739465de991cc0caf032af0eb9.zip
Add new flag and intrinsic support for MWAITX and MONITORX instructions
Summary: MONITORX/MWAITX instructions provide similar capability to the MONITOR/MWAIT pair while adding a timer function, such that another termination of the MWAITX instruction occurs when the timer expires. The presence of the MONITORX and MWAITX instructions is indicated by CPUID 8000_0001, ECX, bit 29. The MONITORX and MWAITX instructions are intercepted by the same bits that intercept MONITOR and MWAIT. MONITORX instruction establishes a range to be monitored. MWAITX instruction causes the processor to stop instruction execution and enter an implementation-dependent optimized state until occurrence of a class of events. Opcode of MONITORX instruction is "0F 01 FA". Opcode of MWAITX instruction is "0F 01 FB". These opcode information is used in adding tests for the disassembler. These instructions are enabled for AMD's bdver4 architecture. Patch by Ganesh Gopalasubramanian! Reviewers: echristo, craig.topper, RKSimon Subscribers: RKSimon, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D19795 llvm-svn: 269911
Diffstat (limited to 'llvm/lib/Target/X86/X86Subtarget.cpp')
-rw-r--r--llvm/lib/Target/X86/X86Subtarget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.cpp b/llvm/lib/Target/X86/X86Subtarget.cpp
index dde29a0c083..5d8276e00cd 100644
--- a/llvm/lib/Target/X86/X86Subtarget.cpp
+++ b/llvm/lib/Target/X86/X86Subtarget.cpp
@@ -313,6 +313,7 @@ void X86Subtarget::initializeEnvironment() {
HasPRFCHW = false;
HasRDSEED = false;
HasLAHFSAHF = false;
+ HasMWAITX = false;
HasMPX = false;
IsBTMemSlow = false;
IsSHLDSlow = false;
OpenPOWER on IntegriCloud