public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Binutils <binutils@sourceware.org>
Subject: [PATCH 2/4] gas: isolate macro_strip_at to macro.c
Date: Wed, 8 Mar 2023 17:08:17 +0100	[thread overview]
Message-ID: <e7780d8a-ad1c-a738-a7f5-f5b70c46c6fe@suse.com> (raw)
In-Reply-To: <bdf364c0-c333-095b-47e0-24948906071e@suse.com>

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.

--- a/gas/as.c
+++ b/gas/as.c
@@ -1307,11 +1307,7 @@ gas_init (void)
   input_scrub_begin ();
   expr_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 ();
 
--- 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
--- 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);


  parent reply	other threads:[~2023-03-08 16:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08 16:05 [PATCH 0/4] gas: tidy macro interfacing after removal of gasp Jan Beulich
2023-03-08 16:07 ` [PATCH 1/4] gas: drop function pointer parameter from macro_init() Jan Beulich
2023-03-08 16:08 ` Jan Beulich [this message]
2023-03-08 16:08 ` [PATCH 3/4] gas: use flag_mri directly in macro processing Jan Beulich
2023-03-08 16:09 ` [PATCH 4/4] gas: expose flag_macro_alternate globally Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e7780d8a-ad1c-a738-a7f5-f5b70c46c6fe@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).