From: Aurelien Jarno Date: Sat, 15 Jan 2011 12:50:38 +0000 (+0100) Subject: target-sh4: correct use of ! and & X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~6666 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c16e71e6a96a91e65c2a2e7b14b86423a21dd94;p=sdk%2Femulator%2Fqemu.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 Signed-off-by: Aurelien Jarno --- diff --git a/target-sh4/helper.c b/target-sh4/helper.c index 2343366..45449ea 100644 --- a/target-sh4/helper.c +++ b/target-sh4/helper.c @@ -380,7 +380,7 @@ static int get_mmu_address(CPUState * env, target_ulong * physical, MMU_DTLB_VIOLATION_READ; } else if ((rw == 1) && !(matching->pr & 1)) { n = MMU_DTLB_VIOLATION_WRITE; - } else if ((rw == 1) & !matching->d) { + } else if ((rw == 1) && !matching->d) { n = MMU_DTLB_INITIAL_WRITE; } else { *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 (!env->mmucr & MMUCR_AT) { + if (!(env->mmucr & MMUCR_AT)) { *physical = address & 0x1FFFFFFF; *prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC; return MMU_OK;