From 0e470c55e8f94578da761b5c08201b8bb2914902 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 7 Nov 2005 01:47:54 +0000 Subject: [PATCH] * macro.c (buffer_and_nest): Skip labels regardless of NO_PSEUDO_DOT and flag_m68k_mri. --- gas/ChangeLog | 15 +++++++---- gas/macro.c | 69 ++++++++++++++++++++++++--------------------------- 2 files changed, 43 insertions(+), 41 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 5e503fefd10..5a71bae4848 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,8 +1,13 @@ +2005-11-07 Alan Modra + + * macro.c (buffer_and_nest): Skip labels regardless of + NO_PSEUDO_DOT and flag_m68k_mri. + 2005-11-07 Arnold Metselaar * expr.c (integer_constant): Match only 'B' as binary suffix if - NUMBERS_WITH_SUFFIX and LOCAL_LABELS_FB. Allow both 'b' and 'B' - otherwise. + NUMBERS_WITH_SUFFIX and LOCAL_LABELS_FB. Allow both 'b' and 'B' + otherwise. 2005-11-04 Alexandre Oliva @@ -65,7 +70,7 @@ * config/tc-m32c.c (md_relax_table, subtype_mappings, md_convert_frag): Add jsr.w support. - + * config/tc-m32c.c (md_assemble): Don't use errmsg as the format itself. (md_cgen_lookup_reloc): Add m32c bitbase operands. Add 8-s24 @@ -93,7 +98,7 @@ * Makefile.am: Add Z80 cpu. * Makefile.in: Regenerated. - * app.c (do_scrub_chars): Correctly scrub "ex af,af'" + * app.c (do_scrub_chars): Correctly scrub "ex af,af'" and disallow newlines in quoted strings. * configure.tgt: Add z80-*-coff. * config/obj-coff.h: Add format "coff-z80". @@ -356,7 +361,7 @@ * doc/c-arm.texi: Document .cpu, .arch, .fpu and .eabi_attribute. 2005-10-06 Khem Raj - NIIBE Yutaka + NIIBE Yutaka * config/tc-sh.c (allow_dollar_register_prefix): New variable. (parse_reg_without_prefix): New function. diff --git a/gas/macro.c b/gas/macro.c index eab3e66bbe6..23156a1242a 100644 --- a/gas/macro.c +++ b/gas/macro.c @@ -180,49 +180,46 @@ buffer_and_nest (const char *from, const char *to, sb *ptr, while (more) { - /* Try and find the first pseudo op on the line. */ + /* Try to find the first pseudo op on the line. */ int i = line_start; - if (! NO_PSEUDO_DOT && ! flag_m68k_mri) - { - /* With normal syntax we can suck what we want till we get - to the dot. With the alternate, labels have to start in - the first column, since we can't tell what's a label and - whats a pseudoop. */ + /* With normal syntax we can suck what we want till we get + to the dot. With the alternate, labels have to start in + the first column, since we can't tell what's a label and + what's a pseudoop. */ - if (! LABELS_WITHOUT_COLONS) - { - /* Skip leading whitespace. */ - while (i < ptr->len && ISWHITE (ptr->ptr[i])) - i++; - } + if (! LABELS_WITHOUT_COLONS) + { + /* Skip leading whitespace. */ + while (i < ptr->len && ISWHITE (ptr->ptr[i])) + i++; + } - for (;;) + for (;;) + { + /* Skip over a label, if any. */ + if (i >= ptr->len || ! is_name_beginner (ptr->ptr[i])) + break; + i++; + while (i < ptr->len && is_part_of_name (ptr->ptr[i])) + i++; + if (i < ptr->len && is_name_ender (ptr->ptr[i])) + i++; + if (LABELS_WITHOUT_COLONS) + break; + /* Skip whitespace. */ + while (i < ptr->len && ISWHITE (ptr->ptr[i])) + i++; + /* Check for the colon. */ + if (i >= ptr->len || ptr->ptr[i] != ':') { - /* Skip over a label, if any. */ - if (i >= ptr->len || ! is_name_beginner (ptr->ptr[i])) - break; - i++; - while (i < ptr->len && is_part_of_name (ptr->ptr[i])) - i++; - if (i < ptr->len && is_name_ender (ptr->ptr[i])) - i++; - if (LABELS_WITHOUT_COLONS) - break; - /* Skip whitespace. */ - while (i < ptr->len && ISWHITE (ptr->ptr[i])) - i++; - /* Check for the colon. */ - if (i >= ptr->len || ptr->ptr[i] != ':') - { - i = line_start; - break; - } - i++; - line_start = i; + i = line_start; + break; } - + i++; + line_start = i; } + /* Skip trailing whitespace. */ while (i < ptr->len && ISWHITE (ptr->ptr[i])) i++; -- 2.30.2