xref: /freebsd/contrib/llvm-project/clang/lib/Headers/serializeintrin.h (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
1 /*===--------------- serializeintrin.h - serialize 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-exception
6  *
7  *===-----------------------------------------------------------------------===
8  */
9 
10 #ifndef __IMMINTRIN_H
11 #error "Never use <serializeintrin.h> directly; include <immintrin.h> instead."
12 #endif
13 
14 #ifndef __SERIALIZEINTRIN_H
15 #define __SERIALIZEINTRIN_H
16 
17 /// Serialize instruction fetch and execution.
18 ///
19 /// \headerfile <x86intrin.h>
20 ///
21 /// This intrinsic corresponds to the <c> SERIALIZE </c> instruction.
22 ///
23 static __inline__ void
24 __attribute__((__always_inline__, __nodebug__, __target__("serialize")))
25 _serialize (void)
26 {
27   __builtin_ia32_serialize ();
28 }
29 
30 #endif /* __SERIALIZEINTRIN_H */
31