aboutsummaryrefslogtreecommitdiff
path: root/target-mips/helper.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-25 17:34:33 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-25 17:34:33 +0000
commit996ba2ccf59891a8abe188c073eab3bae1c93b90 (patch)
tree92b839e42bbdaf9e97ece345608d2e5a5f2efc75 /target-mips/helper.c
parente04ea3dc1a6997aa0d2eb8b21170b81f9151d37d (diff)
downloadqemu-996ba2ccf59891a8abe188c073eab3bae1c93b90.zip
qemu-996ba2ccf59891a8abe188c073eab3bae1c93b90.tar.gz
qemu-996ba2ccf59891a8abe188c073eab3bae1c93b90.tar.bz2
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
Diffstat (limited to 'target-mips/helper.c')
-rw-r--r--target-mips/helper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/target-mips/helper.c b/target-mips/helper.c
index 87a6a33..c1a7792 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
/*