summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-09 14:17:31 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-09 14:17:31 +0000
commitc090a8f4406ac674c1ae0ab4f3a789ca7dcb9720 (patch)
tree2f348ce0c7814beeb0e8425fbee8f3831e0b2ecd
parentc50da3df61eae8b0c41b7591e315aaf5e9e8d507 (diff)
downloadhqemu-c090a8f4406ac674c1ae0ab4f3a789ca7dcb9720.zip
hqemu-c090a8f4406ac674c1ae0ab4f3a789ca7dcb9720.tar.gz
Fix CP0_IntCtl handling.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2645 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--target-mips/op.c5
-rw-r--r--target-mips/translate.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/target-mips/op.c b/target-mips/op.c
index 4eb8a89..026b08a 100644
--- a/target-mips/op.c
+++ b/target-mips/op.c
@@ -1374,8 +1374,9 @@ void op_mtc0_status (void)
void op_mtc0_intctl (void)
{
- /* vectored interrupts not implemented */
- env->CP0_IntCtl = 0;
+ /* vectored interrupts not implemented, timer on int 7,
+ no performance counters. */
+ env->CP0_IntCtl |= T0 & 0x000002e0;
RETURN();
}
diff --git a/target-mips/translate.c b/target-mips/translate.c
index a1af8ab..0d9226a 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -5405,6 +5405,9 @@ void cpu_reset (CPUMIPSState *env)
/* SMP not implemented */
env->CP0_EBase = 0x80000000;
env->CP0_Status = (1 << CP0St_BEV) | (1 << CP0St_ERL);
+ /* vectored interrupts not implemented, timer on int 7,
+ no performance counters. */
+ env->CP0_IntCtl = 0xe0000000;
env->CP0_WatchLo = 0;
env->CP0_WatchHi = 0;
/* Count register increments in debug mode, EJTAG version 1 */
OpenPOWER on IntegriCloud