Skip to content
Snippets Groups Projects
Commit f91210d6 authored by Michael Liao's avatar Michael Liao
Browse files

Add XTEST intrinsic defined in TSX extension


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178330 91177308-0d34-0410-b5e6-96231b3b80d8
parent 5062bb22
Branches
No related tags found
No related merge requests found
......@@ -739,5 +739,6 @@ BUILTIN(__builtin_ia32_vfrczpd256, "V4dV4d", "")
BUILTIN(__builtin_ia32_xbegin, "i", "")
BUILTIN(__builtin_ia32_xend, "v", "")
BUILTIN(__builtin_ia32_xabort, "vIc", "")
BUILTIN(__builtin_ia32_xtest, "i", "")
#undef BUILTIN
......@@ -102,4 +102,13 @@ _rdrand64_step(unsigned long long *__p)
#include <rtmintrin.h>
#endif
/* FIXME: check __HLE__ as well when HLE is supported. */
#if defined (__RTM__)
static __inline__ int __attribute__((__always_inline__, __nodebug__))
_xtest(void)
{
return __builtin_ia32_xtest();
}
#endif
#endif /* __IMMINTRIN_H */
......@@ -21,3 +21,8 @@ test_xabort(void) {
// CHECK: void @llvm.x86.xabort(i8 2)
_xabort(2);
}
unsigned int test_xtest(void) {
// CHECK: i32 @llvm.x86.xtest()
return _xtest();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment