+2015-07-31 Nick Clifton <nickc@redhat.com>
+
+ * config/m32r/m32r.c (m32r_attribute_identifier): New function.
+ Returns true for __model__.
+ (TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P): Define.
+
2015-07-31 Alan Modra <amodra@gmail.com>
PR target/66870
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);
\f
/* M32R specific attributes. */
/* 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
return NULL_TREE;
}
+
+static bool
+m32r_attribute_identifier (const_tree name)
+{
+ return strcmp (IDENTIFIER_POINTER (name), "model") == 0
+ || strcmp (IDENTIFIER_POINTER (name), "__model__") == 0;
+}
\f
/* Encode section information of DECL, which is either a VAR_DECL,
FUNCTION_DECL, STRING_CST, CONSTRUCTOR, or ???.