From 50e19e6e6c4254cb12011afe1522ed9b1e98931d Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 16 Aug 2024 08:35:16 +0200 Subject: gas: don't open-code LEX_*NAME ... except in read.c's definition of lex_type[], where readbility would otherwise suffer. --- 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 94b146e..5567c97 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 c5e8545..4c52593 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 0c2565e..f28dcb7 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 a65d1e3..ddc018c 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 a1f1c53..00290d3 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 ba31f8d..3734b2b 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 -- cgit v1.1