File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
compiler-rt/lib/builtins/cpu_model Expand file tree Collapse file tree 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
4848#elif defined(__linux__ ) && __has_include (< sys /auxv .h > )
4949#include "aarch64/hwcap.inc"
5050#include "aarch64/lse_atomics/getauxval.inc"
51+ #elif defined(_WIN32 )
52+ #include "aarch64/lse_atomics/windows.inc"
5153#else
5254// When unimplemented, we leave __aarch64_have_lse_atomics initialized to false.
5355#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