xtestintrin.h revision 353358
150276Speter/*===---- xtestintrin.h - XTEST intrinsic ----------------------------------=== 262449Speter * 350276Speter * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 450276Speter * See https://llvm.org/LICENSE.txt for license information. 550276Speter * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 650276Speter * 750276Speter *===-----------------------------------------------------------------------=== 850276Speter */ 950276Speter 1050276Speter#ifndef __IMMINTRIN_H 1150276Speter#error "Never use <xtestintrin.h> directly; include <immintrin.h> instead." 1250276Speter#endif 1350276Speter 1450276Speter#ifndef __XTESTINTRIN_H 1550276Speter#define __XTESTINTRIN_H 1650276Speter 1750276Speter/* xtest returns non-zero if the instruction is executed within an RTM or active 1850276Speter * HLE region. */ 1950276Speter/* FIXME: This can be an either or for RTM/HLE. Deal with this when HLE is 2050276Speter * supported. */ 2150276Speterstatic __inline__ int 2250276Speter __attribute__((__always_inline__, __nodebug__, __target__("rtm"))) 2350276Speter _xtest(void) { 2450276Speter return __builtin_ia32_xtest(); 2550276Speter} 2650276Speter 2750276Speter#endif 2850276Speter