xref: /freebsd/contrib/llvm-project/clang/lib/Headers/x86gprintrin.h (revision 349cc55c9796c4596a5b9904cd3281af295f878f)
1e8d8bef9SDimitry Andric /*===--------------- x86gprintrin.h - X86 GPR intrinsics ------------------===
2e8d8bef9SDimitry Andric  *
3e8d8bef9SDimitry Andric  * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4e8d8bef9SDimitry Andric  * See https://llvm.org/LICENSE.txt for license information.
5e8d8bef9SDimitry Andric  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6e8d8bef9SDimitry Andric  *
7e8d8bef9SDimitry Andric  *===-----------------------------------------------------------------------===
8e8d8bef9SDimitry Andric  */
9e8d8bef9SDimitry Andric 
10e8d8bef9SDimitry Andric #ifndef __X86GPRINTRIN_H
11e8d8bef9SDimitry Andric #define __X86GPRINTRIN_H
12e8d8bef9SDimitry Andric 
13e8d8bef9SDimitry Andric #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||      \
14e8d8bef9SDimitry Andric     defined(__HRESET__)
15e8d8bef9SDimitry Andric #include <hresetintrin.h>
16e8d8bef9SDimitry Andric #endif
17e8d8bef9SDimitry Andric 
18e8d8bef9SDimitry Andric #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||      \
19e8d8bef9SDimitry Andric     defined(__UINTR__)
20e8d8bef9SDimitry Andric #include <uintrintrin.h>
21e8d8bef9SDimitry Andric #endif
22e8d8bef9SDimitry Andric 
23*349cc55cSDimitry Andric #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||      \
24*349cc55cSDimitry Andric     defined(__CRC32__)
25*349cc55cSDimitry Andric #include <crc32intrin.h>
26*349cc55cSDimitry Andric #endif
27*349cc55cSDimitry Andric 
28*349cc55cSDimitry Andric #define __SSC_MARK(Tag)                                                        \
29*349cc55cSDimitry Andric   __asm__ __volatile__("mov {%%ebx, %%eax|eax, ebx}; "                      \
30*349cc55cSDimitry Andric                        "mov {%0, %%ebx|ebx, %0}; "                          \
31*349cc55cSDimitry Andric                        ".byte 0x64, 0x67, 0x90; "                              \
32*349cc55cSDimitry Andric                        "mov {%%eax, %%ebx|ebx, eax};" ::"i"(Tag)            \
33*349cc55cSDimitry Andric                        : "%eax");
34*349cc55cSDimitry Andric 
35e8d8bef9SDimitry Andric #endif /* __X86GPRINTRIN_H */
36