| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
#ifndef __X86GPRINTRIN_H |
| 11 |
#define __X86GPRINTRIN_H |
| 12 |
|
| 13 |
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ |
| 14 |
defined(__HRESET__) |
| 15 |
#include <hresetintrin.h> |
| 16 |
#endif |
| 17 |
|
| 18 |
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ |
| 19 |
defined(__UINTR__) |
| 20 |
#include <uintrintrin.h> |
| 21 |
#endif |
| 22 |
|
| 23 |
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ |
| 24 |
defined(__CRC32__) |
| 25 |
#include <crc32intrin.h> |
| 26 |
#endif |
| 27 |
|
| 28 |
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ |
| 29 |
defined(__PRFCHI__) |
| 30 |
#include <prfchiintrin.h> |
| 31 |
#endif |
| 32 |
|
| 33 |
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ |
| 34 |
defined(__RAOINT__) |
| 35 |
#include <raointintrin.h> |
| 36 |
#endif |
| 37 |
|
| 38 |
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ |
| 39 |
defined(__CMPCCXADD__) |
| 40 |
#include <cmpccxaddintrin.h> |
| 41 |
#endif |
| 42 |
|
| 43 |
#if defined(__i386__) |
| 44 |
#define __SAVE_GPRBX "mov {%%ebx, %%eax |eax, ebx};" |
| 45 |
#define __RESTORE_GPRBX "mov {%%eax, %%ebx |ebx, eax};" |
| 46 |
#define __TMPGPR "eax" |
| 47 |
#else |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
#define __SAVE_GPRBX "mov {%%rbx, %%rax |rax, rbx};" |
| 53 |
#define __RESTORE_GPRBX "mov {%%rax, %%rbx |rbx, rax};" |
| 54 |
#define __TMPGPR "rax" |
| 55 |
#endif |
| 56 |
|
| 57 |
#define __SSC_MARK(__Tag) \ |
| 58 |
__asm__ __volatile__( __SAVE_GPRBX \ |
| 59 |
"mov {%0, %%ebx|ebx, %0}; " \ |
| 60 |
".byte 0x64, 0x67, 0x90; " \ |
| 61 |
__RESTORE_GPRBX \ |
| 62 |
::"i"(__Tag) \ |
| 63 |
: __TMPGPR ); |
| 64 |
|
| 65 |
#endif |