[binutils-gdb] gas: don't open-code LEX_*NAME
Jan Beulich
jbeulich@sourceware.org
Fri Aug 16 06:35:31 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=50e19e6e6c4254cb12011afe1522ed9b1e98931d
commit 50e19e6e6c4254cb12011afe1522ed9b1e98931d
Author: Jan Beulich <jbeulich@suse.com>
Date: Fri Aug 16 08:35:16 2024 +0200
gas: don't open-code LEX_*NAME
... except in read.c's definition of lex_type[], where readbility would
otherwise suffer.
Diff:
---
gas/config/tc-bfin.h | 2 +-
gas/config/tc-dlx.h | 2 +-
gas/config/tc-msp430.h | 2 +-
gas/config/tc-ppc.h | 2 +-
gas/config/te-interix.h | 4 ++--
gas/read.c | 3 ++-
6 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/gas/config/tc-bfin.h b/gas/config/tc-bfin.h
index 94b146edbab..5567c97a6ae 100644
--- a/gas/config/tc-bfin.h
+++ b/gas/config/tc-bfin.h
@@ -44,7 +44,7 @@ extern bool bfin_start_label (char *);
#define md_convert_frag(b,s,f) as_fatal ("bfin convert_frag\n");
/* Allow for [, ], etc. */
-#define LEX_BR 6
+#define LEX_BR (LEX_BEGIN_NAME | LEX_END_NAME)
#define TC_EOL_IN_INSN(PTR) (bfin_eol_in_insn(PTR) ? 1 : 0)
extern bool bfin_eol_in_insn (char *);
diff --git a/gas/config/tc-dlx.h b/gas/config/tc-dlx.h
index c5e8545fdea..4c52593f217 100644
--- a/gas/config/tc-dlx.h
+++ b/gas/config/tc-dlx.h
@@ -29,7 +29,7 @@
#define WORKING_DOT_WORD
-#define LEX_DOLLAR 1
+#define LEX_DOLLAR LEX_NAME
#include "bit_fix.h"
diff --git a/gas/config/tc-msp430.h b/gas/config/tc-msp430.h
index 0c2565e5cf6..f28dcb72bf8 100644
--- a/gas/config/tc-msp430.h
+++ b/gas/config/tc-msp430.h
@@ -99,7 +99,7 @@
/* Support symbols like: C$$IO$$. */
#undef LEX_DOLLAR
-#define LEX_DOLLAR 1
+#define LEX_DOLLAR LEX_NAME
#define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) (P2VAR) = 0
/* An `.lcomm' directive with no explicit alignment parameter will
diff --git a/gas/config/tc-ppc.h b/gas/config/tc-ppc.h
index a65d1e30ecf..ddc018c5056 100644
--- a/gas/config/tc-ppc.h
+++ b/gas/config/tc-ppc.h
@@ -149,7 +149,7 @@ struct ppc_tc_sy
#define OBJ_COFF_MAX_AUXENTRIES 4
/* Square and curly brackets are permitted in symbol names. */
-#define LEX_BR 3
+#define LEX_BR (LEX_BEGIN_NAME | LEX_NAME)
/* Canonicalize the symbol name. */
#define tc_canonicalize_symbol_name(name) ppc_canonicalize_symbol_name (name)
diff --git a/gas/config/te-interix.h b/gas/config/te-interix.h
index a1f1c5311b6..00290d3459c 100644
--- a/gas/config/te-interix.h
+++ b/gas/config/te-interix.h
@@ -19,8 +19,8 @@
#define TE_PE_DYN /* PE with dynamic linking (UNIX shared lib) support */
#define TE_PE
-#define LEX_AT 1 /* can have @'s inside labels */
-#define LEX_QM 3 /* can have ?'s in or begin labels */
+#define LEX_AT LEX_NAME /* can have @'s inside labels */
+#define LEX_QM (LEX_BEGIN_NAME | LEX_NAME) /* can have ?'s in or begin labels */
/* The PE format supports long section names. */
#define COFF_LONG_SECTION_NAMES
diff --git a/gas/read.c b/gas/read.c
index ba31f8de53e..3734b2b0ca8 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -285,7 +285,8 @@ read_begin (void)
/* Use more. FIXME-SOMEDAY. */
if (flag_mri)
- lex_type['?'] = 3;
+ lex_type['?'] = LEX_BEGIN_NAME | LEX_NAME;
+
stabs_begin ();
#ifndef WORKING_DOT_WORD
More information about the Binutils-cvs
mailing list