2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the Wine project.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
10 #if defined(__i386__) || (defined(__x86_64__) && !defined(__arm64ec__))
11 # include <x86intrin.h>
18 #if defined(__i386__) || (defined(__x86_64__) && !defined(__arm64ec__))
19 static inline void __cpuidex(int info
[4], int ax
, int cx
)
21 __asm__ ("cpuid" : "=a"(info
[0]), "=b" (info
[1]), "=c"(info
[2]), "=d"(info
[3]) : "a"(ax
), "c"(cx
));
23 static inline void __cpuid(int info
[4], int ax
)
25 return __cpuidex(info
, ax
, 0);
29 #if defined(__aarch64__) || defined(__arm64ec__)
30 typedef enum _tag_ARM64INTR_BARRIER_TYPE
32 _ARM64_BARRIER_OSHLD
= 0x1,
33 _ARM64_BARRIER_OSHST
= 0x2,
34 _ARM64_BARRIER_OSH
= 0x3,
35 _ARM64_BARRIER_NSHLD
= 0x5,
36 _ARM64_BARRIER_NSHST
= 0x6,
37 _ARM64_BARRIER_NSH
= 0x7,
38 _ARM64_BARRIER_ISHLD
= 0x9,
39 _ARM64_BARRIER_ISHST
= 0xa,
40 _ARM64_BARRIER_ISH
= 0xb,
41 _ARM64_BARRIER_LD
= 0xd,
42 _ARM64_BARRIER_ST
= 0xe,
43 _ARM64_BARRIER_SY
= 0xf
44 } _ARM64INTR_BARRIER_TYPE
;
48 typedef enum _tag_ARMINTR_BARRIER_TYPE
50 _ARM_BARRIER_OSHST
= 0x2,
51 _ARM_BARRIER_OSH
= 0x3,
52 _ARM_BARRIER_NSHST
= 0x6,
53 _ARM_BARRIER_NSH
= 0x7,
54 _ARM_BARRIER_ISHST
= 0xa,
55 _ARM_BARRIER_ISH
= 0xb,
56 _ARM_BARRIER_ST
= 0xe,
58 } _ARMINTR_BARRIER_TYPE
;
61 #if defined(_MSC_VER) && (defined(__arm__) || defined(__aarch64__) || defined(__arm64ec__))
63 void __dmb(unsigned int);
65 #pragma intrinsic(__dmb)
69 #if defined(_MSC_VER) && (defined(__aarch64__) || defined(__arm64ec__))
71 unsigned __int64
__getReg(int);
72 #pragma intrinsic(__getReg)
80 #endif /* _INC_INTRIN */