annotate clang/lib/Headers/clwbintrin.h @ 176:de4ac79aef9d

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 17:13:11 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 /*===---- clwbintrin.h - CLWB intrinsic ------------------------------------===
anatofuz
parents:
diff changeset
2 *
anatofuz
parents:
diff changeset
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
anatofuz
parents:
diff changeset
4 * See https://llvm.org/LICENSE.txt for license information.
anatofuz
parents:
diff changeset
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
anatofuz
parents:
diff changeset
6 *
anatofuz
parents:
diff changeset
7 *===-----------------------------------------------------------------------===
anatofuz
parents:
diff changeset
8 */
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 #ifndef __IMMINTRIN_H
anatofuz
parents:
diff changeset
11 #error "Never use <clwbintrin.h> directly; include <immintrin.h> instead."
anatofuz
parents:
diff changeset
12 #endif
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 #ifndef __CLWBINTRIN_H
anatofuz
parents:
diff changeset
15 #define __CLWBINTRIN_H
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 /* Define the default attributes for the functions in this file. */
anatofuz
parents:
diff changeset
18 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("clwb")))
anatofuz
parents:
diff changeset
19
anatofuz
parents:
diff changeset
20 /// Writes back to memory the cache line (if modified) that contains the
anatofuz
parents:
diff changeset
21 /// linear address specified in \a __p from any level of the cache hierarchy in
anatofuz
parents:
diff changeset
22 /// the cache coherence domain
anatofuz
parents:
diff changeset
23 ///
anatofuz
parents:
diff changeset
24 /// \headerfile <immintrin.h>
anatofuz
parents:
diff changeset
25 ///
anatofuz
parents:
diff changeset
26 /// This intrinsic corresponds to the <c> CLWB </c> instruction.
anatofuz
parents:
diff changeset
27 ///
anatofuz
parents:
diff changeset
28 /// \param __p
anatofuz
parents:
diff changeset
29 /// A pointer to the memory location used to identify the cache line to be
anatofuz
parents:
diff changeset
30 /// written back.
anatofuz
parents:
diff changeset
31 static __inline__ void __DEFAULT_FN_ATTRS
anatofuz
parents:
diff changeset
32 _mm_clwb(void const *__p) {
anatofuz
parents:
diff changeset
33 __builtin_ia32_clwb(__p);
anatofuz
parents:
diff changeset
34 }
anatofuz
parents:
diff changeset
35
anatofuz
parents:
diff changeset
36 #undef __DEFAULT_FN_ATTRS
anatofuz
parents:
diff changeset
37
anatofuz
parents:
diff changeset
38 #endif