This is the mail archive of the 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]
Other format: [Raw text]

macro behavior

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

(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

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