This is the mail archive of the binutils@sources.redhat.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]
Other format: [Raw text]

Re: Misc cleanups


Ian Lance Taylor wrote:
Nathan Sidwell <nathan@codesourcery.com> writes:

The code now assumes that TC_OPCODE_CASE is going to be defined, but
nothing actually defines it.  I know that the preprocessor doesn't
require macros to be defined, but I don't personally like that
approach.

There are plenty of things in gas which require #ifdef.  I think you
should just invert the sense of IGNORE_OPCODE_CASE.  Rename it to
something like OPCODES_CASE_SENSITIVE, and test it with #ifdef.
sure. How about this one?

Also the change to read_a_source_file() is OK, although I would be
interested in hearing why those pseudos caused a problem.
There is no floating point, and there was a requirement that float
pseudos not exist. This seemed the most direct way.

I'll reply to your SKIP_ZEROES comments in another mail
--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk

2004-02-06  Nathan Sidwell  <nathan@codesourcery.com>

	* read.h (IGNORE_OPCODE_CASE): Do not define. Replace with ...
	(TC_CASE_SENSITIVE): ... this.
	* read.c: Replace IGNORE_OPCODE_CASE with TC_CASE_SENSITIVE.
	* doc/internals.texi (TC_CASE_SENSITIVE): Document.

Index: read.c
===================================================================
RCS file: /cvs/src/src/gas/read.c,v
retrieving revision 1.74
diff -c -3 -p -r1.74 read.c
*** read.c	6 Feb 2004 16:00:20 -0000	1.74
--- read.c	6 Feb 2004 16:05:10 -0000
*************** char is_end_of_line[256] = {
*** 155,161 ****
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0	/* */
  };
  
! #ifdef  IGNORE_OPCODE_CASE
  char original_case_string[128];
  #endif
  
--- 155,161 ----
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0	/* */
  };
  
! #ifndef TC_CASE_SENSITIVE
  char original_case_string[128];
  #endif
  
*************** read_a_source_file (char *name)
*** 720,726 ****
  		  /* Expect pseudo-op or machine instruction.  */
  		  pop = NULL;
  
! #ifdef IGNORE_OPCODE_CASE
  		  {
  		    char *s2 = s;
  
--- 720,726 ----
  		  /* Expect pseudo-op or machine instruction.  */
  		  pop = NULL;
  
! #ifndef TC_CASE_SENSITIVE
  		  {
  		    char *s2 = s;
  
Index: read.h
===================================================================
RCS file: /cvs/src/src/gas/read.h,v
retrieving revision 1.22
diff -c -3 -p -r1.22 read.h
*** read.h	6 Feb 2004 16:00:20 -0000	1.22
--- read.h	6 Feb 2004 16:05:10 -0000
*************** enum linkonce_type {
*** 90,97 ****
    LINKONCE_SAME_CONTENTS
  };
  
! #define IGNORE_OPCODE_CASE
! #ifdef  IGNORE_OPCODE_CASE
  extern char original_case_string[];
  #endif
  
--- 90,96 ----
    LINKONCE_SAME_CONTENTS
  };
  
! #ifndef TC_CASE_SENSITIVE
  extern char original_case_string[];
  #endif
  
Index: doc/internals.texi
===================================================================
RCS file: /cvs/src/src/gas/doc/internals.texi,v
retrieving revision 1.38
diff -c -3 -p -r1.38 internals.texi
*** doc/internals.texi	23 Jan 2004 12:52:20 -0000	1.38
--- doc/internals.texi	6 Feb 2004 16:05:17 -0000
*************** arguments, the character before the @kbd
*** 1033,1038 ****
--- 1033,1043 ----
  If you define this macro, it should return nonzero if the current input line
  pointer should be treated as the end of a line.
  
+ @item TC_CASE_SENSITIVE
+ @cindex TC_CASE_SENSITIVE
+ Define this macro if instruction mnemonics and pseudos are case sensitive.
+ The default is to have it undefined giving case insensitive names.
+ 
  @item md_parse_name
  @cindex md_parse_name
  If this macro is defined, GAS will call it for any symbol found in an

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