macro's and local variables
Mischa Baars
mjbaars1977@gmail.com
Wed Oct 17 11:06:00 GMT 2012
On 10/17/2012 08:52 AM, Jan Beulich wrote:
>>>> On 17.10.12 at 00:55, Ian Lance Taylor <iant@google.com> wrote:
>> On Tue, Oct 16, 2012 at 11:37 AM, Mischa Baars <mjbaars1977@gmail.com> wrote:
>>> However, I do not understand. Do you have an example?
>> .intel_syntax noprefix
>> .global function
>> .code64
>> .macro A arg1
>> .set i\@, 0
>> .rept \arg1
>> mov ax, i\@
>> .set i\@, i\@ + 1
>> .endr
>> .endm
>>
>> .macro C
>> .set i\@, 0
>> .rept 4
>> A i\@
>> .set i\@, i\@ + 1
>> .endr
>> .endm
>> function:
>> C
>> ret
> Another option here is to use "local" (requiring .altmacro to be
> in effect).
>
> Jan
>
Hi Jan,
Again, could you be more specific. Perhaps you could rewrite
'function.S' to demonstrate?
Regards,
Mischa.
More information about the Binutils
mailing list