This is the mail archive of the
mailing list for the binutils project.
Re: macro's and local variables
On 10/16/2012 08:20 PM, Ian Lance Taylor wrote:
On Tue, Oct 16, 2012 at 11:12 AM, Mischa Baars <firstname.lastname@example.org> wrote:
So macro B is the only correct macro, as I understand.
Yes. That is how assembler macros work.
Also one uses i and the other uses j, and that matters because
you are invoking them in a loop that also uses i.
This is exactly what I'm pointing at. Apart from the register naming, I was
expecting the same values to be assigned to the respective registers. This
does not happen, because 'i' is not a local but a global value.
I found the link:
Assembler macros are not a high level programming language. They are
macros: bodies of text that are expanded with argument values
substituted in textually. You may want to read about how \@ is
expanded in a macro body.
However, I do not understand. Do you have an example?