From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fX5LP-0004kT-CS for qemu-devel@nongnu.org; Sun, 24 Jun 2018 09:46:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fX5LM-0003sR-8h for qemu-devel@nongnu.org; Sun, 24 Jun 2018 09:46:19 -0400 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) From: Programmingkid In-Reply-To: Date: Sun, 24 Jun 2018 09:46:12 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <4CC477CD-237F-480D-B9B5-B35FF507BD3C@gmail.com> References: <20180623022258.22158-1-programmingkidx@gmail.com> <1E63C3B2-7668-4D05-BC43-02E478FB493B@gmail.com> Subject: Re: [Qemu-devel] [PATCH] fix fdiv instruction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: david@gibson.dropbear.id.au, qemu-devel@nongnu.org, qemu-ppc@nongnu.org > On Jun 24, 2018, at 12:18 AM, Richard Henderson = wrote: >=20 > On 06/23/2018 01:17 PM, Programmingkid wrote: >>>> = https://www.pdfdrive.net/powerpc-microprocessor-family-the-programming-env= ironments-for-32-e3087633.html >>>> This document has the information on the fdiv. Page 133 has the = information on what action is executed when a division by zero situation = takes place.=20 >=20 > Even in your referenced PDF, table 3-13, it says that frD is = unmodified. Actually it says when FPSCR[ZE] is set is when frD is unmodified. When = FPSCR[ZE] is not set it frD's sign is determined by an XOR of the signs = of the operands. I have verified that this is what happens on real = PowerPC 750 and 950 CPUs.=20 >=20 >>> struct sigaction a =3D { .sa_sigaction =3D handle, .sa_flags =3D = SA_SIGINFO }; >>> sigaction(SIGFPE, &a, NULL); >>> feenableexcept(FE_ALL_EXCEPT); >>=20 >> This is C99 code. There are a lot of floating point bugs with this = implementation. I suggest all future testing be done using PowerPC = assembly language only. >=20 > Um.. have you really ever seen an implementation that won't set ZE? I do know that when I did try to use C99 floating point code I saw a lot = of problems. Bypassing any library issues by directly setting the FPSCR = is best for testing. Table 2-4 in the pdf has information on the FPSCR.=20= >=20 >> What compiler did you use to compile this program? >=20 > gcc 7.2. >=20 >> What operating system did you run this program on? >=20 > CentOS 7, so kernel 3.10, glibc 2.17. >=20 >> What are the specs of the system you used to test this program on? >=20 > CHRP IBM,8231-E2B (Power7). I was just wondering are you able to run a PowerPC operating system in = QEMU in KVM mode on this Power7 computer? Thank you.