From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QceRO-0004dk-TB for qemu-devel@nongnu.org; Fri, 01 Jul 2011 10:11:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QceRM-0007QI-L4 for qemu-devel@nongnu.org; Fri, 01 Jul 2011 10:11:30 -0400 Received: from mx2.avast.com ([91.213.143.6]:48160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QceRM-0007K6-2P for qemu-devel@nongnu.org; Fri, 01 Jul 2011 10:11:28 -0400 Message-ID: <4E0DD58C.2070001@jermar.eu> Date: Fri, 01 Jul 2011 16:11:24 +0200 From: Jakub Jermar MIME-Version: 1.0 References: <4E0CE6A7.10901@jermar.eu> <4E0D9527.7010106@jermar.eu> <4E0DC450.4000700@jermar.eu> In-Reply-To: <4E0DC450.4000700@jermar.eu> 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: HelenOS development mailing list Cc: qemu-devel@nongnu.org On 1.7.2011 14:57, Jakub Jermar wrote: > On 1.7.2011 12:41, Artyom Tarasenko wrote: >> Looks like it's a pretty nice test case. >> >> The test case scenario is to load the initial values into the >> registers (you already know them), >> calculate the mins, cmp the result with expected and jump somewhere. >> Since it happens with interrupts disabled, we don't need an OS or bios >> to test that. The binary just has to have an entry point at 0x20, >> then we can load it instead of bios. >> >> Care to produce the test case? (Otherwise I'll do it, but probably not >> until the weekend after the next one). > > Yes I have a small reproducible testcase, see the attachments. 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. Jakub