This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] macro hooks


   Date: Wed, 23 Feb 2000 19:16:45 -0500
   From: Timothy Wall <twall@domesolutions.com>

   What I want to do is replace "ABC" in the input stream with "DEF".  The input
   stream consists entirely of data within sbs.   In order to do a replacement, it
   makes sense to either 1) replace one sb with another or 2) change the contents of
   an sb.

   Ideally, this would be done at the preprocessor level; however, the substitutions
   to be done are based on the results of assembler directives.

We are talking at cross purposes, because I don't understand why what
you are saying is relevant to what I am saying.

I am saying: don't add a new field no_macro_check to the sb struct.
It seems clear to me that you do not need it.  I have not yet
understood an explanation why you do need it.  The fact that you are
replacing a line is irrelevant.  Macro expansions already replace
lines, so that is nothing new.

I must admit that I don't know why the input stream consists entirely
of data within sbs.  That is not true when reading from a file, and
don't you want to replace the string in that case?

Adding a pseudo-op to replace ABC in the input stream with DEF is OK
with me, provided it does not make gas any harder to maintain in the
normal case.  Note that this pseudo-op is not generally useful,
because people already can and do perform this operation using the C
preprocessor or m4.  I assume you want to introduce this pseudo-op to
retain compatibility with some existing assembler.

Ian

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]