aboutsummaryrefslogtreecommitdiff
path: root/gas/macro.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-06-12 10:35:24 +0000
committerNick Clifton <nickc@redhat.com>2001-06-12 10:35:24 +0000
commite1f44d1052d735fa63401ab4dc7f3cb1070f8223 (patch)
treedf7feda7179eca662fd1600cc4d11d64b6ca9b63 /gas/macro.c
parent3971ce954fddbcb8154267ebc18a34c5967ff17b (diff)
downloadgdb-e1f44d1052d735fa63401ab4dc7f3cb1070f8223.zip
gdb-e1f44d1052d735fa63401ab4dc7f3cb1070f8223.tar.gz
gdb-e1f44d1052d735fa63401ab4dc7f3cb1070f8223.tar.bz2
Fix m68k/mri mode problems.
Diffstat (limited to 'gas/macro.c')
-rw-r--r--gas/macro.c38
1 files changed, 23 insertions, 15 deletions
diff --git a/gas/macro.c b/gas/macro.c
index 8512208..e93cdce 100644
--- a/gas/macro.c
+++ b/gas/macro.c
@@ -935,21 +935,29 @@ macro_expand (idx, in, m, out, comment_char)
/* The macro may be called with an optional qualifier, which may
be referred to in the macro body as \0. */
if (idx < in->len && in->ptr[idx] == '.')
- {
- formal_entry *n;
-
- n = (formal_entry *) xmalloc (sizeof (formal_entry));
- sb_new (&n->name);
- sb_new (&n->def);
- sb_new (&n->actual);
- n->index = QUAL_INDEX;
-
- n->next = m->formals;
- m->formals = n;
-
- idx = get_any_string (idx + 1, in, &n->actual, 1, 0);
- }
- }
+ {
+ /* The Microtec assembler ignores this if followed by a white space.
+ (Macro invocation with empty extension) */
+ idx++;
+ if ( idx < in->len
+ && in->ptr[idx] != ' '
+ && in->ptr[idx] != '\t')
+ {
+ formal_entry *n;
+
+ n = (formal_entry *) xmalloc (sizeof (formal_entry));
+ sb_new (&n->name);
+ sb_new (&n->def);
+ sb_new (&n->actual);
+ n->index = QUAL_INDEX;
+
+ n->next = m->formals;
+ m->formals = n;
+
+ idx = get_any_string (idx, in, &n->actual, 1, 0);
+ }
+ }
+ }
/* Peel off the actuals and store them away in the hash tables' actuals. */
idx = sb_skip_white (idx, in);