aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDhananjay R. Deshpande <dhananjayd@kpit.com>2002-06-20 02:43:13 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2002-06-20 02:43:13 +0000
commit2c1d2fcb8fb5afdc43c9465c30eb846b43d87786 (patch)
tree751dd07be846e3d928e3b34729d9d45d69d06858
parent84d901be21286abad53306a8e883571ca9258676 (diff)
downloadgcc-2c1d2fcb8fb5afdc43c9465c30eb846b43d87786.zip
gcc-2c1d2fcb8fb5afdc43c9465c30eb846b43d87786.tar.gz
gcc-2c1d2fcb8fb5afdc43c9465c30eb846b43d87786.tar.bz2
h8300.c (TARGET_INSERT_ATTRIBUTES): Define.
* config/h8300/h8300.c (TARGET_INSERT_ATTRIBUTES): Define. (h8300_insert_attributes): New. From-SVN: r54814
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/h8300/h8300.c20
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e4af10f..24c7826 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2002-06-19 Dhananjay R. Deshpande <dhananjayd@kpit.com>
+
+ * config/h8300/h8300.c (TARGET_INSERT_ATTRIBUTES): Define.
+ (h8300_insert_attributes): New.
+
2002-06-19 Akim Demaille <akim@epita.fr>
* c-parse.in (initelt: identifier ':' initval): Add an empty
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index 89918ab..5406c19 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -61,6 +61,7 @@ static tree h8300_handle_eightbit_data_attribute PARAMS ((tree *, tree, tree, in
static tree h8300_handle_tiny_data_attribute PARAMS ((tree *, tree, tree, int, bool *));
static void h8300_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
static void h8300_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
+static void h8300_insert_attributes PARAMS ((tree, tree *));
#ifndef OBJECT_FORMAT_ELF
static void h8300_asm_named_section PARAMS ((const char *, unsigned int));
#endif
@@ -119,6 +120,9 @@ const char *h8_push_op, *h8_pop_op, *h8_mov_op;
#undef TARGET_STRIP_NAME_ENCODING
#define TARGET_STRIP_NAME_ENCODING h8300_strip_name_encoding
+#undef TARGET_INSERT_ATTRIBUTES
+#define TARGET_INSERT_ATTRIBUTES h8300_insert_attributes
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* Initialize various cpu specific globals at start up. */
@@ -3409,6 +3413,22 @@ h8300_tiny_data_p (decl)
return a != NULL_TREE;
}
+/* Generate an 'interrupt_handler' attribute for decls. */
+
+static void
+h8300_insert_attributes (node, attributes)
+ tree node;
+ tree *attributes;
+{
+ if (!interrupt_handler
+ || TREE_CODE (node) != FUNCTION_DECL)
+ return;
+
+ /* Add an 'interrupt_handler' attribute. */
+ *attributes = tree_cons (get_identifier ("interrupt_handler"),
+ NULL, *attributes);
+}
+
/* Supported attributes:
interrupt_handler: output a prologue and epilogue suitable for an