public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: <binutils@sources.redhat.com>
Subject: macro behavior
Date: Thu, 14 Apr 2005 14:43:00 -0000	[thread overview]
Message-ID: <s25e8f7d.048@emea1-mh.id2.novell.com> (raw)

I'm having two issue with dealing with macro parameters:

(1) If I want to append a constant suffix to the expanded string, I see no way to do so in default mode; in .altmacro mode I am able to do so using the & macro operator:

	.macro m sym
	.equiv &sym&_, 1
	.endm

(the leading & is not even necessary in this mode, but to make the intentions clearer I added it). Any suggestions?

(2) In alternate mode, when using nested macros and/or repeat constructs (.irp, .irpc), each nesting level requires the number of &-s to be tripled; in default mode they just need to be doubled, and that's what I would have expected in alternate mode, too. Is this intentional? If not, are there any objections to fix this?
Comparing this with MASM (x86) behavior (which seems to be an assembler natively using these & macro operators), even that is too much * it just requires one additional & for each level, and permits using up as many as the deepest nested variable would require on variables from any level (thus allowing to leave the body of such a construct untouched when rearranging the nesting sequence).

Thanks, Jan

             reply	other threads:[~2005-04-14 14:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-14 14:43 Jan Beulich [this message]
2005-04-14 17:25 ` Zack Weinberg
2005-04-15  2:49 ` Erik Christiansen
2005-04-15  6:42 Jan Beulich
     [not found] <s25f7070.029@emea1-mh.id2.novell.com>
2005-04-15  8:32 ` Erik Christiansen
2005-04-20  9:20 Jan Beulich
2005-04-20  9:34 ` Hans-Peter Nilsson

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=s25e8f7d.048@emea1-mh.id2.novell.com \
    --to=jbeulich@novell.com \
    --cc=binutils@sources.redhat.com \
    /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).