From: gerg@uclinux.org
To: qemu-devel@nongnu.org
Cc: Greg Ungerer <gerg@uclinux.org>
Subject: [Qemu-devel] [PATCH 2/3] m68k: implement move to/from usp register instruction
Date: Tue, 19 Aug 2014 15:37:06 +1000 [thread overview]
Message-ID: <1408426627-12071-3-git-send-email-gerg@uclinux.org> (raw)
In-Reply-To: <1408426627-12071-1-git-send-email-gerg@uclinux.org>
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 there actions. So add it.
Current versions of Linux running on the ColdFire 5208 use these instructions.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
---
target-m68k/translate.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index efd4cfc..5a6666a 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -1995,8 +1995,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)
@@ -2005,8 +2005,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.9.1
next prev parent reply other threads:[~2014-08-19 5:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-19 5:37 [Qemu-devel] [PATCH 0/3] m68k: fix coldfire linux problems gerg
2014-08-19 5:37 ` [Qemu-devel] [PATCH 1/3] m68k: implmenent more ColdFire 5208 interrupt controller functionality gerg
2015-06-19 5:24 ` Peter Crosthwaite
2015-06-19 6:04 ` Greg Ungerer
2014-08-19 5:37 ` gerg [this message]
2014-08-19 5:37 ` [Qemu-devel] [PATCH 3/3] m68k: fix usp processing on interrupt entry and exception exit gerg
2015-06-19 5:49 ` Peter Crosthwaite
2015-06-19 6:49 ` Greg Ungerer
2015-06-19 6:51 ` Peter Crosthwaite
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=1408426627-12071-3-git-send-email-gerg@uclinux.org \
--to=gerg@uclinux.org \
--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).