This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] TC_START_LABEL_WITHOUT_COLON


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]