On 06/13/2016 01:40 PM, Marek Vasut wrote:
On 06/13/2016 09:15 PM, Eric Blake wrote:
On 06/13/2016 01:05 PM, Marek Vasut wrote:
Add nios2 disassembler support. This patch is composed from binutils files
from commit "Opcodes and assembler support for Nios II R2". The files from
binutils used in this patch are:
+++ b/disas/nios2.c
@@ -0,0 +1,3620 @@
+/*
+ * This file is a concatenation of the following files from binutils:
+ * include/opcode/nios2.h
+ * include/opcode/nios2r1.h
+ * include/opcode/nios2r2.h
+ * opcodes/nios2-opc.c
+ * opcodes/nios2-dis.c
+ */
+
+/* Nios II opcode list for GAS, the GNU assembler.
+ Copyright (C) 2012-2016 Free Software Foundation, Inc.
+ Contributed by Nigel Gray (ng...@altera.com).
+ Contributed by Mentor Graphics, Inc.
+
+ This file is part of GAS, the GNU Assembler, and GDB, the GNU disassembler.
+
+ GAS/GDB is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
This is a non-starter. Qemu is a GPLv2-only project because of some of
the files it has already borrowed from other places, so we CANNOT use
GPLv3 files. You'll have to implement this from scratch, or pull from
binutils at the point prior to where upstream binutils upgraded to GPLv3.
Ouch, I see. I hope Sandra (on CC) might have some idea how to best go
about this licensing thing. I briefly checked and the nios2 stuff landed
in binutils under gpl3 already.
Hmmmm. Upstream binutils was already using GPLv3 at the time the nios2
support was contributed. I believe Altera's original out-of-tree patch
set was GPLv2 but it is extremely bit-rotten at this point and doesn't
include the new R2 instruction set or abstractions to support multiple
ISA variants (I had to do a lot of refactoring of the old
opcodes/disassembler support that amounted to almost a complete
rewrite). I could look into whether Mentor Graphics could relicense our
changes under GPLv2, but I'm not sure that would be possible or helpful
given that both Altera and Mentor have already assigned copyright to the
FSF? I'm not a legal expert. :-(
-Sandra