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: demand_empty_rest_of_line and ignore_rest_of_line


Zack Weinberg <zack@codesourcery.com> writes:

> The denser packing, and the lack of a nicely lined up arguments field,
> mean substantially more mental effort just to see what it's doing.

I'd say you're making a mountain out of a molehill.  You're condemning
the entire world to have slower compiles because you don't want to
work a little bit harder to read assembler code, nor to write a sed
script to do beautification, nor to use the -fverbose-asm option.  If
there is really a 1% speedup with #NO_APP, then it might even save you
time overall due to faster compiles, even at the cost of spending more
time in the relatively rare cases that you have to look at i386
assembler output.  I'm sure it would save time for everybody else.

For that matter, this patch to gas would accept your example input in
#NO_APP mode.

Ian

Index: tc-i386.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-i386.c,v
retrieving revision 1.150
diff -u -r1.150 tc-i386.c
--- tc-i386.c	12 Mar 2004 10:14:29 -0000	1.150
+++ tc-i386.c	26 Apr 2004 02:05:49 -0000
@@ -237,6 +237,7 @@
 #define is_operand_char(x) (operand_chars[(unsigned char) x])
 #define is_register_char(x) (register_chars[(unsigned char) x])
 #define is_space_char(x) ((x) == ' ')
+#define is_space_or_tab_char(x) ((x) == ' ' || (x) == '\t')
 #define is_identifier_char(x) (identifier_chars[(unsigned char) x])
 #define is_digit_char(x) (digit_chars[(unsigned char) x])
 
@@ -1506,7 +1507,7 @@
 	    }
 	  l++;
 	}
-      if (!is_space_char (*l)
+      if (!is_space_or_tab_char (*l)
 	  && *l != END_OF_INSN
 	  && *l != PREFIX_SEPARATOR
 	  && *l != ',')
@@ -1528,7 +1529,7 @@
       current_templates = hash_find (op_hash, mnemonic);
 
       if (*l != END_OF_INSN
-	  && (!is_space_char (*l) || l[1] != END_OF_INSN)
+	  && (!is_space_or_tab_char (*l) || l[1] != END_OF_INSN)
 	  && current_templates
 	  && (current_templates->start->opcode_modifier & IsPrefix))
 	{
@@ -1673,7 +1674,7 @@
   while (*l != END_OF_INSN)
     {
       /* Skip optional white space before operand.  */
-      if (is_space_char (*l))
+      if (is_space_or_tab_char (*l))
 	++l;
       if (!is_operand_char (*l) && *l != END_OF_INSN)
 	{


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