qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu/target-sparc translate.c
Date: Tue, 3 Apr 2007 02:08:50 +0200	[thread overview]
Message-ID: <20070403000850.GA2327@amd64.aurel32.net> (raw)
In-Reply-To: <20070401165114.GA2962@amd64.aurel32.net>

[-- Attachment #1: Type: text/plain, Size: 871 bytes --]

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
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

[-- Attachment #2: sparc-qemu-cpop.diff --]
[-- Type: text/x-diff, Size: 1368 bytes --]

--- 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;

  reply	other threads:[~2007-04-03  0:12 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-01 16:24 [Qemu-devel] qemu/target-sparc translate.c Blue Swirl
2007-04-01 16:51 ` Aurelien Jarno
2007-04-03  0:08   ` Aurelien Jarno [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-03-30 16:49 Blue Swirl
2008-03-29 20:39 Blue Swirl
2008-03-29 20:38 Blue Swirl
2008-03-29  9:09 Blue Swirl
2008-03-29  9:03 Blue Swirl
2008-03-29  8:59 Blue Swirl
2008-03-26 20:47 Blue Swirl
2008-03-26 20:45 Blue Swirl
2008-03-26 20:45 Blue Swirl
2008-03-24 17:47 Blue Swirl
2008-03-23 11:50 Blue Swirl
2008-03-22  8:40 Blue Swirl
2008-03-18 18:09 Blue Swirl
2008-03-16 19:23 Blue Swirl
2008-03-16 19:18 Blue Swirl
2008-03-15 18:12 Blue Swirl
2008-03-14 21:09 Blue Swirl
2008-03-14 17:35 Blue Swirl
2008-03-13 20:47 Blue Swirl
2008-03-11 20:59 Blue Swirl
2008-03-06 16:13 Blue Swirl
2008-03-04 19:56 Blue Swirl
2007-11-25 20:27 Blue Swirl
2007-11-10  9:32 Blue Swirl
2007-11-09 19:08 Blue Swirl
2007-10-17 17:34 Blue Swirl
2007-10-03 17:46 Blue Swirl
2007-09-30 16:37 Blue Swirl
2007-07-08 19:48 Blue Swirl
2007-07-04 20:22 Blue Swirl
2007-06-25 19:52 Blue Swirl
2007-06-10 20:26 Blue Swirl
2007-05-07 17:01 Blue Swirl
2007-04-29 19:54 Blue Swirl
2007-04-29 19:49 Blue Swirl
2007-04-22 12:45 Blue Swirl
2007-04-06 20:04 Blue Swirl
2007-04-05 18:10 Blue Swirl
2007-04-01 15:18 Blue Swirl
2007-03-25  9:25 Blue Swirl
2006-06-25 15:33 Fabrice Bellard
2006-06-23 21:01 Fabrice Bellard
2006-06-21 18:26 Fabrice Bellard
2006-06-18 19:36 Paul Brook
2006-06-14 12:37 Fabrice Bellard
2005-11-21 23:33 Fabrice Bellard
2005-11-20 10:32 Fabrice Bellard
2005-04-10 14:40 Fabrice Bellard
2005-01-28  0:01 Fabrice Bellard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070403000850.GA2327@amd64.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).