aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/m32r
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-07-31 15:55:16 +0000
committerNick Clifton <nickc@gcc.gnu.org>2015-07-31 15:55:16 +0000
commitc0a5daa4018308b0a7fa2e96bfc0abf031c506e9 (patch)
treedf78817359b7beb3ba0c91af0cd012fb8ceea65a /gcc/config/m32r
parent9b015c36906089cfbea506d45995350b718bee4a (diff)
downloadgcc-c0a5daa4018308b0a7fa2e96bfc0abf031c506e9.zip
gcc-c0a5daa4018308b0a7fa2e96bfc0abf031c506e9.tar.gz
gcc-c0a5daa4018308b0a7fa2e96bfc0abf031c506e9.tar.bz2
m32r.c (m32r_attribute_identifier): New function.
* config/m32r/m32r.c (m32r_attribute_identifier): New function. Returns true for __model__. (TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P): Define. From-SVN: r226445
Diffstat (limited to 'gcc/config/m32r')
-rw-r--r--gcc/config/m32r/m32r.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index d126d2f..341f24a 100644
--- a/gcc/config/m32r/m32r.c
+++ b/gcc/config/m32r/m32r.c
@@ -113,6 +113,7 @@ static bool m32r_can_eliminate (const int, const int);
static void m32r_conditional_register_usage (void);
static void m32r_trampoline_init (rtx, tree, rtx);
static bool m32r_legitimate_constant_p (machine_mode, rtx);
+static bool m32r_attribute_identifier (const_tree);
/* M32R specific attributes. */
@@ -129,6 +130,8 @@ static const struct attribute_spec m32r_attribute_table[] =
/* Initialize the GCC target structure. */
#undef TARGET_ATTRIBUTE_TABLE
#define TARGET_ATTRIBUTE_TABLE m32r_attribute_table
+#undef TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P
+#define TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P m32r_attribute_identifier
#undef TARGET_LEGITIMATE_ADDRESS_P
#define TARGET_LEGITIMATE_ADDRESS_P m32r_legitimate_address_p
@@ -404,6 +407,13 @@ m32r_handle_model_attribute (tree *node ATTRIBUTE_UNUSED, tree name,
return NULL_TREE;
}
+
+static bool
+m32r_attribute_identifier (const_tree name)
+{
+ return strcmp (IDENTIFIER_POINTER (name), "model") == 0
+ || strcmp (IDENTIFIER_POINTER (name), "__model__") == 0;
+}
/* Encode section information of DECL, which is either a VAR_DECL,
FUNCTION_DECL, STRING_CST, CONSTRUCTOR, or ???.