From 2c1d2fcb8fb5afdc43c9465c30eb846b43d87786 Mon Sep 17 00:00:00 2001 From: "Dhananjay R. Deshpande" Date: Thu, 20 Jun 2002 02:43:13 +0000 Subject: [PATCH] h8300.c (TARGET_INSERT_ATTRIBUTES): Define. * config/h8300/h8300.c (TARGET_INSERT_ATTRIBUTES): Define. (h8300_insert_attributes): New. From-SVN: r54814 --- gcc/ChangeLog | 5 +++++ gcc/config/h8300/h8300.c | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e4af10f33e9..24c7826e32f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-06-19 Dhananjay R. Deshpande + + * config/h8300/h8300.c (TARGET_INSERT_ATTRIBUTES): Define. + (h8300_insert_attributes): New. + 2002-06-19 Akim Demaille * c-parse.in (initelt: identifier ':' initval): Add an empty diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 89918ab7c97..5406c19ab94 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 -- 2.30.2