[binutils-gdb] gas: isolate macro_strip_at to macro.c

Jan Beulich jbeulich@sourceware.org
Fri Mar 17 09:07:28 GMT 2023


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6786a0211c9d3c005cd25893ede37e986b69cb49

commit 6786a0211c9d3c005cd25893ede37e986b69cb49
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Mar 17 10:05:32 2023 +0100

    gas: isolate macro_strip_at to macro.c
    
    This removes a leftover from i960 support; with that nothing is left
    which would set macro_strip_at to non-zero, so the variable is converted
    to a #define (retaining the logic in case a new user would appear) and
    macro_init()'s respective parameter is dropped.

Diff:
---
 gas/as.c    | 6 +-----
 gas/macro.c | 5 ++---
 gas/macro.h | 2 +-
 3 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/gas/as.c b/gas/as.c
index 57641802d72..357c13bf27a 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -1310,11 +1310,7 @@ gas_init (void)
   expr_begin ();
   eh_begin ();
 
-  int macro_strip_at = 0;
-#ifdef TC_I960
-  macro_strip_at = flag_mri;
-#endif
-  macro_init (flag_macro_alternate, flag_mri, macro_strip_at);
+  macro_init (flag_macro_alternate, flag_mri);
 
   dwarf2_init ();
 
diff --git a/gas/macro.c b/gas/macro.c
index fec806d91ea..25ce962a2f2 100644
--- a/gas/macro.c
+++ b/gas/macro.c
@@ -60,7 +60,7 @@ static int macro_mri;
 
 /* Whether we should strip '@' characters.  */
 
-static int macro_strip_at;
+#define macro_strip_at false
 
 /* Number of macro expansions that have been done.  */
 
@@ -78,14 +78,13 @@ macro_del_f (void *ent)
 /* Initialize macro processing.  */
 
 void
-macro_init (int alternate, int mri, int strip_at)
+macro_init (int alternate, int mri)
 {
   macro_hash = htab_create_alloc (16, hash_string_tuple, eq_string_tuple,
 				  macro_del_f, notes_calloc, NULL);
   macro_defined = 0;
   macro_alternate = alternate;
   macro_mri = mri;
-  macro_strip_at = strip_at;
 }
 
 void
diff --git a/gas/macro.h b/gas/macro.h
index e879b08007c..7354826f53c 100644
--- a/gas/macro.h
+++ b/gas/macro.h
@@ -83,7 +83,7 @@ extern htab_t macro_hash;
 
 extern int buffer_and_nest (const char *, const char *, sb *,
 			    size_t (*) (sb *));
-extern void macro_init (int, int, int);
+extern void macro_init (int, int);
 extern void macro_end (void);
 extern void macro_set_alternate (int);
 extern void macro_mri_mode (int);


More information about the Binutils-cvs mailing list