On Sun, Apr 01, 2007 at 06:24:34PM +0200, Blue Swirl wrote: > CVSROOT: /cvsroot/qemu > Module name: qemu > Changes by: Blue Swirl <blueswir1> 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 `. `' [EMAIL PROTECTED] | [EMAIL PROTECTED] `- people.debian.org/~aurel32 | www.aurel32.net