summaryrefslogtreecommitdiff
path: root/gcc/config/v850
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/v850')
-rw-r--r--gcc/config/v850/v850-protos.h1
-rw-r--r--gcc/config/v850/v850.c17
-rw-r--r--gcc/config/v850/v850.h9
3 files changed, 16 insertions, 11 deletions
diff --git a/gcc/config/v850/v850-protos.h b/gcc/config/v850/v850-protos.h
index a6fb8b92694..05b740adfd0 100644
--- a/gcc/config/v850/v850-protos.h
+++ b/gcc/config/v850/v850-protos.h
@@ -72,7 +72,6 @@ extern rtx v850_va_arg PARAMS ((tree, tree));
#endif /* TREE_CODE */
#ifdef TREE_CODE
-extern void v850_encode_data_area PARAMS ((tree));
extern int v850_interrupt_function_p PARAMS ((tree));
extern void v850_output_aligned_bss PARAMS ((FILE *, tree, const char *, int, int));
extern void v850_output_common PARAMS ((FILE *, tree, const char *, int, int));
diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c
index 72129d3868d..df4d0031765 100644
--- a/gcc/config/v850/v850.c
+++ b/gcc/config/v850/v850.c
@@ -59,6 +59,8 @@ static tree v850_handle_interrupt_attribute PARAMS ((tree *, tree, tree, int, bo
static tree v850_handle_data_area_attribute PARAMS ((tree *, tree, tree, int, bool *));
static void v850_insert_attributes PARAMS ((tree, tree *));
static void v850_select_section PARAMS ((tree, int, unsigned HOST_WIDE_INT));
+static void v850_encode_data_area PARAMS ((tree));
+static void v850_encode_section_info PARAMS ((tree, int));
/* True if the current function has anonymous arguments. */
int current_function_anonymous_args;
@@ -100,6 +102,9 @@ static int v850_interrupt_p = FALSE;
#undef TARGET_ASM_SELECT_SECTION
#define TARGET_ASM_SELECT_SECTION v850_select_section
+#undef TARGET_ENCODE_SECTION_INFO
+#define TARGET_ENCODE_SECTION_INFO v850_encode_section_info
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* Sometimes certain combinations of command options do not make
@@ -2142,7 +2147,7 @@ v850_interrupt_function_p (func)
}
-void
+static void
v850_encode_data_area (decl)
tree decl;
{
@@ -2203,6 +2208,16 @@ v850_encode_data_area (decl)
XSTR (XEXP (DECL_RTL (decl), 0), 0) = ggc_alloc_string (newstr, len + 2);
}
+static void
+v850_encode_section_info (decl, first)
+ tree decl;
+ int first;
+{
+ if (first && TREE_CODE (decl) == VAR_DECL
+ && (TREE_STATIC (decl) || DECL_EXTERNAL (decl)))
+ v850_encode_data_area (decl);
+}
+
/* Return true if the given RTX is a register which can be restored
by a function epilogue. */
int
diff --git a/gcc/config/v850/v850.h b/gcc/config/v850/v850.h
index e20e05659f8..54a1bec6324 100644
--- a/gcc/config/v850/v850.h
+++ b/gcc/config/v850/v850.h
@@ -1414,15 +1414,6 @@ extern union tree_node * GHS_current_section_names [(int) COUNT_OF_GHS_SECTION_K
#define EP_REGNUM 30 /* ep register number */
-#define ENCODE_SECTION_INFO(DECL, FIRST) \
- do \
- { \
- if ((FIRST) && TREE_CODE (DECL) == VAR_DECL \
- && (TREE_STATIC (DECL) || DECL_EXTERNAL (DECL))) \
- v850_encode_data_area (DECL); \
- } \
- while (0)
-
#define ZDA_NAME_FLAG_CHAR '@'
#define TDA_NAME_FLAG_CHAR '%'
#define SDA_NAME_FLAG_CHAR '&'