From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K8k3g-0001rq-ND for qemu-devel@nongnu.org; Tue, 17 Jun 2008 18:53:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K8k3e-0001rO-VX for qemu-devel@nongnu.org; Tue, 17 Jun 2008 18:53:48 -0400 Received: from [199.232.76.173] (port=34320 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K8k3e-0001rL-RT for qemu-devel@nongnu.org; Tue, 17 Jun 2008 18:53:46 -0400 Received: from bangui.magic.fr ([195.154.194.245]:35520) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K8k3e-0001LS-7G for qemu-devel@nongnu.org; Tue, 17 Jun 2008 18:53:46 -0400 Received: from [192.168.0.2] (ppp-36.net-123.static.magiconline.fr [80.118.184.36]) by bangui.magic.fr (8.13.1/8.13.1) with ESMTP id m5HMrfA8017316 for ; Wed, 18 Jun 2008 00:53:41 +0200 Subject: Re: [Qemu-devel] [PATCH] ppc32 guests: fix computation of XER.{CA, OV} in addme, subfme, mullwo From: "J. Mayer" In-Reply-To: <200806180006.51954.jseward@acm.org> References: <200805110204.47184.jseward@acm.org> <20080617122746.GA23769@volta.aurel32.net> <200806180006.51954.jseward@acm.org> Content-Type: text/plain Date: Wed, 18 Jun 2008 00:53:41 +0200 Message-Id: <1213743222.19143.22.camel@localhost> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Wed, 2008-06-18 at 00:06 +0200, Julian Seward wrote: > On Tuesday 17 June 2008 14:27, Aurelien Jarno wrote: > > On Sun, May 11, 2008 at 02:04:47AM +0200, Julian Seward wrote: > > > For ppc32 guests, computation of XER.CA and XER.OV in some obscure > > > cases is incorrect. At least, it doesn't produce the same results > > > as a real MPC7447, and doesn't appear to be in accordance with the > > > instruction set documentation. > > > > > > The attached patch fixes it: > > > > > > * addme{o}{.}, subfme{o}{.}: compute XER.CA correctly > > > > > > * mullwo{.}: sign extend arguments before doing 64-bit > > > multiply, so as to make the XER.OV computation correct which seems to already been done... (and tested many times) > > Could you please give us a corner case for at least one of the > > instructions? It would help to clearly understand the problem. > > Below is a test case showing the problem with mullwo, addme and > subfme. On a real 7447 it prints This patch looks really ugly, does not respect the coding style and addme/subme changes seem very suspicious to me... I won't merge this as-is, but I could check more on real hardware I got (from 601 to G5). Could you please exactly describe the test conditions (host, ...) ? Thanks [...] -- J. Mayer Never organized