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 <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.
Please find attached an updated patch that also handles CBN+x instructions. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [EMAIL PROTECTED] | [EMAIL PROTECTED] `- people.debian.org/~aurel32 | www.aurel32.net
--- 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;