From: Bryce Lanham <blanham@gmail.com>
To: qemu-devel@nongnu.org
Cc: Bryce Lanham <blanham@gmail.com>
Subject: [Qemu-devel] [PATCH 6/8] adds SFC, DFC, MMU TC, access control register, and user stack pointer acces to movec_to/from
Date: Wed, 17 Aug 2011 17:09:10 -0500 [thread overview]
Message-ID: <1313618952-14774-8-git-send-email-blanham@gmail.com> (raw)
In-Reply-To: <1313618952-14774-1-git-send-email-blanham@gmail.com>
Signed-off-by: Bryce Lanham <blanham@gmail.com>
---
target-m68k/helper.c | 44 ++++++++++++++++++++++++++++++++++++--------
1 files changed, 36 insertions(+), 8 deletions(-)
diff --git a/target-m68k/helper.c b/target-m68k/helper.c
index 71294c0..5fa5b06 100644
--- a/target-m68k/helper.c
+++ b/target-m68k/helper.c
@@ -480,9 +480,25 @@ void HELPER(movec_to)(CPUM68KState * env, uint32_t reg, uint32_t val)
env->cacr = val;
m68k_switch_sp(env);
break;
- case 0x04: case 0x05: case 0x06: case 0x07: /* ACR[0-3] */
- /* TODO: Implement Access Control Registers. */
- break;
+ case 0x03: /* MMU Translation Control */
+ env->mmu.tc = val;
+ break;
+ /*Translation/Access Control Registers*/
+ case 0x04:
+ env->itt0 = val;
+ return;
+ case 0x05:
+ env->itt1 = val;
+ break;
+ case 0x06:
+ env->dtt0 = val;
+ break;
+ case 0x07:
+ env->dtt1 = val;
+ break;
+ case 0x800: /* USP */
+ env->sp[M68K_USP] = val;
+ break;
case 0x801: /* VBR */
env->vbr = val;
break;
@@ -496,14 +512,26 @@ void HELPER(movec_to)(CPUM68KState * env, uint32_t reg, uint32_t val)
uint32_t HELPER(movec_from)(CPUM68KState * env, uint32_t reg)
{
switch (reg) {
+ case 0x00: /* SFC */
+ return env->sfc;
+ case 0x01: /* DFC */
+ return env->dfc;
case 0x02: /* CACR */
- return env->cacr;
- case 0x04: case 0x05: case 0x06: case 0x07: /* ACR[0-3] */
- /* TODO: Implement Access Control Registers. */
- return 0;
+ return env->cacr;
+ case 0x03: /*MMU TC*/
+ return env->mmu.tc;
+ case 0x04:
+ return env->itt0;
+ case 0x05:
+ return env->itt1;
+ case 0x06:
+ return env->dtt0;
+ case 0x07:
+ return env->dtt1;
+ case 0x800:/*USP*/
+ return env->sp[M68K_USP];
case 0x801: /* VBR */
return env->vbr;
- break;
/* TODO: Implement control registers. */
default:
cpu_abort(env, "Unimplemented control register read 0x%x\n",
--
1.7.2.3
next prev parent reply other threads:[~2011-08-17 22:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-17 22:09 [Qemu-devel] [RFC][PATCH 0/8] NeXT black hardware support Bryce Lanham
2011-08-17 22:09 ` [Qemu-devel] [PATCH 0/8] *** SUBJECT HERE *** Bryce Lanham
2011-08-19 13:19 ` Laurent Vivier
2011-08-17 22:09 ` [Qemu-devel] [PATCH 1/8] added next source files to Makefile.target Bryce Lanham
2011-08-21 22:31 ` Andreas Färber
2011-08-17 22:09 ` [Qemu-devel] [PATCH 2/8] main next driver, needs a bit of cleanup Bryce Lanham
2011-08-17 22:09 ` [Qemu-devel] [PATCH 3/8] next framebuffer driver, very basic, only supports running under 32 bit color at the moment Bryce Lanham
2011-08-17 22:09 ` [Qemu-devel] [PATCH 4/8] next keyboard driver, only supports a subset of modifier keys Bryce Lanham
2011-08-17 22:09 ` [Qemu-devel] [PATCH 5/8] partially working network driver, needs more comparison with real hardware before it can be made fully working Bryce Lanham
2011-08-17 22:09 ` Bryce Lanham [this message]
2011-08-17 22:09 ` [Qemu-devel] [PATCH 7/8] added move16, cinva, pflush instructions, and disabled abort on execution of frestore/fsave Bryce Lanham
2011-08-17 22:09 ` [Qemu-devel] [PATCH 8/8] added mmu tc, sfc, dfc, and access control registers to the cpu header Bryce Lanham
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=1313618952-14774-8-git-send-email-blanham@gmail.com \
--to=blanham@gmail.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).