aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/aarch64/aarch64.cc7
-rw-r--r--gcc/config/alpha/alpha.cc7
-rw-r--r--gcc/config/arc/arc.cc74
-rw-r--r--gcc/config/arm/arm.cc15
-rw-r--r--gcc/config/avr/avr.cc7
-rw-r--r--gcc/config/bfin/bfin.cc7
-rw-r--r--gcc/config/bpf/bpf.cc9
-rw-r--r--gcc/config/csky/csky.cc7
-rw-r--r--gcc/config/epiphany/epiphany.cc7
-rw-r--r--gcc/config/gcn/gcn.cc8
-rw-r--r--gcc/config/h8300/h8300.cc7
-rw-r--r--gcc/config/i386/i386-options.cc10
-rw-r--r--gcc/config/i386/i386-options.h2
-rw-r--r--gcc/config/i386/i386.cc5
-rw-r--r--gcc/config/ia64/ia64.cc15
-rw-r--r--gcc/config/loongarch/loongarch.cc8
-rw-r--r--gcc/config/m32c/m32c.cc7
-rw-r--r--gcc/config/m32r/m32r.cc7
-rw-r--r--gcc/config/m68k/m68k.cc7
-rw-r--r--gcc/config/mcore/mcore.cc7
-rw-r--r--gcc/config/microblaze/microblaze.cc7
-rw-r--r--gcc/config/mips/mips.cc7
-rw-r--r--gcc/config/msp430/msp430.cc8
-rw-r--r--gcc/config/nds32/nds32.cc9
-rw-r--r--gcc/config/nvptx/nvptx.cc7
-rw-r--r--gcc/config/riscv/riscv.cc9
-rw-r--r--gcc/config/rl78/rl78.cc7
-rw-r--r--gcc/config/rs6000/rs6000.cc13
-rw-r--r--gcc/config/rx/rx.cc7
-rw-r--r--gcc/config/s390/s390.cc9
-rw-r--r--gcc/config/sh/sh.cc7
-rw-r--r--gcc/config/sparc/sparc.cc7
-rw-r--r--gcc/config/stormy16/stormy16.cc7
-rw-r--r--gcc/config/v850/v850.cc7
-rw-r--r--gcc/config/visium/visium.cc7
35 files changed, 167 insertions, 174 deletions
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index 0f83ec0..fca64da 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -465,7 +465,7 @@ handle_aarch64_vector_pcs_attribute (tree *node, tree name, tree,
}
/* Table of machine attributes. */
-static const struct attribute_spec aarch64_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (aarch64_attribute_table,
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
@@ -476,9 +476,8 @@ static const struct attribute_spec aarch64_attribute_table[] =
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 },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ { "SVE sizeless type", 0, 0, false, true, false, true, NULL, NULL }
+});
typedef enum aarch64_cond_code
{
diff --git a/gcc/config/alpha/alpha.cc b/gcc/config/alpha/alpha.cc
index db6b34b..6aa9378 100644
--- a/gcc/config/alpha/alpha.cc
+++ b/gcc/config/alpha/alpha.cc
@@ -7482,14 +7482,13 @@ common_object_handler (tree *node, tree name ATTRIBUTE_UNUSED,
return NULL_TREE;
}
-static const struct attribute_spec vms_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (vms_attribute_table,
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
{ COMMON_OBJECT, 0, 1, true, false, false, false, common_object_handler,
- NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ NULL }
+});
void
vms_output_aligned_decl_common(FILE *file, tree decl, const char *name,
diff --git a/gcc/config/arc/arc.cc b/gcc/config/arc/arc.cc
index 70ee410..3f4eb5a 100644
--- a/gcc/config/arc/arc.cc
+++ b/gcc/config/arc/arc.cc
@@ -187,44 +187,6 @@ static tree arc_handle_secure_attribute (tree *, tree, tree, int, bool *);
static tree arc_handle_uncached_attribute (tree *, tree, tree, int, bool *);
static tree arc_handle_aux_attribute (tree *, tree, tree, int, bool *);
-/* Initialized arc_attribute_table to NULL since arc doesnot have any
- machine specific supported attributes. */
-const struct attribute_spec arc_attribute_table[] =
-{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req,
- affects_type_identity, handler, exclude } */
- { "interrupt", 1, 1, true, false, false, true,
- arc_handle_interrupt_attribute, NULL },
- /* Function calls made to this symbol must be done indirectly, because
- it may lie outside of the 21/25 bit addressing range of a normal function
- call. */
- { "long_call", 0, 0, false, true, true, false, NULL, NULL },
- /* Whereas these functions are always known to reside within the 25 bit
- addressing range of unconditionalized bl. */
- { "medium_call", 0, 0, false, true, true, false, NULL, NULL },
- /* And these functions are always known to reside within the 21 bit
- addressing range of blcc. */
- { "short_call", 0, 0, false, true, true, false, NULL, NULL },
- /* Function which are not having the prologue and epilogue generated
- by the compiler. */
- { "naked", 0, 0, true, false, false, false, arc_handle_fndecl_attribute,
- NULL },
- /* Functions calls made using jli instruction. The pointer in JLI
- table is found latter. */
- { "jli_always", 0, 0, false, true, true, false, NULL, NULL },
- /* Functions calls made using jli instruction. The pointer in JLI
- table is given as input parameter. */
- { "jli_fixed", 1, 1, false, true, true, false, arc_handle_jli_attribute,
- NULL },
- /* Call a function using secure-mode. */
- { "secure_call", 1, 1, false, true, true, false, arc_handle_secure_attribute,
- NULL },
- /* Bypass caches using .di flag. */
- { "uncached", 0, 0, false, true, false, false, arc_handle_uncached_attribute,
- NULL },
- { "aux", 0, 1, true, false, false, false, arc_handle_aux_attribute, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
static int arc_comp_type_attributes (const_tree, const_tree);
static void arc_file_start (void);
static void arc_internal_label (FILE *, const char *, unsigned long);
@@ -773,6 +735,42 @@ static rtx arc_legitimize_address_0 (rtx, rtx, machine_mode mode);
#include "target-def.h"
+TARGET_GNU_ATTRIBUTES (arc_attribute_table,
+{
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req,
+ affects_type_identity, handler, exclude } */
+ { "interrupt", 1, 1, true, false, false, true,
+ arc_handle_interrupt_attribute, NULL },
+ /* Function calls made to this symbol must be done indirectly, because
+ it may lie outside of the 21/25 bit addressing range of a normal function
+ call. */
+ { "long_call", 0, 0, false, true, true, false, NULL, NULL },
+ /* Whereas these functions are always known to reside within the 25 bit
+ addressing range of unconditionalized bl. */
+ { "medium_call", 0, 0, false, true, true, false, NULL, NULL },
+ /* And these functions are always known to reside within the 21 bit
+ addressing range of blcc. */
+ { "short_call", 0, 0, false, true, true, false, NULL, NULL },
+ /* Function which are not having the prologue and epilogue generated
+ by the compiler. */
+ { "naked", 0, 0, true, false, false, false, arc_handle_fndecl_attribute,
+ NULL },
+ /* Functions calls made using jli instruction. The pointer in JLI
+ table is found latter. */
+ { "jli_always", 0, 0, false, true, true, false, NULL, NULL },
+ /* Functions calls made using jli instruction. The pointer in JLI
+ table is given as input parameter. */
+ { "jli_fixed", 1, 1, false, true, true, false, arc_handle_jli_attribute,
+ NULL },
+ /* Call a function using secure-mode. */
+ { "secure_call", 1, 1, false, true, true, false, arc_handle_secure_attribute,
+ NULL },
+ /* Bypass caches using .di flag. */
+ { "uncached", 0, 0, false, true, false, false, arc_handle_uncached_attribute,
+ NULL },
+ { "aux", 0, 1, true, false, false, false, arc_handle_aux_attribute, NULL }
+});
+
#undef TARGET_ASM_ALIGNED_HI_OP
#define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t"
#undef TARGET_ASM_ALIGNED_SI_OP
diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc
index 25a1ad7..5cb35e8 100644
--- a/gcc/config/arm/arm.cc
+++ b/gcc/config/arm/arm.cc
@@ -332,7 +332,7 @@ static rtx_insn *thumb1_md_asm_adjust (vec<rtx> &, vec<rtx> &,
static const char *arm_identify_fpu_from_isa (sbitmap);
/* Table of machine attributes. */
-static const struct attribute_spec arm_attribute_table[] =
+static const attribute_spec arm_gnu_attributes[] =
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
@@ -380,8 +380,17 @@ static const struct attribute_spec arm_attribute_table[] =
arm_handle_cmse_nonsecure_entry, NULL },
{ "cmse_nonsecure_call", 0, 0, false, false, false, true,
arm_handle_cmse_nonsecure_call, NULL },
- { "Advanced SIMD type", 1, 1, false, true, false, true, NULL, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
+ { "Advanced SIMD type", 1, 1, false, true, false, true, NULL, NULL }
+};
+
+static const scoped_attribute_specs arm_gnu_attribute_table =
+{
+ "gnu", arm_gnu_attributes
+};
+
+static const scoped_attribute_specs *const arm_attribute_table[] =
+{
+ &arm_gnu_attribute_table
};
/* Initialize the GCC target structure. */
diff --git a/gcc/config/avr/avr.cc b/gcc/config/avr/avr.cc
index a297f4e..3af9ca8 100644
--- a/gcc/config/avr/avr.cc
+++ b/gcc/config/avr/avr.cc
@@ -10442,7 +10442,7 @@ avr_eval_addr_attrib (rtx x)
/* AVR attributes. */
-static const struct attribute_spec avr_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (avr_attribute_table,
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
@@ -10467,9 +10467,8 @@ static const struct attribute_spec avr_attribute_table[] =
{ "address", 1, 1, true, false, false, false,
avr_handle_addr_attribute, NULL },
{ "absdata", 0, 0, true, false, false, false,
- avr_handle_absdata_attribute, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ avr_handle_absdata_attribute, NULL }
+});
/* Return true if we support address space AS for the architecture in effect
diff --git a/gcc/config/bfin/bfin.cc b/gcc/config/bfin/bfin.cc
index 5718bab..c02136f 100644
--- a/gcc/config/bfin/bfin.cc
+++ b/gcc/config/bfin/bfin.cc
@@ -4896,7 +4896,7 @@ bfin_handle_l2_attribute (tree *node, tree ARG_UNUSED (name),
}
/* Table of valid machine attributes. */
-static const struct attribute_spec bfin_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (bfin_attribute_table,
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
@@ -4921,9 +4921,8 @@ static const struct attribute_spec bfin_attribute_table[] =
bfin_handle_l1_data_attribute, NULL },
{ "l1_data_B", 0, 0, true, false, false, false,
bfin_handle_l1_data_attribute, NULL },
- { "l2", 0, 0, true, false, false, false, bfin_handle_l2_attribute, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ { "l2", 0, 0, true, false, false, false, bfin_handle_l2_attribute, NULL }
+});
/* Implementation of TARGET_ASM_INTEGER. When using FD-PIC, we need to
tell the assembler to generate pointers to function descriptors in
diff --git a/gcc/config/bpf/bpf.cc b/gcc/config/bpf/bpf.cc
index ffd83a7..f7a5c77 100644
--- a/gcc/config/bpf/bpf.cc
+++ b/gcc/config/bpf/bpf.cc
@@ -140,7 +140,7 @@ bpf_handle_preserve_access_index_attribute (tree *node, tree name,
/* Target-specific attributes. */
-static const struct attribute_spec bpf_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (bpf_attribute_table,
{
/* Syntax: { name, min_len, max_len, decl_required, type_required,
function_type_required, affects_type_identity, handler,
@@ -157,11 +157,8 @@ static const struct attribute_spec bpf_attribute_table[] =
/* Support for `naked' function attribute. */
{ "naked", 0, 1, false, false, false, false,
- bpf_handle_fndecl_attribute, NULL },
-
- /* The last attribute spec is set to be NULL. */
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ bpf_handle_fndecl_attribute, NULL }
+});
#undef TARGET_ATTRIBUTE_TABLE
#define TARGET_ATTRIBUTE_TABLE bpf_attribute_table
diff --git a/gcc/config/csky/csky.cc b/gcc/config/csky/csky.cc
index 731f47c..ac089fe 100644
--- a/gcc/config/csky/csky.cc
+++ b/gcc/config/csky/csky.cc
@@ -211,16 +211,15 @@ const int csky_debugger_regno[FIRST_PSEUDO_REGISTER] =
/* Table of machine attributes. */
static tree csky_handle_fndecl_attribute (tree *, tree, tree, int, bool *);
static tree csky_handle_isr_attribute (tree *, tree, tree, int, bool *);
-static const struct attribute_spec csky_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (csky_attribute_table,
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
{ "naked", 0, 0, true, false, false, false, csky_handle_fndecl_attribute, NULL },
/* Interrupt Service Routines have special prologue and epilogue requirements. */
{ "interrupt", 0, 1, false, false, false, false, csky_handle_isr_attribute, NULL },
- { "isr", 0, 1, false, false, false, false, csky_handle_isr_attribute, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ { "isr", 0, 1, false, false, false, false, csky_handle_isr_attribute, NULL }
+});
/* A C structure for machine-specific, per-function data.
This is added to the cfun structure. */
diff --git a/gcc/config/epiphany/epiphany.cc b/gcc/config/epiphany/epiphany.cc
index 68e748c..e10e64d 100644
--- a/gcc/config/epiphany/epiphany.cc
+++ b/gcc/config/epiphany/epiphany.cc
@@ -458,7 +458,7 @@ epiphany_init_reg_tables (void)
They unmask them while calling an interruptible
function, though. */
-static const struct attribute_spec epiphany_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (epiphany_attribute_table,
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
@@ -468,9 +468,8 @@ static const struct attribute_spec epiphany_attribute_table[] =
epiphany_handle_forwarder_attribute, NULL },
{ "long_call", 0, 0, false, true, true, false, NULL, NULL },
{ "short_call", 0, 0, false, true, true, false, NULL, NULL },
- { "disinterrupt", 0, 0, false, true, true, true, NULL, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ { "disinterrupt", 0, 0, false, true, true, true, NULL, NULL }
+});
/* Handle an "interrupt" attribute; arguments as in
struct attribute_spec.handler. */
diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc
index 22d2b6e..0781c2a 100644
--- a/gcc/config/gcn/gcn.cc
+++ b/gcc/config/gcn/gcn.cc
@@ -358,14 +358,12 @@ gcn_handle_amdgpu_hsa_kernel_attribute (tree *node, tree name,
Create target-specific __attribute__ types. */
-static const struct attribute_spec gcn_attribute_table[] = {
+TARGET_GNU_ATTRIBUTES (gcn_attribute_table, {
/* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
affects_type_identity } */
{"amdgpu_hsa_kernel", 0, GCN_KERNEL_ARG_TYPES, false, true,
- true, true, gcn_handle_amdgpu_hsa_kernel_attribute, NULL},
- /* End element. */
- {NULL, 0, 0, false, false, false, false, NULL, NULL}
-};
+ true, true, gcn_handle_amdgpu_hsa_kernel_attribute, NULL}
+});
/* }}} */
/* {{{ Registers and modes. */
diff --git a/gcc/config/h8300/h8300.cc b/gcc/config/h8300/h8300.cc
index 4bbb1b7..5936cdc 100644
--- a/gcc/config/h8300/h8300.cc
+++ b/gcc/config/h8300/h8300.cc
@@ -4909,7 +4909,7 @@ h8300_insert_attributes (tree node, tree *attributes)
tiny_data: This variable lives in the tiny data area and can be
referenced with 16-bit absolute memory references. */
-static const struct attribute_spec h8300_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (h8300_attribute_table,
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
@@ -4926,9 +4926,8 @@ static const struct attribute_spec h8300_attribute_table[] =
{ "eightbit_data", 0, 0, true, false, false, false,
h8300_handle_eightbit_data_attribute, NULL },
{ "tiny_data", 0, 0, true, false, false, false,
- h8300_handle_tiny_data_attribute, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ h8300_handle_tiny_data_attribute, NULL }
+});
/* Handle an attribute requiring a FUNCTION_DECL; arguments as in
diff --git a/gcc/config/i386/i386-options.cc b/gcc/config/i386/i386-options.cc
index fb8638a..8776592 100644
--- a/gcc/config/i386/i386-options.cc
+++ b/gcc/config/i386/i386-options.cc
@@ -4086,7 +4086,7 @@ handle_nodirect_extern_access_attribute (tree *pnode, tree name,
}
/* Table of valid machine attributes. */
-const struct attribute_spec ix86_attribute_table[] =
+static const attribute_spec ix86_gnu_attributes[] =
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
@@ -4166,10 +4166,12 @@ const struct attribute_spec ix86_attribute_table[] =
{ "cf_check", 0, 0, true, false, false, false,
ix86_handle_fndecl_attribute, NULL },
{ "nodirect_extern_access", 0, 0, true, false, false, false,
- handle_nodirect_extern_access_attribute, NULL },
+ handle_nodirect_extern_access_attribute, NULL }
+};
- /* End element. */
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
+const scoped_attribute_specs ix86_gnu_attribute_table =
+{
+ "gnu", ix86_gnu_attributes
};
#include "gt-i386-options.h"
diff --git a/gcc/config/i386/i386-options.h b/gcc/config/i386/i386-options.h
index 6866606..6274c59 100644
--- a/gcc/config/i386/i386-options.h
+++ b/gcc/config/i386/i386-options.h
@@ -82,7 +82,7 @@ void ix86_function_specific_print (FILE *, int,
struct cl_target_option *);
bool ix86_valid_target_attribute_p (tree, tree, tree, int);
-extern const struct attribute_spec ix86_attribute_table[];
+extern const struct scoped_attribute_specs ix86_gnu_attribute_table;
#endif /* GCC_I386_OPTIONS_H */
diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc
index 9390f52..0f91ee7 100644
--- a/gcc/config/i386/i386.cc
+++ b/gcc/config/i386/i386.cc
@@ -25968,6 +25968,11 @@ ix86_run_selftests (void)
#endif /* CHECKING_P */
+static const scoped_attribute_specs *const ix86_attribute_table[] =
+{
+ &ix86_gnu_attribute_table
+};
+
/* Initialize the GCC target structure. */
#undef TARGET_RETURN_IN_MEMORY
#define TARGET_RETURN_IN_MEMORY ix86_return_in_memory
diff --git a/gcc/config/ia64/ia64.cc b/gcc/config/ia64/ia64.cc
index c241e1a..f7766c2 100644
--- a/gcc/config/ia64/ia64.cc
+++ b/gcc/config/ia64/ia64.cc
@@ -358,7 +358,7 @@ static bool ia64_expand_vec_perm_const_1 (struct expand_vec_perm_d *d);
/* Table of valid machine attributes. */
-static const struct attribute_spec ia64_attribute_table[] =
+static const attribute_spec ia64_gnu_attributes[] =
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
@@ -370,8 +370,17 @@ static const struct attribute_spec ia64_attribute_table[] =
ia64_vms_common_object_attribute, NULL },
#endif
{ "version_id", 1, 1, true, false, false, false,
- ia64_handle_version_id_attribute, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
+ ia64_handle_version_id_attribute, NULL }
+};
+
+static const scoped_attribute_specs ia64_gnu_attribute_table =
+{
+ "gnu", ia64_gnu_attributes
+};
+
+static const scoped_attribute_specs *const ia64_attribute_table[] =
+{
+ &ia64_gnu_attribute_table
};
/* Initialize the GCC target structure. */
diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
index f89c346..3545e66 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -7840,15 +7840,13 @@ loongarch_handle_model_attribute (tree *node, tree name, tree arg, int,
return NULL_TREE;
}
-static const struct attribute_spec loongarch_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (loongarch_attribute_table,
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
{ "model", 1, 1, true, false, false, false,
- loongarch_handle_model_attribute, NULL },
- /* The last attribute spec is set to be NULL. */
- {}
-};
+ loongarch_handle_model_attribute, NULL }
+});
bool
loongarch_use_anchors_for_symbol_p (const_rtx symbol)
diff --git a/gcc/config/m32c/m32c.cc b/gcc/config/m32c/m32c.cc
index e18efc3..c63c75a 100644
--- a/gcc/config/m32c/m32c.cc
+++ b/gcc/config/m32c/m32c.cc
@@ -2999,7 +2999,7 @@ current_function_special_page_vector (rtx x)
#undef TARGET_ATTRIBUTE_TABLE
#define TARGET_ATTRIBUTE_TABLE m32c_attribute_table
-static const struct attribute_spec m32c_attribute_table[] = {
+TARGET_GNU_ATTRIBUTES (m32c_attribute_table, {
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
{ "interrupt", 0, 0, false, false, false, false, interrupt_handler, NULL },
@@ -3007,9 +3007,8 @@ static const struct attribute_spec m32c_attribute_table[] = {
{ "fast_interrupt", 0, 0, false, false, false, false,
interrupt_handler, NULL },
{ "function_vector", 1, 1, true, false, false, false,
- function_vector_handler, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ function_vector_handler, NULL }
+});
#undef TARGET_COMP_TYPE_ATTRIBUTES
#define TARGET_COMP_TYPE_ATTRIBUTES m32c_comp_type_attributes
diff --git a/gcc/config/m32r/m32r.cc b/gcc/config/m32r/m32r.cc
index 63a1798..1a9c8ef 100644
--- a/gcc/config/m32r/m32r.cc
+++ b/gcc/config/m32r/m32r.cc
@@ -112,15 +112,14 @@ static HOST_WIDE_INT m32r_starting_frame_offset (void);
/* M32R specific attributes. */
-static const struct attribute_spec m32r_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (m32r_attribute_table,
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
{ "interrupt", 0, 0, true, false, false, false, NULL, NULL },
{ "model", 1, 1, true, false, false, false, m32r_handle_model_attribute,
- NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ NULL }
+});
/* Initialize the GCC target structure. */
#undef TARGET_ATTRIBUTE_TABLE
diff --git a/gcc/config/m68k/m68k.cc b/gcc/config/m68k/m68k.cc
index 145a92d..001cf5b 100644
--- a/gcc/config/m68k/m68k.cc
+++ b/gcc/config/m68k/m68k.cc
@@ -361,7 +361,7 @@ static void m68k_asm_final_postscan_insn (FILE *, rtx_insn *insn, rtx [], int);
#undef TARGET_ASM_FINAL_POSTSCAN_INSN
#define TARGET_ASM_FINAL_POSTSCAN_INSN m68k_asm_final_postscan_insn
-static const struct attribute_spec m68k_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (m68k_attribute_table,
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
@@ -370,9 +370,8 @@ static const struct attribute_spec m68k_attribute_table[] =
{ "interrupt_handler", 0, 0, true, false, false, false,
m68k_handle_fndecl_attribute, NULL },
{ "interrupt_thread", 0, 0, true, false, false, false,
- m68k_handle_fndecl_attribute, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ m68k_handle_fndecl_attribute, NULL }
+});
struct gcc_target targetm = TARGET_INITIALIZER;
diff --git a/gcc/config/mcore/mcore.cc b/gcc/config/mcore/mcore.cc
index 6f1d7af..ca67254 100644
--- a/gcc/config/mcore/mcore.cc
+++ b/gcc/config/mcore/mcore.cc
@@ -151,16 +151,15 @@ static bool mcore_modes_tieable_p (machine_mode, machine_mode);
/* MCore specific attributes. */
-static const struct attribute_spec mcore_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (mcore_attribute_table,
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
{ "dllexport", 0, 0, true, false, false, false, NULL, NULL },
{ "dllimport", 0, 0, true, false, false, false, NULL, NULL },
{ "naked", 0, 0, true, false, false, false,
- mcore_handle_naked_attribute, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ mcore_handle_naked_attribute, NULL }
+});
/* Initialize the GCC target structure. */
#undef TARGET_ASM_EXTERNAL_LIBCALL
diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
index 60ad551..3ea177b 100644
--- a/gcc/config/microblaze/microblaze.cc
+++ b/gcc/config/microblaze/microblaze.cc
@@ -218,15 +218,14 @@ int break_handler;
int fast_interrupt;
int save_volatiles;
-const struct attribute_spec microblaze_attribute_table[] = {
+TARGET_GNU_ATTRIBUTES (microblaze_attribute_table, {
/* name min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude */
{"interrupt_handler", 0, 0, true, false, false, false, NULL, NULL },
{"break_handler", 0, 0, true, false, false, false, NULL, NULL },
{"fast_interrupt", 0, 0, true, false, false, false, NULL, NULL },
- {"save_volatiles", 0, 0, true, false, false, false, NULL, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ {"save_volatiles", 0, 0, true, false, false, false, NULL, NULL }
+});
static int microblaze_interrupt_function_p (tree);
diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc
index cbd7d9b..9180dbb 100644
--- a/gcc/config/mips/mips.cc
+++ b/gcc/config/mips/mips.cc
@@ -611,7 +611,7 @@ static tree mips_handle_use_shadow_register_set_attr (tree *, tree, tree, int,
bool *);
/* The value of TARGET_ATTRIBUTE_TABLE. */
-static const struct attribute_spec mips_attribute_table[] = {
+TARGET_GNU_ATTRIBUTES (mips_attribute_table, {
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
{ "long_call", 0, 0, false, true, true, false, NULL, NULL },
@@ -636,9 +636,8 @@ static const struct attribute_spec mips_attribute_table[] = {
mips_handle_use_shadow_register_set_attr, NULL },
{ "keep_interrupts_masked", 0, 0, false, true, true, false, NULL, NULL },
{ "use_debug_exception_return", 0, 0, false, true, true, false, NULL, NULL },
- { "use_hazard_barrier_return", 0, 0, true, false, false, false, NULL, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ { "use_hazard_barrier_return", 0, 0, true, false, false, false, NULL, NULL }
+});
/* A table describing all the processors GCC knows about; see
mips-cpus.def for details. */
diff --git a/gcc/config/msp430/msp430.cc b/gcc/config/msp430/msp430.cc
index 061a9c7..85f499f 100644
--- a/gcc/config/msp430/msp430.cc
+++ b/gcc/config/msp430/msp430.cc
@@ -2057,7 +2057,7 @@ static const struct attribute_spec::exclusions attr_either_exclusions[] =
#define TARGET_ATTRIBUTE_TABLE msp430_attribute_table
/* Table of MSP430-specific attributes. */
-const struct attribute_spec msp430_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (msp430_attribute_table,
{
/* { name, min_num_args, max_num_args, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
@@ -2075,10 +2075,8 @@ const struct attribute_spec msp430_attribute_table[] =
{ ATTR_UPPER, 0, 0, true, false, false, false, msp430_section_attr,
attr_upper_exclusions },
{ ATTR_EITHER, 0, 0, true, false, false, false, msp430_section_attr,
- attr_either_exclusions },
-
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
- };
+ attr_either_exclusions }
+ });
#undef TARGET_HANDLE_GENERIC_ATTRIBUTE
#define TARGET_HANDLE_GENERIC_ATTRIBUTE msp430_handle_generic_attribute
diff --git a/gcc/config/nds32/nds32.cc b/gcc/config/nds32/nds32.cc
index 1f8de2a..e0a7398 100644
--- a/gcc/config/nds32/nds32.cc
+++ b/gcc/config/nds32/nds32.cc
@@ -288,7 +288,7 @@ static const int nds32_reg_alloc_order_for_speed[] =
};
/* Defining target-specific uses of __attribute__. */
-static const struct attribute_spec nds32_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (nds32_attribute_table,
{
/* Syntax: { name, min_len, max_len, decl_required, type_required,
function_type_required, affects_type_identity, handler,
@@ -326,11 +326,8 @@ static const struct attribute_spec nds32_attribute_table[] =
/* FOR BACKWARD COMPATIBILITY,
this attribute also tells no prologue/epilogue. */
- { "no_prologue", 0, 0, false, false, false, false, NULL, NULL },
-
- /* The last attribute spec is set to be NULL. */
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ { "no_prologue", 0, 0, false, false, false, false, NULL, NULL }
+});
/* ------------------------------------------------------------------------ */
diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc
index 570bcc7..992d005 100644
--- a/gcc/config/nvptx/nvptx.cc
+++ b/gcc/config/nvptx/nvptx.cc
@@ -5834,16 +5834,15 @@ nvptx_handle_shared_attribute (tree *node, tree name, tree ARG_UNUSED (args),
}
/* Table of valid machine attributes. */
-static const struct attribute_spec nvptx_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (nvptx_attribute_table,
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
{ "kernel", 0, 0, true, false, false, false, nvptx_handle_kernel_attribute,
NULL },
{ "shared", 0, 0, true, false, false, false, nvptx_handle_shared_attribute,
- NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ NULL }
+});
/* Limit vector alignments to BIGGEST_ALIGNMENT. */
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 58060b8..3f111fa 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -434,7 +434,7 @@ static tree riscv_handle_type_attribute (tree *, tree, tree, int, bool *);
static void riscv_legitimize_poly_move (machine_mode, rtx, rtx, rtx);
/* Defining target-specific uses of __attribute__. */
-static const struct attribute_spec riscv_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (riscv_attribute_table,
{
/* Syntax: { name, min_len, max_len, decl_required, type_required,
function_type_required, affects_type_identity, handler,
@@ -450,11 +450,8 @@ static const struct attribute_spec riscv_attribute_table[] =
/* The following two are used for the built-in properties of the Vector type
and are not used externally */
{"RVV sizeless type", 4, 4, false, true, false, true, NULL, NULL},
- {"RVV type", 0, 0, false, true, false, true, NULL, NULL},
-
- /* The last attribute spec is set to be NULL. */
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ {"RVV type", 0, 0, false, true, false, true, NULL, NULL}
+});
/* Order for the CLOBBERs/USEs of gpr_save. */
static const unsigned gpr_save_reg_order[] = {
diff --git a/gcc/config/rl78/rl78.cc b/gcc/config/rl78/rl78.cc
index 7f13e83..5d8fddb 100644
--- a/gcc/config/rl78/rl78.cc
+++ b/gcc/config/rl78/rl78.cc
@@ -898,7 +898,7 @@ rl78_handle_vector_attribute (tree * node,
#define TARGET_ATTRIBUTE_TABLE rl78_attribute_table
/* Table of RL78-specific attributes. */
-const struct attribute_spec rl78_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (rl78_attribute_table,
{
/* Name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude. */
@@ -911,9 +911,8 @@ const struct attribute_spec rl78_attribute_table[] =
{ "saddr", 0, 0, true, false, false, false,
rl78_handle_saddr_attribute, NULL },
{ "vector", 1, -1, true, false, false, false,
- rl78_handle_vector_attribute, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ rl78_handle_vector_attribute, NULL }
+});
diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index cee22c3..5386470 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -1255,7 +1255,7 @@ static const char alt_reg_names[][8] =
/* Table of valid machine attributes. */
-static const struct attribute_spec rs6000_attribute_table[] =
+static const attribute_spec rs6000_gnu_attributes[] =
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
@@ -1272,7 +1272,16 @@ static const struct attribute_spec rs6000_attribute_table[] =
#ifdef SUBTARGET_ATTRIBUTE_TABLE
SUBTARGET_ATTRIBUTE_TABLE,
#endif
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
+};
+
+static const scoped_attribute_specs rs6000_gnu_attribute_table =
+{
+ "gnu", rs6000_gnu_attributes
+};
+
+static const scoped_attribute_specs *const rs6000_attribute_table[] =
+{
+ &rs6000_gnu_attribute_table
};
#ifndef TARGET_PROFILE_KERNEL
diff --git a/gcc/config/rx/rx.cc b/gcc/config/rx/rx.cc
index 245c6a4..0754e28 100644
--- a/gcc/config/rx/rx.cc
+++ b/gcc/config/rx/rx.cc
@@ -2760,7 +2760,7 @@ rx_handle_vector_attribute (tree * node,
}
/* Table of RX specific attributes. */
-const struct attribute_spec rx_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (rx_attribute_table,
{
/* Name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude. */
@@ -2771,9 +2771,8 @@ const struct attribute_spec rx_attribute_table[] =
{ "naked", 0, 0, true, false, false, false,
rx_handle_func_attribute, NULL },
{ "vector", 1, -1, true, false, false, false,
- rx_handle_vector_attribute, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ rx_handle_vector_attribute, NULL }
+});
/* Implement TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE. */
diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc
index 0a969ec..384fdb9 100644
--- a/gcc/config/s390/s390.cc
+++ b/gcc/config/s390/s390.cc
@@ -1303,7 +1303,7 @@ s390_handle_string_attribute (tree *node, tree name ATTRIBUTE_UNUSED,
return NULL_TREE;
}
-static const struct attribute_spec s390_attribute_table[] = {
+TARGET_GNU_ATTRIBUTES (s390_attribute_table, {
{ "hotpatch", 2, 2, true, false, false, false,
s390_handle_hotpatch_attribute, NULL },
{ "s390_vector_bool", 0, 0, false, true, false, true,
@@ -1319,11 +1319,8 @@ static const struct attribute_spec s390_attribute_table[] = {
{ "function_return_reg", 1, 1, true, false, false, false,
s390_handle_string_attribute, NULL },
{ "function_return_mem", 1, 1, true, false, false, false,
- s390_handle_string_attribute, NULL },
-
- /* End element. */
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ s390_handle_string_attribute, NULL }
+});
/* Return the alignment for LABEL. We default to the -falign-labels
value except for the literal pool base label. */
diff --git a/gcc/config/sh/sh.cc b/gcc/config/sh/sh.cc
index 6ec2eec..8c378b2 100644
--- a/gcc/config/sh/sh.cc
+++ b/gcc/config/sh/sh.cc
@@ -329,7 +329,7 @@ static bool sh_hard_regno_mode_ok (unsigned int, machine_mode);
static bool sh_modes_tieable_p (machine_mode, machine_mode);
static bool sh_can_change_mode_class (machine_mode, machine_mode, reg_class_t);
-static const struct attribute_spec sh_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (sh_attribute_table,
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
@@ -348,9 +348,8 @@ static const struct attribute_spec sh_attribute_table[] =
{ "resbank", 0, 0, true, false, false, false,
sh_handle_resbank_handler_attribute, NULL },
{ "function_vector", 1, 1, true, false, false, false,
- sh2a_handle_function_vector_handler_attribute, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ sh2a_handle_function_vector_handler_attribute, NULL }
+});
/* Initialize the GCC target structure. */
#undef TARGET_ATTRIBUTE_TABLE
diff --git a/gcc/config/sparc/sparc.cc b/gcc/config/sparc/sparc.cc
index e90739d..c09dbcd 100644
--- a/gcc/config/sparc/sparc.cc
+++ b/gcc/config/sparc/sparc.cc
@@ -721,13 +721,12 @@ static HARD_REG_SET sparc_zero_call_used_regs (HARD_REG_SET);
#ifdef SUBTARGET_ATTRIBUTE_TABLE
/* Table of valid machine attributes. */
-static const struct attribute_spec sparc_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (sparc_attribute_table,
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
do_diagnostic, handler, exclude } */
- SUBTARGET_ATTRIBUTE_TABLE,
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ SUBTARGET_ATTRIBUTE_TABLE
+});
#endif
char sparc_hard_reg_printed[8];
diff --git a/gcc/config/stormy16/stormy16.cc b/gcc/config/stormy16/stormy16.cc
index 1088715..071043b 100644
--- a/gcc/config/stormy16/stormy16.cc
+++ b/gcc/config/stormy16/stormy16.cc
@@ -2377,7 +2377,7 @@ static tree xstormy16_handle_interrupt_attribute
static tree xstormy16_handle_below100_attribute
(tree *, tree, tree, int, bool *);
-static const struct attribute_spec xstormy16_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (xstormy16_attribute_table,
{
/* name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude. */
@@ -2386,9 +2386,8 @@ static const struct attribute_spec xstormy16_attribute_table[] =
{ "BELOW100", 0, 0, false, false, false, false,
xstormy16_handle_below100_attribute, NULL },
{ "below100", 0, 0, false, false, false, false,
- xstormy16_handle_below100_attribute, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ xstormy16_handle_below100_attribute, NULL }
+});
/* Handle an "interrupt" attribute;
arguments as in struct attribute_spec.handler. */
diff --git a/gcc/config/v850/v850.cc b/gcc/config/v850/v850.cc
index 416c284..50c91c6 100644
--- a/gcc/config/v850/v850.cc
+++ b/gcc/config/v850/v850.cc
@@ -3114,7 +3114,7 @@ v850_adjust_insn_length (rtx_insn *insn, int length)
/* V850 specific attributes. */
-static const struct attribute_spec v850_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (v850_attribute_table,
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
@@ -3127,9 +3127,8 @@ static const struct attribute_spec v850_attribute_table[] =
{ "tda", 0, 0, true, false, false, false,
v850_handle_data_area_attribute, NULL },
{ "zda", 0, 0, true, false, false, false,
- v850_handle_data_area_attribute, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
-};
+ v850_handle_data_area_attribute, NULL }
+});
static void
v850_option_override (void)
diff --git a/gcc/config/visium/visium.cc b/gcc/config/visium/visium.cc
index 5fadbc8..4a1877c 100644
--- a/gcc/config/visium/visium.cc
+++ b/gcc/config/visium/visium.cc
@@ -145,14 +145,13 @@ static inline bool current_function_has_lr_slot (void);
/* Supported attributes:
interrupt -- specifies this function is an interrupt handler. */
-static const struct attribute_spec visium_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (visium_attribute_table,
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
{ "interrupt", 0, 0, true, false, false, false, visium_handle_interrupt_attr,
- NULL},
- { NULL, 0, 0, false, false, false, false, NULL, NULL },
-};
+ NULL}
+});
static struct machine_function *visium_init_machine_status (void);