GAS parser

Dave Korn dave.korn@artimi.com
Mon Aug 6 01:12:00 GMT 2007


On 02 August 2007 14:53, Ivan Pryanishnikov wrote:

> Hi,
> 
> I'm going to port binutils to a new target and looking at
> the organization of the package.
> 
> I have a question concerning GAS: some ports (eg, bfin) use
> lex/bison extensions (eg, bfin-lex.l, bfin-parse.y) to write their
> parsers.
> 
> I was wandering about the reasons behind; possibly some of them
> are:
>  - it's easier (generally) in some sense

  I think that's the main reason for m68k.  There are a couple of syntaxes and
a lot of variations and it's easier than hand-parsing all the operands.

>  - it's not possible to solve their parsing problems in a standard way

  I think that's the main reason for bfin.  It's a DSP and has some very
unusual syntax for specifying parallelism and SIMD.

>  - ??

  I think that's the main reason for MIPS (itbl-parse.y).  It allows the
coprocessor instruction set to be specified at runtime which is useful for
MIPS which has millions of subtypes and custom variants.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....



More information about the Binutils mailing list