From patchwork Mon Mar 5 20:39:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 881675 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zwBcm1JjDz9sgM for ; Tue, 6 Mar 2018 07:40:39 +1100 (AEDT) Received: from localhost ([::1]:51451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eswuS-0007MH-GD for incoming@patchwork.ozlabs.org; Mon, 05 Mar 2018 15:40:36 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eswu7-0007L0-75 for qemu-devel@nongnu.org; Mon, 05 Mar 2018 15:40:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eswu4-0000CM-2K for qemu-devel@nongnu.org; Mon, 05 Mar 2018 15:40:15 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:36211) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eswu3-00008b-Pn for qemu-devel@nongnu.org; Mon, 05 Mar 2018 15:40:12 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MKgdv-1es7ok1iYZ-001xvQ; Mon, 05 Mar 2018 21:39:45 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 5 Mar 2018 21:39:02 +0100 Message-Id: <20180305203910.10391-1-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 X-Provags-ID: V03:K0:HsoPM0AbhYDLv27EQ9ex+KXrKNE/g/0BCaLshmhtRTcoriMNl5x PeT/xKyvtLSrhm+LuAWPXb1OURbwsHci1ufsVX+02hgiMnOyQ/E8tUF+JTgLIM71E69f501 Bkj6cJvWs89LLRJLDxxjiSDGxua+2IZvbylbo/yOS3WTy78n1eH7bMk9q0ERAPLm06bARqP de7v89VhzFB0pIa+L0NDw== X-UI-Out-Filterresults: notjunk:1; V01:K0:RiTkY2uaPIA=:2iko9blvGAOeR59unHvcYV T7PbZCQ4q4il89/7yQXwJnARwfh3zZvx5E3hWZoTCvF3uF1Ixxgm3uz7UvdZEPq3bj4ED3UQY aNBcy+ThztTbHEnShcucev2cpGUmmjunAjGRKOHl+IWN48rIvjHli+vgsfmm3T1befs2lxq+p ERTHsw3ZLS7VfdxcODduNDurzQGPjo2ivCD13Wd7lXAfwxBUECDmlKjvwlTZwuLdkgY9yqHF5 M/8xdOishxIEiUOVMBCs/wOJxbMc/AjngtB2tKe/JbQ1JvTjcs200AjeCgnmnlth5hJlWXX2v miPuOAzAiY7xy+xG9WH/NGeMjfMQfChWKDQBc/suc1gQNOgLIbhBXTIpttyyRVW7rBvcZG1Kq bH7WzauT70MGsnlb0ow5Kkgqyw3LV2EKlX7LvmTXeIX2TeuCEYrhInPj//OFG2FSLEZMQi0fy F4NYgh4pZdkiwomc8DKhENDuRWjKz5t+gey9yO57IqxMSU5cMlg+alUWAVNcCuZQwYWcoescL /YspdcE16gwRswQL8dpVpuv5Y93dW7wRm8M8DQ3/WZKd+6Ddf7UhLGnBK6VF664tTbwISn6e6 5mJruNrHYv559zWwTzvX5qoXsErMfDZ3rQHwRFHcBtXLrxRHiXjs/aBq4mNFFq+uqMvxH9DhF 5kDBGlVv5Z5meMye5nCfW8zSjPnQ2RL7C15fZoSAt4EKAWNReSryC+L/RuSVEs1BS0kFRjGmU yd23PhNjqAqCGKFKCm7sJk0tO2a/EKqstaMkiQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.135 Subject: [Qemu-devel] [PATCH 0/8] target/m68k: implement 680x0 FPU (part 4) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Laurent Vivier , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Implement flognp1, flogn, flog10, flog2, fetox, ftwotox, ftentox As previously, all the floatx80 functions are copied from "Previous", the NeXT Computer Emulator, and written by Andreas Grabher. I did not improve or clean up the code, it's a simple port of Andreas' work from "Previous". "Previous" code I have ported to QEMU can be found in (r844): http://svn.code.sf.net/p/previous/code/trunk/src/softfloat/ "Previous" code is a C implementation of m68040 assembly language functions found in ($NetBSD: copyright.s,v 1.2 1994/10/26 07:48:57 cgd Exp) https://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/arch/m68k/fpsp/ floatx80_move() comes from WinUAE (3600b8): https://github.com/tonioni/WinUAE/blob/master/softfloat/softfloat.cpp All the original work is under SoftFloat-2a license, and additional work under BSD license or GPL-v2-or-later license. All softfloat new functions are added in target/m68k as they are derived from m68k code. I have compared results of these instructions from a real m68040 and from QEMU, and they match. Laurent Vivier (8): target/m68k: define floatx80_move() target/m68k: implement flognp1 target/m68k: implement flogn target/m68k: implement flog10 target/m68k: implement flog2 target/m68k: implement fetox target/m68k: implement ftwotox target/m68k: implement ftentox target/m68k/fpu_helper.c | 35 ++ target/m68k/helper.h | 7 + target/m68k/softfloat.c | 1019 +++++++++++++++++++++++++++++++++++ target/m68k/softfloat.h | 8 + target/m68k/softfloat_fpsp_tables.h | 374 +++++++++++++ target/m68k/translate.c | 21 + 6 files changed, 1464 insertions(+) create mode 100755 target/m68k/softfloat_fpsp_tables.h