This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
[patch] gas/gasp.c
- To: binutils at sourceware dot cygnus dot com
- Subject: [patch] gas/gasp.c
- From: Geoff Berry <geoffb at bops dot com>
- Date: Wed, 26 Apr 2000 20:06:45 -0400
This patch makes gasp print labels before expanding macros if a label
appears before the macro call. Here's an example:
Before
.MACRO foo X
\X
.ENDM
test: foo 123
produced
123
after applying the patch it produces
test: 123
which I think is the desirable behavior.
2000-04-26 Geoff Berry <geoffb@bops.com>
* gasp.c (process_file): Print label even if processing a macro.
*** gasp.c Tue Apr 07 19:47:32 1998
--- gasp.c~ Wed Apr 26 23:41:43 2000
***************
***************
*** 1969,1974 ****
--- 1999,2009 ----
}
else if (condass_on ())
{
+ if (label.len)
+ {
+ fprintf (outfile, "%s:", sb_name (&label));
+ }
+
if (macro_op (l, &line))
{
***************
*** 1977,1988 ****
else
{
{
! if (label.len)
! {
! fprintf (outfile, "%s:\t", sb_name (&label));
! }
! else
! fprintf (outfile, "\t");
sb_reset(&t1);
process_assigns (l, &line, &t1);
sb_reset (&t2);
--- 2012,2018 ----
else
{
{
! fprintf (outfile, "\t");
sb_reset(&t1);
process_assigns (l, &line, &t1);
sb_reset (&t2);