On 2/15/24 22:16, Richard Henderson wrote:
On 2/15/24 19:34, Guenter Roeck wrote:
-    env->psw = psw & ~(PSW_N | PSW_V | PSW_CB);
+    if (hppa_is_pa20(env)) {
+        env->psw = psw & ~(PSW_N | PSW_V | PSW_CB | 0xff00000000ull);
+    } else {
+        env->psw = psw & ~(PSW_N | PSW_V | PSW_CB);
+    }

There are never any bits above 31 set in env->psw, because all of the CB bits are 
supposed to be stored in env->psw_cb.  Thus

   env->psw = psw & (uint32_t)~(...)

with no need for the pa20 check.

With that,

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>


sgtm. I'll test that and send v2 tomorrow (it is getting late).

Thanks,
Guenter




Reply via email to