Message ID | 20240217015811.1975411-1-linux@roeck-us.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] target: hppa: Fix unaligned double word accesses for hppa64 | expand |
diff --git a/target/hppa/helper.c b/target/hppa/helper.c index 859644c47a..9d217d051c 100644 --- a/target/hppa/helper.c +++ b/target/hppa/helper.c @@ -76,7 +76,8 @@ void cpu_hppa_put_psw(CPUHPPAState *env, target_ulong psw) } psw &= ~reserved; - env->psw = psw & ~(PSW_N | PSW_V | PSW_CB); + env->psw = psw & (uint32_t)~(PSW_N | PSW_V | PSW_CB); + env->psw_n = (psw / PSW_N) & 1; env->psw_v = -((psw / PSW_V) & 1);