aboutsummaryrefslogtreecommitdiff
path: root/target-mips/helper.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-05-22 22:13:29 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-05-22 22:13:29 +0000
commit3d9fb9fefe3f4e209b57443bed18691a2c6f3e7a (patch)
tree29e744f1eb023ac8192cdb5aac773a68aa75cb6c /target-mips/helper.c
parent42fe404458731c0cf753a8d6d34d7116c08e79f7 (diff)
cosmetics (Thiemo Seufer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1936 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/helper.c')
-rw-r--r--target-mips/helper.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target-mips/helper.c b/target-mips/helper.c
index d3c64bb7e5..014f35d2d6 100644
--- a/target-mips/helper.c
+++ b/target-mips/helper.c
@@ -40,8 +40,8 @@ static int map_address (CPUState *env, target_ulong *physical, int *prot,
int ret;
ret = -2;
- tag = (address & 0xFFFFE000);
- ASID = env->CP0_EntryHi & 0x000000FF;
+ tag = address & 0xFFFFE000;
+ ASID = env->CP0_EntryHi & 0xFF;
for (i = 0; i < MIPS_TLB_NB; i++) {
tlb = &env->tlb[i];
/* Check ASID, virtual page number & size */
@@ -74,7 +74,7 @@ int get_physical_address (CPUState *env, target_ulong *physical, int *prot,
int ret;
/* User mode can only access useg */
- user_mode = ((env->hflags & MIPS_HFLAG_MODE) == MIPS_HFLAG_UM) ? 1 : 0;
+ user_mode = (env->hflags & MIPS_HFLAG_MODE) == MIPS_HFLAG_UM;
#if 0
if (logfile) {
fprintf(logfile, "user mode %d h %08x\n",
@@ -231,7 +231,7 @@ int cpu_mips_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
env->CP0_Context = (env->CP0_Context & 0xff800000) |
((address >> 9) & 0x007ffff0);
env->CP0_EntryHi =
- (env->CP0_EntryHi & 0x000000FF) | (address & 0xFFFFF000);
+ (env->CP0_EntryHi & 0xFF) | (address & 0xFFFFF000);
env->exception_index = exception;
env->error_code = error_code;
ret = 1;