qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: <gerg@snapgear.com>
To: qemu-devel@nongnu.org, paul@codesourcery.com
Cc: Greg Ungerer <gerg@uclinux.org>
Subject: [Qemu-devel] [PATCH v2] m68k: implement move to/from usp register instruction
Date: Fri, 14 Sep 2012 09:37:55 +1000	[thread overview]
Message-ID: <1347579475-9293-1-git-send-email-gerg@snapgear.com> (raw)

From: Greg Ungerer <gerg@uclinux.org>

Fill out the code support for the move to/from usp instructions. They are
being decoded, but there is no code to support their actions. So add it.

Current versions of Linux running on the ColdFire 5208 use these instructions.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
 target-m68k/translate.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 9fc1e31..7b55747 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -1980,8 +1980,8 @@ DISAS_INSN(move_from_usp)
         gen_exception(s, s->pc - 2, EXCP_PRIVILEGE);
         return;
     }
-    /* TODO: Implement USP.  */
-    gen_exception(s, s->pc - 2, EXCP_ILLEGAL);
+    tcg_gen_ld_i32(AREG(insn, 0), cpu_env,
+                   offsetof(CPUM68KState, sp[M68K_USP]));
 }
 
 DISAS_INSN(move_to_usp)
@@ -1990,8 +1990,8 @@ DISAS_INSN(move_to_usp)
         gen_exception(s, s->pc - 2, EXCP_PRIVILEGE);
         return;
     }
-    /* TODO: Implement USP.  */
-    gen_exception(s, s->pc - 2, EXCP_ILLEGAL);
+    tcg_gen_st_i32(AREG(insn, 0), cpu_env,
+                   offsetof(CPUM68KState, sp[M68K_USP]));
 }
 
 DISAS_INSN(halt)
-- 
1.7.0.4

             reply	other threads:[~2012-09-13 23:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-13 23:37 gerg [this message]
2012-09-14 19:38 ` [Qemu-devel] [PATCH v2] m68k: implement move to/from usp register instruction Richard Henderson

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=1347579475-9293-1-git-send-email-gerg@snapgear.com \
    --to=gerg@snapgear.com \
    --cc=gerg@uclinux.org \
    --cc=paul@codesourcery.com \
    --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).