File tree 2 files changed +14
-0
lines changed
compiler-rt/lib/builtins/cpu_model 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ _Bool __aarch64_have_lse_atomics
48
48
#elif defined(__linux__ ) && __has_include (< sys /auxv .h > )
49
49
#include "aarch64/hwcap.inc"
50
50
#include "aarch64/lse_atomics/getauxval.inc"
51
+ #elif defined(_WIN32 )
52
+ #include "aarch64/lse_atomics/windows.inc"
51
53
#else
52
54
// When unimplemented, we leave __aarch64_have_lse_atomics initialized to false.
53
55
#endif
Original file line number Diff line number Diff line change
1
+ #define WIN32_LEAN_AND_MEAN
2
+ #include < windows.h>
3
+ #include < processthreadsapi.h>
4
+
5
+ #ifndef PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE
6
+ #define PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE 34
7
+ #endif
8
+
9
+ static void CONSTRUCTOR_ATTRIBUTE init_have_lse_atomics (void ) {
10
+ if (IsProcessorFeaturePresent (PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE))
11
+ __aarch64_have_lse_atomics = true ;
12
+ }
You can’t perform that action at this time.
0 commit comments