From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HY3Js-0001vx-8H for qemu-devel@nongnu.org; Sun, 01 Apr 2007 12:54:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HY3Jr-0001uu-A3 for qemu-devel@nongnu.org; Sun, 01 Apr 2007 12:54:19 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HY3Jr-0001ur-7R for qemu-devel@nongnu.org; Sun, 01 Apr 2007 12:54:19 -0400 Received: from farad.aurel32.net ([82.232.2.251] helo=mail.aurel32.net) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HY3Gu-0004Ho-E5 for qemu-devel@nongnu.org; Sun, 01 Apr 2007 12:51:16 -0400 Received: from amd64.aurel32.net ([2001:618:400:fc13:216:3eff:fe00:1009]) by mail.aurel32.net with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1HY3Gs-00035w-PD for qemu-devel@nongnu.org; Sun, 01 Apr 2007 18:51:14 +0200 Received: from aurel32 by amd64.aurel32.net with local (Exim 4.63) (envelope-from ) id 1HY3Gs-0000lx-He for qemu-devel@nongnu.org; Sun, 01 Apr 2007 18:51:14 +0200 Date: Sun, 1 Apr 2007 18:51:14 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] qemu/target-sparc translate.c Message-ID: <20070401165114.GA2962@amd64.aurel32.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: 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 Sun, Apr 01, 2007 at 06:24:34PM +0200, Blue Swirl wrote: > CVSROOT: /cvsroot/qemu > Module name: qemu > Changes by: Blue Swirl 07/04/01 16:23:36 > > Modified files: > target-sparc : translate.c > > Log message: > Fix off-by-one error > Looking at the code of this commit pointed me that my previous patch about coprocessor instructions was partly wrong. The store operation are not placed at the right place. The patch below fixes that. Index: target-sparc/translate.c =================================================================== RCS file: /sources/qemu/qemu/target-sparc/translate.c,v retrieving revision 1.44 diff -u -d -p -r1.44 translate.c --- target-sparc/translate.c 1 Apr 2007 16:23:36 -0000 1.44 +++ target-sparc/translate.c 1 Apr 2007 16:46:33 -0000 @@ -2444,10 +2443,6 @@ static void disas_sparc_insn(DisasContex case 0x30: /* ldc */ case 0x31: /* ldcsr */ case 0x33: /* lddc */ - case 0x34: /* stc */ - case 0x35: /* stcsr */ - case 0x36: /* stdcq */ - case 0x37: /* stdc */ goto ncp_insn; break; /* avoid warnings */ @@ -2612,8 +2609,8 @@ static void disas_sparc_insn(DisasContex goto illegal_insn; } } else if (xop > 0x33 && xop < 0x3f) { -#ifdef TARGET_SPARC64 switch (xop) { +#ifdef TARGET_SPARC64 case 0x34: /* V9 stfa */ gen_op_stfa(insn, 0, 0, 0); // XXX break; @@ -2628,12 +2625,16 @@ static void disas_sparc_insn(DisasContex break; case 0x36: /* V9 stqfa */ goto nfpu_insn; +#else + case 0x34: /* stc */ + case 0x35: /* stcsr */ + case 0x36: /* stdcq */ + case 0x37: /* stdc */ + goto ncp_insn; +#endif default: goto illegal_insn; } -#else - goto illegal_insn; -#endif } else goto illegal_insn; -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net