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));
+static const char *v850_strip_name_encoding PARAMS ((const char *));
/* True if the current function has anonymous arguments. */
int current_function_anonymous_args;
#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
+#undef TARGET_STRIP_NAME_ENCODING
+#define TARGET_STRIP_NAME_ENCODING v850_strip_name_encoding
+
struct gcc_target targetm = TARGET_INITIALIZER;
\f
/* Sometimes certain combinations of command options do not make
}
\f
-void
+static void
v850_encode_data_area (decl)
tree 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);
+}
+
+static const char *
+v850_strip_name_encoding (str)
+ const char *str;
+{
+ return str + (ENCODED_NAME_P (str) || *str == '*');
+}
+
/* Return true if the given RTX is a register which can be restored
by a function epilogue. */
int
default:
if (is_const)
- const_section ();
+ readonly_data_section ();
else
data_section ();
break;
else if (TREE_CODE (exp) == STRING_CST)
{
if (! flag_writable_strings)
- const_section ();
+ readonly_data_section ();
else
data_section ();
}
else
- const_section ();
+ readonly_data_section ();
}