From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eM92E-0004OB-Qg for qemu-devel@nongnu.org; Tue, 05 Dec 2017 03:57:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eM92C-0000dp-Qd for qemu-devel@nongnu.org; Tue, 05 Dec 2017 03:57:02 -0500 Received: from mail-lf0-x22f.google.com ([2a00:1450:4010:c07::22f]:33305) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eM92C-0000d9-DR for qemu-devel@nongnu.org; Tue, 05 Dec 2017 03:57:00 -0500 Received: by mail-lf0-x22f.google.com with SMTP id 74so22360401lfs.0 for ; Tue, 05 Dec 2017 00:56:59 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <13637ee3-544f-11cc-4ee7-a27af2c91173@tuxfamily.org> References: <20171123163538.31411-1-laurent@vivier.eu> <629dc696-a5e7-4b94-f964-0e9fdd7cf511@vivier.eu> <13637ee3-544f-11cc-4ee7-a27af2c91173@tuxfamily.org> From: william lin Date: Tue, 5 Dec 2017 02:56:17 -0600 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 0/5] target/m68k: implement 680x0 FPU (part 3) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: Laurent Vivier , Peter Maydell , Andreas Grabher , QEMU Developers , Aurelien Jarno , Richard Henderson On Wed, Nov 29, 2017 at 9:19 AM, Thomas Huth wrote: > On 29.11.2017 15:17, Laurent Vivier wrote: > > Le 29/11/2017 =C3=A0 15:08, Thomas Huth a =C3=A9crit : > >> On 29.11.2017 14:59, Peter Maydell wrote: > >>> On 29 November 2017 at 13:42, Laurent Vivier > wrote: > >>>> these functions come from: > >>>> > >>>> http://previous.alternative-system.com/ > >>>> > >>>> http://svn.code.sf.net/p/previous/code/trunk/src/ > softfloat/softfloat.c > >>>> > >>>> This is also a modified softfloat, release 2b > >>>> which is BSD license if I'm correct. > >>> > >>> We can't use softfloat2b code (the part of the license that goes > >>> "USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS > >>> AND ORGANIZATIONS [...] WHO FURTHERMORE EFFECTIVELY INDEMNIFY JOHN > >>> HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE INSTITUTE" isn't > >>> GPL compatible). > >>> > >>> We can use softfloat2a code, which doesn't have that indemnity clause= . > >> > >> Sigh. That's why WinUAE and Hatari immediately switched back to > >> softfloat2a (derived from QEMU) after we've identified the problem > >> there. Looks like the Previous folks forgot to do that step, too :-( > >> > >>>> This code has also been copied to WinUAE (GPL), where softfloat has > been > >>>> copied from QEMU: > >>>> https://github.com/tonioni/WinUAE/blob/master/softfloat/softfloat.cp= p > >>> > >>> Yes, lots of projects used the softfloat2b code without realising > >>> it wasn't GPL compatible (including QEMU -- we had a painful job > >>> to fix things up and convert to the 2a codebase a while back). > >>> > >>>> But I think the bad news comes later: > >>>> > >>>> all the other functions (sin, cos, tan, log, exp, ...) found in > previous > >>>> (softfloat_fpsp.c) are "derived" from NeXT library FPSP: > >>>> > >>>> http://svn.code.sf.net/p/previous/code/trunk/src/ > softfloat/softfloat_fpsp.c > >>>> > >>>> /*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >>>> > >>>> This C source file is an extension to the SoftFloat IEC/IEEE > Floating-point > >>>> Arithmetic Package, Release 2a. > >>>> > >>>> Written by Andreas Grabher for Previous, NeXT Computer Emulator. > >>>> > >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/ > >>>> ... > >>>> /*---------------------------------------------------------- > ------------------ > >>>> | Algorithms for transcendental functions supported by MC68881 and > MC68882 > >>>> | mathematical coprocessors. The functions are derived from FPSP > library. > >>>> *----------------------------------------------------------- > -----------------*/ > >>>> > >>>> FPSP library can be found: > >>>> > >>>> https://ftp.nice.ch/pub/next/developer/hardware/m68k/ > >>>> > >>>> And the assembly source code is not free at all: > >>>> > >>>> https://ftp.nice.ch/pub/next/developer/hardware/m68k/_ > libFPSP.1.p2.N.s/l_fpsp.h > >>>> > >>>> > >>>> | Copyright (C) Motorola, Inc. 1991 > >>>> | All Rights Reserved > >>>> | > >>>> | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA > >>>> | The copyright notice above does not evidence any > >>>> | actual or intended publication of such source code. > >>>> > >>>> > >>>> So I'm wondering what license apply to the C version found in > "Previous". > >>> > >>> Good question. It's clearly not copied code (since the FPSP library i= s > >>> all native m68k assembly), but presumably it's the same algorithms > >>> transliterated into C... > >> > >> There also seem to be other versions of that library available, e.g.: > >> > >> https://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/ > arch/m68k/fpsp/l_fpsp.h > >> > >> Maybe Andreas (now on CC: ) could clarify which version he used / how > >> the C sources were developed? > > > > Thank you Thomas, > > > > This seems to be the same code re-licensed to: > > > > MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP > > M68000 Hi-Performance Microprocessor Division > > M68040 Software Package > > > > M68040 Software Package Copyright (c) 1993, 1994 Motorola Inc. > > All rights reserved. > > > > THE SOFTWARE is provided on an "AS IS" basis and without warranty. > > To the maximum extent permitted by applicable law, > > MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, > > INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A > > PARTICULAR PURPOSE and any warranty against infringement with > > regard to the SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF) > > and any accompanying written materials. > > > > To the maximum extent permitted by applicable law, > > IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER > > (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS > > PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR > > OTHER PECUNIARY LOSS) ARISING OF THE USE OR INABILITY TO USE THE > > SOFTWARE. Motorola assumes no responsibility for the maintenance > > and support of the SOFTWARE. > > > > You are hereby granted a copyright license to use, modify, and > > distribute the SOFTWARE so long as this entire notice is retained > > without alteration in any modified and/or redistributed versions, > > and that such modified versions are clearly identified as such. > > No licenses are granted by implication, estoppel or otherwise > > under any patents or trademarks of Motorola, Inc. > > IANAL, but to me that sounds like it is compatible to the GPL, so I > think there should not be a problem if the C sources are based on these > assembler sources? > > Thomas > > After looking into all these files, I noticed that the previous code: http://svn.code.sf.net/p/previous/code/trunk/src/softfloat/softfloat_fpsp.c uses SoftFloat 2b code for the helper functions: http://svn.code.sf.net/p/previous/code/trunk/src/softfloat/softfloat.h I'm not familiar with licensing but to me it appears that Andreas Grabher has his code as an extension to the wrong release of SoftFloat. >>>> /*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D >>>> >>>> This C source file is an extension to the SoftFloat IEC/IEEE >>>> Floating-point >>>> Arithmetic Package, Release 2a. >>>> >>>> Written by Andreas Grabher for Previous, NeXT Computer Emulator. >>>> >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D*/ >>>> ... >>>> /*-------------------------------------------------------------------------= --- >>>> | Algorithms for transcendental functions supported by MC68881 and MC68882 >>>> | mathematical coprocessors. The functions are derived from FPSP library. >>>> *--------------------------------------------------------------------------= --*/ So we can't use these C code directly as it uses helpers from 2b. However, would it be ok to write our own set of C code along with the necessary helpers using the C and asm code as reference? (would be part of 2a) William (https://lists.gnu.org/archive/html/qemu-devel/2017-11/msg05422.html)