From dd5351428305e43d9d78449f978483dd58943d87 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 15 Mar 1999 12:49:36 +0000 Subject: [PATCH] Remove leading and trailing double underscores from m32r specific attribute names in order to match the documentation. From-SVN: r25780 --- gcc/ChangeLog | 8 ++++++++ gcc/config/m32r/m32r.c | 39 +++++++++++++++++++++++++-------------- 2 files changed, 33 insertions(+), 14 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 049d7adbd8a..c26f9d06d65 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +Mon Mar 15 12:39:38 1999 Nick Clifton + + * config/m32r/m32r.c (init_idents): New function. Initialise + static tree nodes for m32r specific attribute identifiers. Remove + leading and trailing double underscores from the attribute names. + (m32r_valid_machine_decl_attribute): Call init_idents. + (m32r_encode_section_info): Call init_idents. + Mon Mar 15 10:20:20 1999 Mark Mitchell * reload.c (find_reloads): Add a REG_LABEL note if we substitute a diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index 97c4bca72e8..4adf8eac922 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -190,6 +190,25 @@ init_reg_tables () } } +static tree interrupt_ident; +static tree model_ident; +static tree small_ident; +static tree medium_ident; +static tree large_ident; + +static void +init_idents () +{ + if (interrupt_ident == 0) + { + interrupt_ident = get_identifier ("interrupt"); + model_ident = get_identifier ("model"); + small_ident = get_identifier ("small"); + medium_ident = get_identifier ("medium"); + large_ident = get_identifier ("large"); + } +} + /* M32R specific attribute support. interrupt - for interrupt functions @@ -212,17 +231,7 @@ m32r_valid_machine_decl_attribute (type, attributes, identifier, args) tree identifier; tree args; { - static tree interrupt_ident, model_ident; - static tree small_ident, medium_ident, large_ident; - - if (interrupt_ident == 0) - { - interrupt_ident = get_identifier ("__interrupt__"); - model_ident = get_identifier ("__model__"); - small_ident = get_identifier ("__small__"); - medium_ident = get_identifier ("__medium__"); - large_ident = get_identifier ("__large__"); - } + init_idents (); if (identifier == interrupt_ident && list_length (args) == 0) @@ -371,11 +380,13 @@ m32r_encode_section_info (decl) { if (model) { - if (TREE_VALUE (TREE_VALUE (model)) == get_identifier ("__small__")) + init_idents (); + + if (TREE_VALUE (TREE_VALUE (model)) == small_ident) ; /* don't mark the symbol specially */ - else if (TREE_VALUE (TREE_VALUE (model)) == get_identifier ("__medium__")) + else if (TREE_VALUE (TREE_VALUE (model)) == medium_ident) prefix = MEDIUM_FLAG_CHAR; - else if (TREE_VALUE (TREE_VALUE (model)) == get_identifier ("__large__")) + else if (TREE_VALUE (TREE_VALUE (model)) == large_ident) prefix = LARGE_FLAG_CHAR; else abort (); /* shouldn't happen */ -- 2.30.2