public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@wasabisystems.com>
To: Zack Weinberg <zack@codesourcery.com>
Cc: hp@bitrange.com, schwab@suse.de, binutils@sources.redhat.com
Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
Date: Tue, 27 Apr 2004 02:47:00 -0000	[thread overview]
Message-ID: <m3isfm3zs2.fsf@gossamer.airs.com> (raw)
In-Reply-To: <873c6q6y5b.fsf@egil.codesourcery.com>

Zack Weinberg <zack@codesourcery.com> writes:

> Uh, when I said "collapse the parsing logic together" I meant "think
> of a way to get rid of the machine-dependent parsers to the maximum
> extent possible."  While thinking very carefully about how to make the
> parser go blazingly fast *without* special tricks.  I'm quite
> confident this is possible.  Assembly syntax - with or without extra
> added whitespace - is not complicated, nor does it vary that much
> across architectures supported by GAS.

That turns out to be an oversimplification.  Consider i386 prefixes,
as Alan mentioned.  Consider the d10v, for which the assembler
programmer (or the compiler) may specify packing orderings between two
instructions written on the same line.  Consider m68k operand syntax,
which is sufficiently complex that we wrote a bison parser to handle
it.  Let's not even discuss MRI compatibility mode.  Remember that
while the assembler normally handles compiler output, it must also
handle hand-written assembler code which is much more free in how
operands and expressions are used.  Look at the current complexity of
do_scrub_chars() today, when it doesn't have to worry about many of
the details handled by the machine dependent parsers.

Can these issues be solved?  Yes, of course they can.  Would the
resulting parser be maintainable and blazingly fast?  I very much
doubt that both could be achieved simultaneously.  Even if were
achieved, would it still be faster to use some equivalent of #NO_APP
mode?  Almost certainly.

Ian

      parent reply	other threads:[~2004-04-27  2:44 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-17 16:36 Nathan Sidwell
2004-03-17 16:43 ` Hans-Peter Nilsson
2004-03-17 16:49 ` Ian Lance Taylor
2004-03-18 10:29   ` Nathan Sidwell
2004-03-18 13:15     ` Ian Lance Taylor
2004-04-23 23:15     ` Andreas Schwab
2004-04-24 17:36       ` Hans-Peter Nilsson
2004-04-24 17:57         ` Andreas Schwab
2004-04-24 18:26           ` Hans-Peter Nilsson
2004-04-24 19:22             ` Andreas Schwab
2004-04-24 21:31               ` Hans-Peter Nilsson
2004-04-24 21:33                 ` Andreas Schwab
2004-04-24 23:25                   ` Hans-Peter Nilsson
2004-04-24 23:37                     ` Andreas Schwab
2004-04-25  0:03                     ` Zack Weinberg
2004-04-25  0:22                       ` Hans-Peter Nilsson
2004-04-26  0:28                         ` Zack Weinberg
2004-04-26  0:58                           ` Hans-Peter Nilsson
2004-04-26  2:14                             ` Hans-Peter Nilsson
2004-04-25 23:35                       ` Ian Lance Taylor
2004-04-26  0:51                         ` Zack Weinberg
2004-04-26  2:46                           ` Ian Lance Taylor
2004-04-26  3:13                             ` Zack Weinberg
2004-04-26 14:16                               ` Ian Lance Taylor
2004-04-26 14:22                                 ` Andreas Schwab
2004-04-26 14:34                                   ` Richard Earnshaw
2004-04-26 15:29                                     ` Ian Lance Taylor
2004-04-26 19:26                                       ` Hans-Peter Nilsson
2004-04-26 19:42                                 ` Kai Henningsen
2004-04-26 19:45                                   ` Ian Lance Taylor
2004-04-26 20:04                                     ` Ian Lance Taylor
2004-04-27  1:32                                 ` Zack Weinberg
2004-04-27  2:02                                   ` Hans-Peter Nilsson
2004-04-27  2:38                                     ` Zack Weinberg
2004-04-27  2:35                                   ` Alan Modra
2004-04-27  3:13                                     ` Zack Weinberg
2004-04-27  4:33                                       ` Ian Lance Taylor
2004-04-27  5:19                                         ` Zack Weinberg
2004-04-27  6:52                                           ` Ian Lance Taylor
2004-04-27 11:43                                         ` Richard Earnshaw
2004-04-27  2:47                                   ` Ian Lance Taylor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3isfm3zs2.fsf@gossamer.airs.com \
    --to=ian@wasabisystems.com \
    --cc=binutils@sources.redhat.com \
    --cc=hp@bitrange.com \
    --cc=schwab@suse.de \
    --cc=zack@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).