brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · 491823e Raw
57 lines · c
1/*===------------- tsxldtrkintrin.h - tsxldtrk intrinsics ------------------===2 *3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4 * See https://llvm.org/LICENSE.txt for license information.5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6 *7 *===-----------------------------------------------------------------------===8 */9 10#ifndef __IMMINTRIN_H11#error "Never use <tsxldtrkintrin.h> directly; include <immintrin.h> instead."12#endif13 14#ifndef __TSXLDTRKINTRIN_H15#define __TSXLDTRKINTRIN_H16 17/* Define the default attributes for the functions in this file */18#define _DEFAULT_FN_ATTRS \19  __attribute__((__always_inline__, __nodebug__, __target__("tsxldtrk")))20 21/// Marks the start of an TSX (RTM) suspend load address tracking region. If22///    this intrinsic is used inside a transactional region, subsequent loads23///    are not added to the read set of the transaction. If it's used inside a24///    suspend load address tracking region it will cause transaction abort.25///    If it's used outside of a transactional region it behaves like a NOP.26///27/// \headerfile <x86intrin.h>28///29/// This intrinsic corresponds to the \c XSUSLDTRK instruction.30///31static __inline__ void _DEFAULT_FN_ATTRS32_xsusldtrk (void)33{34    __builtin_ia32_xsusldtrk();35}36 37/// Marks the end of an TSX (RTM) suspend load address tracking region. If this38///    intrinsic is used inside a suspend load address tracking region it will39///    end the suspend region and all following load addresses will be added to40///    the transaction read set. If it's used inside an active transaction but41///    not in a suspend region it will cause transaction abort. If it's used42///    outside of a transactional region it behaves like a NOP.43///44/// \headerfile <x86intrin.h>45///46/// This intrinsic corresponds to the \c XRESLDTRK instruction.47///48static __inline__ void _DEFAULT_FN_ATTRS49_xresldtrk (void)50{51    __builtin_ia32_xresldtrk();52}53 54#undef _DEFAULT_FN_ATTRS55 56#endif /* __TSXLDTRKINTRIN_H */57