From 996ba2ccf59891a8abe188c073eab3bae1c93b90 Mon Sep 17 00:00:00 2001 From: ths Date: Mon, 25 Jun 2007 17:34:33 +0000 Subject: MIPS64 improvements, based on a patch by Aurelien Jarno. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3021 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-mips/helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'target-mips/helper.c') diff --git a/target-mips/helper.c b/target-mips/helper.c index 87a6a334e8..c1a7792f72 100644 --- a/target-mips/helper.c +++ b/target-mips/helper.c @@ -130,11 +130,11 @@ static int get_physical_address (CPUState *env, target_ulong *physical, if (address <= (int32_t)0x7FFFFFFFUL) { /* useg */ - if (!(env->CP0_Status & (1 << CP0St_ERL) && user_mode)) { - ret = env->map_address(env, physical, prot, address, rw, access_type); - } else { + if (env->CP0_Status & (1 << CP0St_ERL)) { *physical = address & 0xFFFFFFFF; *prot = PAGE_READ | PAGE_WRITE; + } else { + ret = env->map_address(env, physical, prot, address, rw, access_type); } #ifdef TARGET_MIPS64 /* -- cgit v1.2.1