aboutsummaryrefslogtreecommitdiff
path: root/target-mips/op.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-17 15:26:47 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-17 15:26:47 +0000
commitfcb4a419f52e538b68510a68f30d8834dd211155 (patch)
treedde98a86a29d51b875dba98d448e1ae18c0f691d /target-mips/op.c
parent04f20795ac815cf3ad5d1fdc99462f60eb871f25 (diff)
Choose number of TLBs at runtime, by Herve Poussineau.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2693 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/op.c')
-rw-r--r--target-mips/op.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target-mips/op.c b/target-mips/op.c
index 08ef2281f1..0b5e8bacb5 100644
--- a/target-mips/op.c
+++ b/target-mips/op.c
@@ -1270,7 +1270,7 @@ void op_mfc0_desave (void)
void op_mtc0_index (void)
{
- env->CP0_Index = (env->CP0_Index & 0x80000000) | (T0 & (MIPS_TLB_NB - 1));
+ env->CP0_Index = (env->CP0_Index & 0x80000000) | (T0 % env->nb_tlb);
RETURN();
}
@@ -1314,7 +1314,7 @@ void op_mtc0_pagegrain (void)
void op_mtc0_wired (void)
{
- env->CP0_Wired = T0 & (MIPS_TLB_NB - 1);
+ env->CP0_Wired = T0 % env->nb_tlb;
RETURN();
}