From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFwsi-00005L-Fy for qemu-devel@nongnu.org; Wed, 13 Mar 2013 21:22:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFwse-0003TF-N0 for qemu-devel@nongnu.org; Wed, 13 Mar 2013 21:22:56 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:34787) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFwse-0003S4-J6 for qemu-devel@nongnu.org; Wed, 13 Mar 2013 21:22:52 -0400 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 13 Mar 2013 21:22:49 -0400 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 26ACE38C8047 for ; Wed, 13 Mar 2013 21:22:46 -0400 (EDT) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r2E1MjOr61538552 for ; Wed, 13 Mar 2013 21:22:45 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r2E1MjAA005583 for ; Wed, 13 Mar 2013 21:22:45 -0400 Message-ID: <51412664.3080404@linux.vnet.ibm.com> Date: Wed, 13 Mar 2013 20:22:44 -0500 From: Joel Schopp MIME-Version: 1.0 References: <1363144182-1016-1-git-send-email-jschopp@linux.vnet.ibm.com> <1363144182-1016-8-git-send-email-jschopp@linux.vnet.ibm.com> <5140E6D4.3010600@redhat.com> <5140EDB2.2090009@linux.vnet.ibm.com> In-Reply-To: <5140EDB2.2090009@linux.vnet.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 7/9] asn1_input-visitor.diff List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Berger Cc: qemu-devel@nongnu.org, Michael Tsirkin >>> + case 0x41: >>> + case 0x40: >>> + num.mpn.sign = ((number.first & 0x1) != 0); >>> + num.mpn.biased_exponent = ~0; >>> + num.mpn.mantissa_low = 0; >>> + num.mpn.mantissa_high = 0; >>> + *obj = num.v_double; >> Is this really portable enough? In other words, do we really require >> that qemu only compiles on platforms where double is in IEEE format? >> > Good question. I don't know in what format the other platforms are, > though. I know it's used on i386, x86_64, ppc, ppc64. My guess is that > it would have to be a really exotic CPU to not use this standard. > > I hope this applies to ARM in general... > http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0067d/Cihgejjg.html > There are chips without hardware floating point, for example the ppc 404. However, these use software emulation of IEE floating point when doing floating point math. What we are looking for is a platform that has floating point that isn't IEEE. Cell SPE comes to mind, though I don't think qemu emulates it and it is a dead architecture (RIP). It also has an IEEE mode that makes its non-standard floating point compliant. Even in non-compliant mode the code above would work, it's more rounding that might be off. In summary I can't think of a platform we run on or emulate that has a floating point mode the above would not work on. If somebody can think of one please let me know so we can #ifdef a special case for it. Otherwise let's assume the above works for all the platforms we care about. -Joel