From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpdTV-00072I-6E for qemu-devel@nongnu.org; Thu, 29 Sep 2016 11:42:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpdTU-00040k-6G for qemu-devel@nongnu.org; Thu, 29 Sep 2016 11:42:17 -0400 Received: from mail-ua0-x22b.google.com ([2607:f8b0:400c:c08::22b]:33301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpdTT-0003zu-RU for qemu-devel@nongnu.org; Thu, 29 Sep 2016 11:42:16 -0400 Received: by mail-ua0-x22b.google.com with SMTP id i25so69474950uab.0 for ; Thu, 29 Sep 2016 08:42:15 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20160929041750.GN8390@umbus.fritz.box> References: <34249C6D-327A-4ED4-BB2D-8E2F532A5720@gmail.com> <7e2274fa-f649-887c-c78e-7f5b09749450@redhat.com> <73DBF468-DE5E-4EF0-A54E-91AD38C74C1D@gmail.com> <20160929041750.GN8390@umbus.fritz.box> From: Peter Maydell Date: Thu, 29 Sep 2016 08:41:54 -0700 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [Qemu-ppc] How to add my implementation of the fmadds instruction to QEMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: G 3 , "list@suse.de:PowerPC list:PowerPC" , Eric Blake , qemu-devel qemu-devel On 28 September 2016 at 21:17, David Gibson wrote: > I think there is a way you could get both speed and accuracy, but it's > a huge project: > > You'd need to add full float awareness to TCG - so floating point TCG > values and floating point operations as tcp micro-ops, defined > according to IEEE semantics. Then you'd need to rewrite the TCG > frontends in terms of those new ops, at least for target CPUs close > enough to IEEE semantics for that to work. And you'd need to rewrite > the TCG backends to implement those fp ops in terms of host cpu fp > instructions .. at least when the host has fp behaviour close enough > to IEEE to make that work, with a fallback to soft float when that's > not the case. Also even if you have float support in both frontend and backend you still need to fall back to fully-emulated for the runtime corner cases (like where tininess before/after rounding makes a difference or where you need to care about minutiae of the floating point exception flags, etc). It's not impossible but it is a very large amount of technically complicated work. thanks -- PMM