mirror of https://gitee.com/openkylin/qemu.git
target-sh4: correct use of ! and &
Fix wrong usage of ! and & in MMU related functions. Thanks to Blue Swirl for reporting the issue. Reported-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
2d5b50749a
commit
0c16e71e6a
|
@ -380,7 +380,7 @@ static int get_mmu_address(CPUState * env, target_ulong * physical,
|
||||||
MMU_DTLB_VIOLATION_READ;
|
MMU_DTLB_VIOLATION_READ;
|
||||||
} else if ((rw == 1) && !(matching->pr & 1)) {
|
} else if ((rw == 1) && !(matching->pr & 1)) {
|
||||||
n = MMU_DTLB_VIOLATION_WRITE;
|
n = MMU_DTLB_VIOLATION_WRITE;
|
||||||
} else if ((rw == 1) & !matching->d) {
|
} else if ((rw == 1) && !matching->d) {
|
||||||
n = MMU_DTLB_INITIAL_WRITE;
|
n = MMU_DTLB_INITIAL_WRITE;
|
||||||
} else {
|
} else {
|
||||||
*prot = PAGE_READ;
|
*prot = PAGE_READ;
|
||||||
|
@ -430,7 +430,7 @@ static int get_physical_address(CPUState * env, target_ulong * physical,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If MMU is disabled, return the corresponding physical page */
|
/* If MMU is disabled, return the corresponding physical page */
|
||||||
if (!env->mmucr & MMUCR_AT) {
|
if (!(env->mmucr & MMUCR_AT)) {
|
||||||
*physical = address & 0x1FFFFFFF;
|
*physical = address & 0x1FFFFFFF;
|
||||||
*prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
|
*prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
|
||||||
return MMU_OK;
|
return MMU_OK;
|
||||||
|
|
Loading…
Reference in New Issue