aboutsummaryrefslogtreecommitdiff
path: root/include/cpuinfo.h
diff options
context:
space:
mode:
authorMarat Dukhan <marat@fb.com>2017-09-26 11:02:37 -0700
committerMarat Dukhan <marat@fb.com>2017-09-26 11:02:37 -0700
commit9e32e8de80d4161c290083cdae962b1a59b08a76 (patch)
tree1ebef6c790a0196b295d9f6556213b758c3585d4 /include/cpuinfo.h
parent9da4c918ea33edcc1b10409391ea1765e92b5056 (diff)
downloadcpuinfo-9e32e8de80d4161c290083cdae962b1a59b08a76.tar.gz
cpuinfo_has_x86_* functions for TM and MPX
Diffstat (limited to 'include/cpuinfo.h')
-rw-r--r--include/cpuinfo.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/cpuinfo.h b/include/cpuinfo.h
index f244ebe..6abe8ab 100644
--- a/include/cpuinfo.h
+++ b/include/cpuinfo.h
@@ -1020,6 +1020,38 @@ static inline bool cpuinfo_has_x86_avx512_4fmaps(void) {
#endif
}
+static inline bool cpuinfo_has_x86_hle(void) {
+ #if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
+ return cpuinfo_isa.hle;
+ #else
+ return false;
+ #endif
+}
+
+static inline bool cpuinfo_has_x86_rtm(void) {
+ #if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
+ return cpuinfo_isa.rtm;
+ #else
+ return false;
+ #endif
+}
+
+static inline bool cpuinfo_has_x86_xtest(void) {
+ #if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
+ return cpuinfo_isa.xtest;
+ #else
+ return false;
+ #endif
+}
+
+static inline bool cpuinfo_has_x86_mpx(void) {
+ #if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
+ return cpuinfo_isa.mpx;
+ #else
+ return false;
+ #endif
+}
+
static inline bool cpuinfo_has_x86_cmov(void) {
#if CPUINFO_ARCH_X86_64
return true;