From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qcg2i-0006XT-Ni for qemu-devel@nongnu.org; Fri, 01 Jul 2011 11:54:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qcg2g-0006Rk-Us for qemu-devel@nongnu.org; Fri, 01 Jul 2011 11:54:08 -0400 Received: from mail-qy0-f180.google.com ([209.85.216.180]:34031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qcg2g-0006RZ-Gm for qemu-devel@nongnu.org; Fri, 01 Jul 2011 11:54:06 -0400 Received: by qyk30 with SMTP id 30so2012152qyk.4 for ; Fri, 01 Jul 2011 08:54:05 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <4E0CE6A7.10901@jermar.eu> <4E0D9527.7010106@jermar.eu> <4E0DC450.4000700@jermar.eu> From: Artyom Tarasenko Date: Fri, 1 Jul 2011 17:53:45 +0200 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: Jakub Jermar , HelenOS development mailing list , qemu-devel@nongnu.org On Fri, Jul 1, 2011 at 5:20 PM, Laurent Desnogues wrote: > On Fri, Jul 1, 2011 at 5:03 PM, Artyom Tarasenko wr= ote: > [...] >>> I find it odd that udivx is using cpu_cc_src and cpu_cc_src2. =A0Using >>> dedicated local temps seems to fix the issue. >> >> Do we need to copy cpu_src* to further temps at all? IMHO >> >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0tcg_gen_mov_tl(cpu_cc_s= rc, cpu_src1); >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0tcg_gen_mov_tl(cpu_cc_s= rc2, cpu_src2); >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0gen_trap_ifdivzero_tl(c= pu_cc_src2); >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0tcg_gen_divu_i64(cpu_ds= t, cpu_cc_src, cpu_cc_src2); >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0gen_trap_ifdivzero_tl(c= pu_src2); >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0tcg_gen_divu_i64(cpu_ds= t, cpu_src1, cpu_src2); >> >> should do it. Or cpu_src is what you mean by dedicated? > > You have to use two local temps here to store cpu_src1 > and cpu_src2 because gen_trap_ifdivzero_tl uses > tcg_gen_brcondi_tl (cf tcg/README comment about > local usage and jumps). The same story as the recent crash with wrpr %pstate, I see. I should have done my homework. Thanks for the hint! Artyom --=20 Regards, Artyom Tarasenko solaris/sparc under qemu blog: http://tyom.blogspot.com/