From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HYWd9-0003xT-F3 for qemu-devel@nongnu.org; Mon, 02 Apr 2007 20:12:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HYWd8-0003xH-3d for qemu-devel@nongnu.org; Mon, 02 Apr 2007 20:12:11 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYWd7-0003xE-Uv for qemu-devel@nongnu.org; Mon, 02 Apr 2007 20:12:09 -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 1HYWa2-0003F2-0x for qemu-devel@nongnu.org; Mon, 02 Apr 2007 20:08:58 -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 1HYWZu-000775-NA for qemu-devel@nongnu.org; Tue, 03 Apr 2007 02:08:50 +0200 Received: from aurel32 by amd64.aurel32.net with local (Exim 4.63) (envelope-from ) id 1HYWZu-0000rF-G3 for qemu-devel@nongnu.org; Tue, 03 Apr 2007 02:08:50 +0200 Date: Tue, 3 Apr 2007 02:08:50 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] qemu/target-sparc translate.c Message-ID: <20070403000850.GA2327@amd64.aurel32.net> References: <20070401165114.GA2962@amd64.aurel32.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="YZ5djTAD1cGYuMQK" Content-Disposition: inline In-Reply-To: <20070401165114.GA2962@amd64.aurel32.net> 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 --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline On Sun, Apr 01, 2007 at 06:51:14PM +0200, Aurelien Jarno wrote: > 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. Please find attached an updated patch that also handles CBN+x instructions. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=iso-8859-15 Content-Disposition: attachment; filename="sparc-qemu-cpop.diff" --- qemu.orig/target-sparc/translate.c 1 Apr 2007 16:23:36 -0000 +++ qemu/target-sparc/translate.c 2 Apr 2007 22:48:27 -0000 @@ -1012,6 +1011,11 @@ static void disas_sparc_insn(DisasContex do_fbranch(dc, target, insn, cc); goto jmp_insn; } +#else + case 0x7: /* CBN+x */ + { + goto ncp_insn; + } #endif case 0x2: /* BN+x */ { @@ -2444,10 +2448,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 +2618,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 +2634,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; --YZ5djTAD1cGYuMQK--