From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qcehx-0000eF-NZ for qemu-devel@nongnu.org; Fri, 01 Jul 2011 10:28:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qcehv-0001dp-Ds for qemu-devel@nongnu.org; Fri, 01 Jul 2011 10:28:37 -0400 Received: from mx2.avast.com ([91.213.143.6]:59858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qcehu-0001dh-Qi for qemu-devel@nongnu.org; Fri, 01 Jul 2011 10:28:35 -0400 Message-ID: <4E0DD990.8070708@jermar.eu> Date: Fri, 01 Jul 2011 16:28:32 +0200 From: Jakub Jermar MIME-Version: 1.0 References: <4E0CE6A7.10901@jermar.eu> <4E0D9527.7010106@jermar.eu> <4E0DC450.4000700@jermar.eu> <4E0DD58C.2070001@jermar.eu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Desnogues Cc: HelenOS development mailing list , qemu-devel@nongnu.org On 1.7.2011 16:24, Laurent Desnogues wrote: > On Fri, Jul 1, 2011 at 4:11 PM, Jakub Jermar wrote: > [...] >> Actually, the testcase can be further reduced into: >> >> .global _start >> >> .text >> >> .space 0x20 >> >> _start: >> set 110393, %i1 >> set 0x40, %i2 >> >> cmp %i1, %i2 >> udivx %g0, 1, %g0 >> movgu %xcc, %i2, %i1 >> cmp %i1, 512 >> bgu %xcc, 0f >> nop >> >> succ: >> ta 0 >> >> fail: >> 0: >> ta 1 >> >> The presence of the `udivx` instruction seems to be essential. Even >> though it has no effect on the computation, removing it will make the >> testcase non-reproducible. > > Could you try to replace udivx with sdivx? It looks wrong too. Yeah, `sdivx` behaves the same wrt. the testcase. Jakub