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
This commit is contained in:
ths 2007-06-25 17:34:33 +00:00
parent e04ea3dc1a
commit 996ba2ccf5
2 changed files with 5 additions and 5 deletions

View File

@ -130,11 +130,11 @@ static int get_physical_address (CPUState *env, target_ulong *physical,
if (address <= (int32_t)0x7FFFFFFFUL) { if (address <= (int32_t)0x7FFFFFFFUL) {
/* useg */ /* useg */
if (!(env->CP0_Status & (1 << CP0St_ERL) && user_mode)) { if (env->CP0_Status & (1 << CP0St_ERL)) {
ret = env->map_address(env, physical, prot, address, rw, access_type);
} else {
*physical = address & 0xFFFFFFFF; *physical = address & 0xFFFFFFFF;
*prot = PAGE_READ | PAGE_WRITE; *prot = PAGE_READ | PAGE_WRITE;
} else {
ret = env->map_address(env, physical, prot, address, rw, access_type);
} }
#ifdef TARGET_MIPS64 #ifdef TARGET_MIPS64
/* /*

View File

@ -297,7 +297,7 @@ void op_addr_add (void)
with Status_UX = 0 should be casted to 32-bit and sign extended. with Status_UX = 0 should be casted to 32-bit and sign extended.
See the MIPS64 PRA manual, section 4.10. */ See the MIPS64 PRA manual, section 4.10. */
#ifdef TARGET_MIPS64 #ifdef TARGET_MIPS64
if ((env->CP0_Status & (1 << CP0St_UM)) && if ((env->hflags & MIPS_HFLAG_UM) &&
!(env->CP0_Status & (1 << CP0St_UX))) !(env->CP0_Status & (1 << CP0St_UX)))
T0 = (int64_t)(int32_t)(T0 + T1); T0 = (int64_t)(int32_t)(T0 + T1);
else else
@ -1608,7 +1608,7 @@ void op_dmfc0_errorepc (void)
void op_cp0_enabled(void) void op_cp0_enabled(void)
{ {
if (!(env->CP0_Status & (1 << CP0St_CU0)) && if (!(env->CP0_Status & (1 << CP0St_CU0)) &&
(env->hflags & MIPS_HFLAG_UM)) { (env->hflags & MIPS_HFLAG_UM)) {
CALL_FROM_TB2(do_raise_exception_err, EXCP_CpU, 0); CALL_FROM_TB2(do_raise_exception_err, EXCP_CpU, 0);
} }
RETURN(); RETURN();