From 62f65a7b06c1bdc0805457539d384c6caa05a31a Mon Sep 17 00:00:00 2001 From: Dave Brolley Date: Wed, 25 Jul 2001 15:23:19 +0000 Subject: 2001-07-25 Dave Brolley * app.c (LEX_IS_PARALLEL_SEPARATOR): New macro. (IS_PARALLEL_SEPARATOR): New macro. (do_scrub_begin): Set up characters in tc_parallel_separator_chars as LEX_IS_PARALLEL_SEPARATOR, if it is defined. (do_scrub_chars): Handle LEX_PARALLEL_SEPARATOR chars like LEX_LINE_SEPARATOR except that we go to state 1 (as if the label has been seen). --- gas/ChangeLog | 10 ++++++++++ gas/app.c | 19 ++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index ca6ffc9..f181007 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,13 @@ +2001-07-25 Dave Brolley + + * app.c (LEX_IS_PARALLEL_SEPARATOR): New macro. + (IS_PARALLEL_SEPARATOR): New macro. + (do_scrub_begin): Set up characters in tc_parallel_separator_chars + as LEX_IS_PARALLEL_SEPARATOR, if it is defined. + (do_scrub_chars): Handle LEX_PARALLEL_SEPARATOR chars like + LEX_LINE_SEPARATOR except that we go to state 1 (as if the label has + been seen). + 2001-07-24 Alan Modra * Makefile.am (DEP_FLAGS): Define, add -DOBJ_MAYBE_ELF. diff --git a/gas/app.c b/gas/app.c index 5111598..59aa40b 100644 --- a/gas/app.c +++ b/gas/app.c @@ -78,9 +78,11 @@ static const char symbol_chars[] = #ifdef DOUBLEBAR_PARALLEL #define LEX_IS_DOUBLEBAR_1ST 13 #endif +#define LEX_IS_PARALLEL_SEPARATOR 14 #define IS_SYMBOL_COMPONENT(c) (lex[c] == LEX_IS_SYMBOL_COMPONENT) #define IS_WHITESPACE(c) (lex[c] == LEX_IS_WHITESPACE) #define IS_LINE_SEPARATOR(c) (lex[c] == LEX_IS_LINE_SEPARATOR) +#define IS_PARALLEL_SEPARATOR(c) (lex[c] == LEX_IS_PARALLEL_SEPARATOR) #define IS_COMMENT(c) (lex[c] == LEX_IS_COMMENT_START) #define IS_LINE_COMMENT(c) (lex[c] == LEX_IS_LINE_COMMENT_START) #define IS_NEWLINE(c) (lex[c] == LEX_IS_NEWLINE) @@ -164,6 +166,15 @@ do_scrub_begin (m68k_mri) lex[(unsigned char) *p] = LEX_IS_LINE_SEPARATOR; } /* declare line separators */ +#ifdef tc_parallel_separator_chars + /* This macro permits the processor to specify all characters which + separate parallel insns on the same line. */ + for (p = tc_parallel_separator_chars; *p; p++) + { + lex[(unsigned char) *p] = LEX_IS_PARALLEL_SEPARATOR; + } /* declare parallel separators */ +#endif + /* Only allow slash-star comments if slash is not in use. FIXME: This isn't right. We should always permit them. */ if (lex['/'] == 0) @@ -796,7 +807,8 @@ do_scrub_chars (get, tostart, tolen) #endif if (IS_COMMENT (ch) || ch == '/' - || IS_LINE_SEPARATOR (ch)) + || IS_LINE_SEPARATOR (ch) + || IS_PARALLEL_SEPARATOR (ch)) { if (scrub_m68k_mri) { @@ -1039,6 +1051,11 @@ do_scrub_chars (get, tostart, tolen) PUT (ch); break; + case LEX_IS_PARALLEL_SEPARATOR: + state = 1; + PUT (ch); + break; + #ifdef TC_V850 case LEX_IS_DOUBLEDASH_1ST: ch2 = GET (); -- cgit v1.1