summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2010-07-13 21:16:05 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2010-07-13 21:16:05 +0400
commitfed61a547f9c370223a6502200ff2c95373aa312 (patch)
tree2126314ebc60a3d81e3d6c5b39746abf6f3bcf32
parentdc2152ed0a3a889fff90a100f32522325c0dc369 (diff)
parent984279b1dde9db0cc8bb27d812cd3ad98ca34162 (diff)
downloadnasm-fed61a547f9c370223a6502200ff2c95373aa312.tar.gz
Merge branches 'master' and 'preproc-paste-fix'
-rw-r--r--preproc.c20
-rw-r--r--test/paste.asm12
-rw-r--r--version2
3 files changed, 16 insertions, 18 deletions
diff --git a/preproc.c b/preproc.c
index d54ee592..9d560b9d 100644
--- a/preproc.c
+++ b/preproc.c
@@ -3509,7 +3509,6 @@ static bool paste_tokens(Token **head, bool handle_paste_tokens)
}
break;
case TOK_ID:
- case TOK_PREPROC_ID:
case TOK_NUMBER:
case TOK_FLOAT:
{
@@ -3586,7 +3585,9 @@ static bool paste_tokens(Token **head, bool handle_paste_tokens)
}
/* else fall through */
default:
- tail = paste_head = &t->next;
+ tail = &t->next;
+ if (!tok_type_(t->next, TOK_WHITESPACE))
+ paste_head = tail;
break;
}
}
@@ -3820,21 +3821,6 @@ static Token *expand_mmac_params(Token * tline)
}
delete_Token(t);
changed = true;
- } else if (tline->type == TOK_PREPROC_ID &&
- tline->text[0] == '%' && tline->text[1] == '$') {
- /* expand local macro */
- t = tline;
- tline = tline->next;
- tt = tokenize(t->text);
- tt = expand_smacro(tt);
- *tail = tt;
- while (tt) {
- tt->a.mac = NULL;
- tail = &tt->next;
- tt = tt->next;
- }
- delete_Token(t);
- changed = true;
} else {
t = *tail = tline;
tline = tline->next;
diff --git a/test/paste.asm b/test/paste.asm
new file mode 100644
index 00000000..0bc48384
--- /dev/null
+++ b/test/paste.asm
@@ -0,0 +1,12 @@
+%macro bug 1-*
+ %push foo
+ %define %$v %1
+ %define vv %$v_ %+ %1
+ %%top_{%$v}%1:
+ mov eax, eax
+ mov eax, %%top_{%$v}%1
+ mov eax, vv
+ %pop
+%endmacro
+
+bug a
diff --git a/version b/version
index 45271734..c1c0b5a3 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-2.09rc2
+2.09rc3