diff options
author | Timothy Wall <twall@alum.mit.edu> | 2000-02-10 21:00:10 +0000 |
---|---|---|
committer | Timothy Wall <twall@alum.mit.edu> | 2000-02-10 21:00:10 +0000 |
commit | f28e8eb3fd8ab61a0c02b2d9a938a1400cf3bf25 (patch) | |
tree | 2c11bc5d2aafac781aee61f1cb4ea5f35509a53a /gas | |
parent | 84dcfba7a2922c53645c9ea80aeded80e6085e1c (diff) | |
download | gdb-f28e8eb3fd8ab61a0c02b2d9a938a1400cf3bf25.zip gdb-f28e8eb3fd8ab61a0c02b2d9a938a1400cf3bf25.tar.gz gdb-f28e8eb3fd8ab61a0c02b2d9a938a1400cf3bf25.tar.bz2 |
New preprocessor options.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 8 | ||||
-rw-r--r-- | gas/app.c | 28 | ||||
-rw-r--r-- | gas/doc/internals.texi | 20 |
3 files changed, 53 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 171a277..537f702 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +2000-02-10 Timothy Wall <twall@redhat.com> + + * app.c (do_scrub_chars): Handle "||" for parallel instructions + when DOUBLEBAR_PARALLEL is defined. Avoid stripping whitespace + around colons when KEEP_WHITE_AROUND_COLON is defined. + * doc/internals.texi (CPU backend): Document DOUBLEBAR_PARALLEL + and KEEP_WHITE_AROUND_COLON. + 2000-02-08 Timothy Wall <twall@redhat.com> * read.c (s_rept): Call do_repeat, which abstracts the repeat @@ -68,6 +68,9 @@ static const char symbol_chars[] = #define LEX_IS_DOUBLEDASH_1ST 12 #endif #ifdef TC_M32R +#define DOUBLEBAR_PARALLEL +#endif +#ifdef DOUBLEBAR_PARALLEL #define LEX_IS_DOUBLEBAR_1ST 13 #endif #define IS_SYMBOL_COMPONENT(c) (lex[c] == LEX_IS_SYMBOL_COMPONENT) @@ -174,7 +177,7 @@ do_scrub_begin (m68k_mri) #ifdef TC_V850 lex['-'] = LEX_IS_DOUBLEDASH_1ST; #endif -#ifdef TC_M32R +#ifdef DOUBLEBAR_PARALLEL lex['|'] = LEX_IS_DOUBLEBAR_1ST; #endif #ifdef TC_D30V @@ -351,7 +354,7 @@ do_scrub_chars (get, tostart, tolen) #ifdef TC_V850 12: After seeing a dash, looking for a second dash as a start of comment. #endif -#ifdef TC_M32R +#ifdef DOUBLEBAR_PARALLEL 13: After seeing a vertical bar, looking for a second vertical bar as a parallel expression seperator. #endif */ @@ -761,6 +764,21 @@ do_scrub_chars (get, tostart, tolen) break; } +#ifdef KEEP_WHITE_AROUND_COLON + if (lex[ch] == LEX_IS_COLON) + { + /* only keep this white if there's no white *after* the colon */ + ch2 = GET (); + UNGET (ch2); + if (!IS_WHITESPACE (ch2)) + { + state = 9; + UNGET (ch); + PUT (' '); + break; + } + } +#endif if (IS_COMMENT (ch) || ch == '/' || IS_LINE_SEPARATOR (ch)) @@ -970,10 +988,14 @@ do_scrub_chars (get, tostart, tolen) #endif case LEX_IS_COLON: +#ifdef KEEP_WHITE_AROUND_COLON + state = 9; +#else if (state == 9 || state == 10) state = 3; else if (state != 3) state = 1; +#endif PUT (ch); break; @@ -1013,7 +1035,7 @@ do_scrub_chars (get, tostart, tolen) PUT ('\n'); break; #endif -#ifdef TC_M32R +#ifdef DOUBLEBAR_PARALLEL case LEX_IS_DOUBLEBAR_1ST: ch2 = GET(); if (ch2 != '|') diff --git a/gas/doc/internals.texi b/gas/doc/internals.texi index dfc2d3a..0e2cbd3 100644 --- a/gas/doc/internals.texi +++ b/gas/doc/internals.texi @@ -994,6 +994,11 @@ is a label, even if it does not have a colon. You may define this macro to control what GAS considers to be a label. The default definition is to accept any name followed by a colon character. +@item TC_START_LABEL_WITHOUT_COLON +@cindex TC_START_LABEL_WITHOUT_COLON +Same as TC_START_LABEL, but should be used instead of TC_START_LABEL when +LABELS_WITHOUT_COLONS is defined. + @item NO_PSEUDO_DOT @cindex NO_PSEUDO_DOT If you define this macro, GAS will not require pseudo-ops to start with a @@ -1224,6 +1229,21 @@ If you define this macro, GAS will call it each time a label is defined. GAS will call this function for each section at the end of the assembly, to permit the CPU backend to adjust the alignment of a section. +@item DOUBLEBAR_PARALLEL +@cindex DOUBLEBAR_PARALLEL +Affects the preprocessor so that lines containing '||' don't have their +whitespace stripped following the double bar. This is useful for targets that +implement parallel instructions. + +@item KEEP_WHITE_AROUND_COLON +@cindex KEEP_WHITE_AROUND_COLON +Normally, whitespace is compressed and removed when, in the presence of the +colon, the adjoining tokens can be distinguished. This option affects the +preprocessor so that whitespace around colons is preserved. This is useful +when colons might be removed from the input after preprocessing but before +assembling, so that adjoining tokens can still be distinguished if there is +whitespace, or concatentated if there is not. + @item tc_frob_section @cindex tc_frob_section If you define this macro, a @code{BFD_ASSEMBLER} GAS will call it for each |