[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / lib / Headers / clwbintrin.h
blob3360d203f7d7d651807abed5a992781628e09fc8
1 /*===---- clwbintrin.h - CLWB intrinsic ------------------------------------===
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-exception
7 *===-----------------------------------------------------------------------===
8 */
10 #ifndef __IMMINTRIN_H
11 #error "Never use <clwbintrin.h> directly; include <immintrin.h> instead."
12 #endif
14 #ifndef __CLWBINTRIN_H
15 #define __CLWBINTRIN_H
17 /* Define the default attributes for the functions in this file. */
18 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("clwb")))
20 /// Writes back to memory the cache line (if modified) that contains the
21 /// linear address specified in \a __p from any level of the cache hierarchy in
22 /// the cache coherence domain
23 ///
24 /// \headerfile <immintrin.h>
25 ///
26 /// This intrinsic corresponds to the <c> CLWB </c> instruction.
27 ///
28 /// \param __p
29 /// A pointer to the memory location used to identify the cache line to be
30 /// written back.
31 static __inline__ void __DEFAULT_FN_ATTRS
32 _mm_clwb(void const *__p) {
33 __builtin_ia32_clwb(__p);
36 #undef __DEFAULT_FN_ATTRS
38 #endif