https://gcc.gnu.org/g:337632ef02a77d20ceb3dcb04751b4d4c844e23e

commit r15-1601-g337632ef02a77d20ceb3dcb04751b4d4c844e23e
Author: Evgeny Karpov <evgeny.kar...@microsoft.com>
Date:   Mon Jun 24 12:44:58 2024 +0000

    aarch64: Add selectany attribute handling
    
    This patch extends the aarch64 attributes list with the selectany
    attribute for the aarch64-w64-mingw32 target and reuses the mingw
    implementation to handle it.
    
    2024-06-08  Evgeny Karpov <evgeny.kar...@microsoft.com>
    
            gcc/ChangeLog:
            * config/aarch64/aarch64.cc: Extend the aarch64 attributes list.
            * config/aarch64/cygming.h (SUBTARGET_ATTRIBUTE_TABLE): Define the
            selectany attribute.

Diff:
---
 gcc/config/aarch64/aarch64.cc | 5 ++++-
 gcc/config/aarch64/cygming.h  | 3 +++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index ae7e21d90b2..61daa6daf68 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -859,7 +859,10 @@ static const attribute_spec aarch64_gnu_attributes[] =
                          NULL },
   { "Advanced SIMD type", 1, 1, false, true,  false, true,  NULL, NULL },
   { "SVE type",                  3, 3, false, true,  false, true,  NULL, NULL 
},
-  { "SVE sizeless type",  0, 0, false, true,  false, true,  NULL, NULL }
+  { "SVE sizeless type",  0, 0, false, true,  false, true,  NULL, NULL },
+#ifdef SUBTARGET_ATTRIBUTE_TABLE
+  SUBTARGET_ATTRIBUTE_TABLE
+#endif
 };
 
 static const scoped_attribute_specs aarch64_gnu_attribute_table =
diff --git a/gcc/config/aarch64/cygming.h b/gcc/config/aarch64/cygming.h
index 0d048879311..76623153080 100644
--- a/gcc/config/aarch64/cygming.h
+++ b/gcc/config/aarch64/cygming.h
@@ -154,6 +154,9 @@ still needed for compilation.  */
     flag_stack_check = STATIC_BUILTIN_STACK_CHECK;     \
   } while (0)
 
+#define SUBTARGET_ATTRIBUTE_TABLE \
+  { "selectany", 0, 0, true, false, false, false, \
+    mingw_handle_selectany_attribute, NULL }
 
 #define SUPPORTS_ONE_ONLY 1

Reply via email to