]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: Add selectany attribute handling
authorEvgeny Karpov <Evgeny.Karpov@microsoft.com>
Mon, 24 Jun 2024 12:44:58 +0000 (12:44 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Tue, 25 Jun 2024 06:38:38 +0000 (06:38 +0000)
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.Karpov@microsoft.com>

gcc/ChangeLog:
* config/aarch64/aarch64.cc: Extend the aarch64 attributes list.
* config/aarch64/cygming.h (SUBTARGET_ATTRIBUTE_TABLE): Define the
selectany attribute.

gcc/config/aarch64/aarch64.cc
gcc/config/aarch64/cygming.h

index ae7e21d90b2aeec51b7626471ccf7f036fa9b3db..61daa6daf68b3a729f6c73ccff4302287d7624e7 100644 (file)
@@ -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 =
index 0d048879311f70b7c555885bc2e4a9608e4e8a97..76623153080251acdcff60577fed130a0c8e612e 100644 (file)
@@ -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