From: Blue Swirl <blauwirbel@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4918] Use MMU globals for some MMU traps
Date: Mon, 21 Jul 2008 18:43:33 +0000 [thread overview]
Message-ID: <E1KL0M9-0005H6-7S@cvs.savannah.gnu.org> (raw)
Revision: 4918
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4918
Author: blueswir1
Date: 2008-07-21 18:43:32 +0000 (Mon, 21 Jul 2008)
Log Message:
-----------
Use MMU globals for some MMU traps
Modified Paths:
--------------
trunk/target-sparc/cpu.h
trunk/target-sparc/helper.c
Modified: trunk/target-sparc/cpu.h
===================================================================
--- trunk/target-sparc/cpu.h 2008-07-21 11:17:23 UTC (rev 4917)
+++ trunk/target-sparc/cpu.h 2008-07-21 18:43:32 UTC (rev 4918)
@@ -61,12 +61,13 @@
#define TT_DIV_ZERO 0x28
#define TT_DFAULT 0x30
#define TT_DATA_ACCESS 0x32
-#define TT_DPROT 0x33
#define TT_UNALIGNED 0x34
#define TT_PRIV_ACT 0x37
#define TT_EXTINT 0x40
+#define TT_IVEC 0x60
#define TT_TMISS 0x64
#define TT_DMISS 0x68
+#define TT_DPROT 0x6c
#define TT_SPILL 0x80
#define TT_FILL 0xc0
#define TT_WOTHER 0x10
Modified: trunk/target-sparc/helper.c
===================================================================
--- trunk/target-sparc/helper.c 2008-07-21 11:17:23 UTC (rev 4917)
+++ trunk/target-sparc/helper.c 2008-07-21 18:43:32 UTC (rev 4918)
@@ -758,9 +758,23 @@
env->tsptr->tpc = env->pc;
env->tsptr->tnpc = env->npc;
env->tsptr->tt = intno;
- if (!(env->features & CPU_FEATURE_GL))
- change_pstate(PS_PEF | PS_PRIV | PS_AG);
-
+ if (!(env->features & CPU_FEATURE_GL)) {
+ switch (intno) {
+ case TT_IVEC:
+ change_pstate(PS_PEF | PS_PRIV | PS_IG);
+ break;
+ case TT_TFAULT:
+ case TT_TMISS:
+ case TT_DFAULT:
+ case TT_DMISS:
+ case TT_DPROT:
+ change_pstate(PS_PEF | PS_PRIV | PS_MG);
+ break;
+ default:
+ change_pstate(PS_PEF | PS_PRIV | PS_AG);
+ break;
+ }
+ }
if (intno == TT_CLRWIN)
cpu_set_cwp(env, cpu_cwp_dec(env, env->cwp - 1));
else if ((intno & 0x1c0) == TT_SPILL)
reply other threads:[~2008-07-21 18:43 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=E1KL0M9-0005H6-7S@cvs.savannah.gnu.org \
--to=blauwirbel@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).