* Incomplete .macro documentation?
@ 2003-07-15 12:51 Jan Zizka
2003-07-16 6:26 ` Ben Elliston
[not found] ` <m3brvtjje0.fsf@redhat.com>
0 siblings, 2 replies; 3+ messages in thread
From: Jan Zizka @ 2003-07-15 12:51 UTC (permalink / raw)
To: binutils
Hi,
if I define macro as follows:
.macro TEST n
.equ REG\n_TEST,0
.equ REG\n_TEST,1
.endm
then 'TEST 1' will not produce what I've desired, because expansion can't that
simply handle arguments which are in the middle of statement. So after some
struggle I have found in the macro.c that it has to be done as follows:
.macro TEST n
.equ REG\n\(_)TEST,0
.equ REG\n\(_)TEST,1
.endm
This I take is a feature of macros, but I didn't find anything about this in
binutils manual (e.i. http://sources.redhat.com/binutils/docs-2.12/as.info/Macro.html)
Or is it described anywhere? If not I think that it should be added :)) OK I
can add it if anybody will point me to correct place ;)
Jan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Incomplete .macro documentation?
2003-07-15 12:51 Incomplete .macro documentation? Jan Zizka
@ 2003-07-16 6:26 ` Ben Elliston
[not found] ` <m3brvtjje0.fsf@redhat.com>
1 sibling, 0 replies; 3+ messages in thread
From: Ben Elliston @ 2003-07-16 6:26 UTC (permalink / raw)
To: binutils
Jan Zizka <ziza@klubicko.net> writes:
> This I take is a feature of macros, but I didn't find anything about
> this in binutils manual
> (e.i. http://sources.redhat.com/binutils/docs-2.12/as.info/Macro.html)
> Or is it described anywhere? If not I think that it should be added
> :)) OK I can add it if anybody will point me to correct place ;)
If you'd like to try to enhance the documentation, take a look in
as.texinfo under the node `Macro'.
Ben
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Incomplete .macro documentation?
[not found] ` <m3brvtjje0.fsf@redhat.com>
@ 2003-07-17 17:30 ` Jan Zizka
0 siblings, 0 replies; 3+ messages in thread
From: Jan Zizka @ 2003-07-17 17:30 UTC (permalink / raw)
To: Nick Clifton; +Cc: binutils
Hi Nick,
> It is not clear exactly what you want this macro to expand to. Are
> you expecting 'TEST 1' to produce:
>
> .equ REG1_TEST,0
> .equ REG1_TEST,1
>
> If so, then why have two .equ directives when the second one will
> override the first ?
>
that is what I wanted, but the second .equ was supposed to be different :)
(just a copy-pase error ")
> > This I take is a feature of macros, but I didn't find anything about
> > this in binutils manual.
>
> You are correct, this feature is not documented. (And it should be).
>
> > If not I think that it should be added :)) OK I can add it if
> > anybody will point me to correct place ;)
>
> Please add it to gas/doc/as.texinfo in the node that describes the
> .macro command.
>
I'll add that and I'll also check macro.c for other undocumented
features :).
Jan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-07-17 17:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-15 12:51 Incomplete .macro documentation? Jan Zizka
2003-07-16 6:26 ` Ben Elliston
[not found] ` <m3brvtjje0.fsf@redhat.com>
2003-07-17 17:30 ` Jan Zizka
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).