qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [5074] sh4: fix tas.b @Rn instruction
Date: Fri, 22 Aug 2008 21:30:29 +0000	[thread overview]
Message-ID: <E1KWeDF-0000Cg-0w@cvs.savannah.gnu.org> (raw)

Revision: 5074
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5074
Author:   aurel32
Date:     2008-08-22 21:30:28 +0000 (Fri, 22 Aug 2008)

Log Message:
-----------
sh4: fix tas.b @Rn instruction

(Shin-ichiro KAWASAKI, based on a patch from Andrzej Zaborowski)

Modified Paths:
--------------
    trunk/target-sh4/op.c
    trunk/target-sh4/translate.c

Modified: trunk/target-sh4/op.c
===================================================================
--- trunk/target-sh4/op.c	2008-08-22 21:25:00 UTC (rev 5073)
+++ trunk/target-sh4/op.c	2008-08-22 21:30:28 UTC (rev 5074)
@@ -592,13 +592,6 @@
     RETURN();
 }
 
-void OPPROTO op_tasb_rN(void)
-{
-    cond_t((env->gregs[PARAM1] & 0xff) == 0);
-    *(int8_t *) &env->gregs[PARAM1] |= 0x80;
-    RETURN();
-}
-
 void OPPROTO op_movl_T0_rN(void)
 {
     env->gregs[PARAM1] = T0;

Modified: trunk/target-sh4/translate.c
===================================================================
--- trunk/target-sh4/translate.c	2008-08-22 21:25:00 UTC (rev 5073)
+++ trunk/target-sh4/translate.c	2008-08-22 21:30:28 UTC (rev 5074)
@@ -1100,7 +1100,12 @@
 	gen_op_shlr16_Rn(REG(B11_8));
 	return;
     case 0x401b:		/* tas.b @Rn */
-	gen_op_tasb_rN(REG(B11_8));
+	gen_op_movl_rN_T0(REG(B11_8));
+	gen_op_movl_T0_T1();
+	gen_op_ldub_T0_T0(ctx);
+	gen_op_cmp_eq_imm_T0(0);
+	gen_op_or_imm_T0(0x80);
+	gen_op_stb_T0_T1(ctx);
 	return;
     case 0xf00d: /* fsts FPUL,FRn - FPSCR: Nothing */
 	gen_op_movl_fpul_FT0();

                 reply	other threads:[~2008-08-22 21:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E1KWeDF-0000Cg-0w@cvs.savannah.gnu.org \
    --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).