aboutsummaryrefslogtreecommitdiff
path: root/target-mips/op.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-11 02:13:00 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-11 02:13:00 +0000
commit534ce69ff05bee2448419f9cad796d6511bc1f9a (patch)
tree2cdc711dc1e8643b9ab7d29a1dab08412457218c /target-mips/op.c
parente9df014c0b433ecd9785db4a423e472bc3db386a (diff)
More Context/Xcontext fixes. Ifdef some 64bit-only ops, they may
end up empty for 32bit mips, which dyngen trips over. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2648 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/op.c')
-rw-r--r--target-mips/op.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/target-mips/op.c b/target-mips/op.c
index 026b08ab6f..9818847fe3 100644
--- a/target-mips/op.c
+++ b/target-mips/op.c
@@ -1293,7 +1293,7 @@ void op_mtc0_entrylo1 (void)
void op_mtc0_context (void)
{
- env->CP0_Context = (env->CP0_Context & ~0x007FFFFF) | (T0 & ~0x007FFFFF);
+ env->CP0_Context = (env->CP0_Context & 0x007FFFFF) | (T0 & ~0x007FFFFF);
RETURN();
}
@@ -1458,12 +1458,6 @@ void op_mtc0_watchhi0 (void)
RETURN();
}
-void op_mtc0_xcontext (void)
-{
- env->CP0_XContext = (int32_t)T0; /* XXX */
- RETURN();
-}
-
void op_mtc0_framemask (void)
{
env->CP0_Framemask = T0; /* XXX */
@@ -1528,6 +1522,7 @@ void op_mtc0_desave (void)
RETURN();
}
+#ifdef TARGET_MIPS64
void op_dmfc0_entrylo0 (void)
{
T0 = env->CP0_EntryLo0;
@@ -1612,7 +1607,7 @@ void op_dmtc0_entrylo1 (void)
void op_dmtc0_context (void)
{
- env->CP0_Context = (env->CP0_Context & ~0x007FFFFF) | (T0 & 0x007FFFF0);
+ env->CP0_Context = (env->CP0_Context & 0x007FFFFF) | (T0 & ~0x007FFFFF);
RETURN();
}
@@ -1632,7 +1627,7 @@ void op_dmtc0_watchlo0 (void)
void op_dmtc0_xcontext (void)
{
- env->CP0_XContext = T0; /* XXX */
+ env->CP0_XContext = (env->CP0_XContext & 0xffffffff) | (T0 & ~0xffffffff);
RETURN();
}
@@ -1647,6 +1642,7 @@ void op_dmtc0_errorepc (void)
env->CP0_ErrorEPC = T0;
RETURN();
}
+#endif /* TARGET_MIPS64 */
#if 0
# define DEBUG_FPU_STATE() CALL_FROM_TB1(dump_fpu, env)