qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v9 48/84] disas: Add support for microMIPS and n


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v9 48/84] disas: Add support for microMIPS and nanoMIPS
Date: Thu, 16 Aug 2018 10:57:32 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 08/16/2018 07:57 AM, Aleksandar Markovic wrote:
> +#define umips_decode_gpr3_reg_names(rn) mips_gpr_names[umips_decode_gpr3[rn]]
> +#define umips_decode_gpr3_src_store_reg_names(rn) \
> +    mips_gpr_names[umips_decode_gpr3_src_store[rn]]
> +
> +int nanomips_dis(char *buf, unsigned address, unsigned short one,
> +                 unsigned short two, unsigned short three);
> +
> +int print_insn_micromips(bfd_vma memaddr, struct disassemble_info *info)
> +{

All of the umips stuff is GPLv3 code and cannot be included in QEMU.

At least it corresponds quite closely to binutils commit

commit df58fc944dbc6d5efd8d3826241b64b6af22f447 (HEAD)
Author: Richard Sandiford <address@hidden>
Date:   Sun Jul 24 14:20:15 2011 +0000

    bfd/
    2011-02-25  Chao-ying Fu  <address@hidden>
                Ilie Garbacea  <address@hidden>
                Maciej W. Rozycki  <address@hidden>
                Joseph Myers  <address@hidden>
                Catherine Moore  <address@hidden>
                Richard Sandiford  <address@hidden>

IANAL, and the GNU project has always allowed the original
license holder to distribute under multiple licenses, which
in this case would be mips.com, now wavecomp.com, but... ug.

That said, you don't seem to actually be using *any* of the
micromips bits.  You've stripped all of that out from the
body of print_insn_micromips and then call into nanomips_dis.

So just remove all of the bits you aren't using, and rename
the entry point, and you'll be fine.


> new file mode 100644
> index 0000000..35c3973
> --- /dev/null
> +++ b/disas/nanomips.cpp
> @@ -0,0 +1,15752 @@
> +
> +#include <cstring>
> +#include <stdexcept>
> +#include <sstream>
> +
> +#define INCLUDE_STANDALONE_UNIT_TEST

This is new code and needs a comment at the top for its license.


r~



reply via email to

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