aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/m32r
diff options
context:
space:
mode:
authorNick Clifton <nickc@cygnus.com>1999-03-15 12:49:36 +0000
committerNick Clifton <nickc@gcc.gnu.org>1999-03-15 12:49:36 +0000
commitdd5351428305e43d9d78449f978483dd58943d87 (patch)
tree86c70dc8721623a5a739f327021f730f554c8e54 /gcc/config/m32r
parente54db24f7355b816f4087b083deb79a2bd76d8dc (diff)
downloadgcc-dd5351428305e43d9d78449f978483dd58943d87.zip
gcc-dd5351428305e43d9d78449f978483dd58943d87.tar.gz
gcc-dd5351428305e43d9d78449f978483dd58943d87.tar.bz2
Remove leading and trailing double underscores from m32r specific attribute
names in order to match the documentation. From-SVN: r25780
Diffstat (limited to 'gcc/config/m32r')
-rw-r--r--gcc/config/m32r/m32r.c39
1 files changed, 25 insertions, 14 deletions
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index 97c4bca..4adf8ea 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 */