mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-12-15 09:09:58 +08:00
4b58ec1b8f
1. %xdefine was broken because the code used i as a loop, which is a standard use for the name i. To avoid that confusion in the future, use "op" rather than "i" to hold the directive constant. 2. Once (1) was fixed, the smacro expansion code would fail because of parameter token numbers being indistinguishable between the ongoing expansion and the %xdefine parameters. In a first pass, mark the parameters with a new TOK_XDEF_PARAM token number, and change them to proper parameter token numbers in a second pass, which is now moved into define_smacro() which is where it arguably belongs. 3. Add a few tests for token pasting and xdefine with and without parameters. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
7 lines
118 B
NASM
7 lines
118 B
NASM
%iassign OWORD_size 16 ; octo-word
|
|
%idefine sizeof(_x_) _x_%+_size
|
|
|
|
%define ptr eax+sizeof(oword)
|
|
|
|
movdqa [ptr], xmm1
|