[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 6/7] disas: mips: Add micromips R6 disassembler - infrastr

From: Richard Henderson
Subject: Re: [PATCH v4 6/7] disas: mips: Add micromips R6 disassembler - infrastructure and 16-bit instructions
Date: Fri, 24 Jan 2020 21:51:02 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 1/24/20 1:38 PM, Aleksandar Markovic wrote:
> On Friday, January 24, 2020, Richard Henderson <address@hidden
> <mailto:address@hidden>> wrote:
>     The thing I'm concerned about here is any future maintenance of this 
> file.  One
>     would surely prefer to edit the original decodetree input than this 
> output.
> Here is the deal: This dissasembler is meant to reflect the  documentation of 
> a
> particular ISA, and as the documentation largely stays constant (except adding
> some insignificant errata), the disassembler will stay virtually constant, we
> wouldn't like even to touch it, and we like it this way.

No, this is neither right nor proper.

To review the code in this form is significantly harder than in its decodetree
form.  That is in fact the whole point of the decodetree form: otherwise we'd
still be writing these sorts of parsers by hand.

While there's no license on this new file (another problem), if as assumed this
is GPL 2+, then you are in violation of the GPL.  From section 3:

  # The source code for a work means the preferred form of
  # the work for making modifications to it.

You cannot with a straight face claim that the generated c is the preferred
form for making modifications.

Finally, suppose we improve decodetree.py, so that it produces code with which
the compiler produces better code, for some metric of better.  We would want
this disassembler to benefit as well.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]