Skip to content

Commit 955cfb6

Browse files
authored
Update aarch64.c
Handle application of nocommon semantics by explicit initialization. Initialized data is emitted into `.data` where as global declarations are implicitly zero'ed by means of emission into `.bss`. `__nocommon__` ensures that the data is emitted into `.data`.
1 parent 8dd381e commit 955cfb6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

compiler-rt/lib/builtins/cpu_model/aarch64.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,13 @@ _Bool __aarch64_have_lse_atomics = false;
5757
#if !defined(DISABLE_AARCH64_FMV)
5858

5959
// Architecture features used in function multi-versioning
60-
#if defined(_MSC_VER)
61-
__declspec(allocate(".data"))
62-
#endif
6360
struct {
6461
unsigned long long features;
6562
// As features grows new fields could be added
6663
} __aarch64_cpu_features
67-
#if !defined(_MSC_VER)
64+
#if defined(_MSC_VER)
65+
= { 0 }
66+
#else
6867
__attribute__((__visibility__("hidden"), __nocommon__))
6968
#endif
7069
;

0 commit comments

Comments
 (0)