This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
[PATCH] TC_START_LABEL_WITHOUT_COLON
- To: binutils at sourceware dot cygnus dot com
- Subject: [PATCH] TC_START_LABEL_WITHOUT_COLON
- From: Timothy Wall <twall at alum dot mit dot edu>
- Date: Wed, 09 Feb 2000 08:59:15 -0500
- CC: nickc at cygnus dot com
This patch adds a macro check equivalent to TC_START_LABEL in the case
where LABELS_WITHOUT_COLONS is defined. This gives the target a chance
to check the label if labels do not require colons.
* gas/read.c (read_a_source_file): Add TC_START_LABEL_WITHOUT_COLON to
give parallel functionality as TC_START_LABEL when LABELS_WITHOUT_COLONS
is defined.
Index: read.c
===================================================================
RCS file: /cvs/src/src/gas/read.c,v
retrieving revision 1.14
diff -d -c -p -r1.14 read.c
*** read.c 2000/02/08 19:06:00 1.14
--- read.c 2000/02/09 13:55:30
*************** read_a_source_file (name)
*** 599,605 ****
/* In MRI mode, we need to handle the MACRO
pseudo-op specially: we don't want to put the
symbol in the symbol table. */
! if (! mri_line_macro)
line_label = colon (line_start);
else
line_label = symbol_create (line_start,
--- 599,610 ----
/* In MRI mode, we need to handle the MACRO
pseudo-op specially: we don't want to put the
symbol in the symbol table. */
! if (! mri_line_macro
! #ifdef TC_START_LABEL_WITHOUT_COLON
! && TC_START_LABEL_WITHOUT_COLON(c,
! input_line_pointer)
! #endif
! )
line_label = colon (line_start);
else
line_label = symbol_create (line_start,
Index: doc/internals.texi
===================================================================
RCS file: /cvs/src/src/gas/doc/internals.texi,v
retrieving revision 1.5
diff -d -c -p -r1.5 internals.texi
*** internals.texi 2000/02/08 14:21:53 1.5
--- internals.texi 2000/02/09 13:55:30
*************** is a label, even if it does not have a c
*** 994,999 ****
--- 994,1004 ----
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