1341825Sdim/*===---- xtestintrin.h - XTEST intrinsic ----------------------------------=== 2284679Sdim * 3353358Sdim * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4353358Sdim * See https://llvm.org/LICENSE.txt for license information. 5353358Sdim * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6284679Sdim * 7284679Sdim *===-----------------------------------------------------------------------=== 8284679Sdim */ 9284679Sdim 10284679Sdim#ifndef __IMMINTRIN_H 11284679Sdim#error "Never use <xtestintrin.h> directly; include <immintrin.h> instead." 12284679Sdim#endif 13284679Sdim 14284679Sdim#ifndef __XTESTINTRIN_H 15284679Sdim#define __XTESTINTRIN_H 16284679Sdim 17284679Sdim/* xtest returns non-zero if the instruction is executed within an RTM or active 18284679Sdim * HLE region. */ 19284679Sdim/* FIXME: This can be an either or for RTM/HLE. Deal with this when HLE is 20284679Sdim * supported. */ 21284679Sdimstatic __inline__ int 22284679Sdim __attribute__((__always_inline__, __nodebug__, __target__("rtm"))) 23284679Sdim _xtest(void) { 24284679Sdim return __builtin_ia32_xtest(); 25284679Sdim} 26284679Sdim 27284679Sdim#endif 28