[binutils-gdb] gas/d30v: make use of tc_symbol_chars[]
Jan Beulich
jbeulich@sourceware.org
Fri Dec 12 14:03:04 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=25ac69ecbd2e66be4e840b19f0de9c26040f4893
commit 25ac69ecbd2e66be4e840b19f0de9c26040f4893
Author: Jan Beulich <jbeulich@suse.com>
Date: Fri Dec 12 14:59:20 2025 +0100
gas/d30v: make use of tc_symbol_chars[]
... instead of having arch-specific code in app.c.
Diff:
---
gas/app.c | 4 ----
gas/config/tc-d30v.c | 2 ++
gas/config/tc-d30v.h | 3 +++
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/gas/app.c b/gas/app.c
index b9df9daba56..00ceab825b1 100644
--- a/gas/app.c
+++ b/gas/app.c
@@ -259,10 +259,6 @@ do_scrub_begin (int m68k_mri ATTRIBUTE_UNUSED)
#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
#ifdef H_TICK_HEX
if (enable_h_tick_hex)
diff --git a/gas/config/tc-d30v.c b/gas/config/tc-d30v.c
index bfa4adf9ce2..8ba3a260f05 100644
--- 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";
diff --git a/gas/config/tc-d30v.h b/gas/config/tc-d30v.h
index 198d9949d29..700a750fc18 100644
--- 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-cvs
mailing list