[PATCH] gas/d30v: make use of tc_symbol_chars[]

Jan Beulich jbeulich@suse.com
Fri Dec 5 09:07:48 GMT 2025


... instead of having arch-specific code in app.c.
---
Given the comment, it's not clear to me why '<' and '>' wouldn't also
need including.

--- a/gas/app.c
+++ b/gas/app.c
@@ -259,10 +259,6 @@ do_scrub_begin (int m68k_mri ATTRIBUTE_U
 #ifdef DOUBLEBAR_PARALLEL
   lex['|'] = LEX_IS_DOUBLEBAR_1ST;
 #endif
-#ifdef TC_D30V
-  /* Must do this is we want VLIW instruction with "->" or "<-".  */
-  lex['-'] = LEX_IS_SYMBOL_COMPONENT;
-#endif
 
   /* If not otherwise used (which it shouldn't be - see write.h), mark the
      fake label character as a possible part of symbol names.  */
--- a/gas/config/tc-d30v.c
+++ b/gas/config/tc-d30v.c
@@ -27,6 +27,8 @@
 const char comment_chars[]        = ";";
 const char line_comment_chars[]   = "#";
 const char line_separator_chars[] = "";
+/* Must do this if we want VLIW instruction with "->" or "<-".  */
+const char d30v_symbol_chars[]    = "-";
 const char md_shortopts[]         = "OnNcC";
 const char EXP_CHARS[]            = "eE";
 const char FLT_CHARS[]            = "dD";
--- a/gas/config/tc-d30v.h
+++ b/gas/config/tc-d30v.h
@@ -40,6 +40,9 @@
 /* We don't need to handle .word strangely.  */
 #define WORKING_DOT_WORD
 
+extern const char d30v_symbol_chars[];
+#define tc_symbol_chars d30v_symbol_chars
+
 #define md_number_to_chars           number_to_chars_bigendian
 
 int d30v_cleanup (int);


More information about the Binutils mailing list