mirror of https://gitee.com/openkylin/qemu.git
target/s390x: Do not modify cpu state in s390_cpu_get_psw_mask
We want to use this function for debugging, and debug should not modify cpu state (even non-architectural cpu state) lest we introduce heisenbugs. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Tested-by: jonathan.albrecht <jonathan.albrecht@linux.vnet.ibm.com> Tested-by: <ruixin.bao@ibm.com> Message-Id: <20210615030744.1252385-3-richard.henderson@linaro.org> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
This commit is contained in:
parent
e2b2a8649b
commit
3c11c2ebb0
|
@ -321,12 +321,12 @@ uint64_t s390_cpu_get_psw_mask(CPUS390XState *env)
|
|||
uint64_t r = env->psw.mask;
|
||||
|
||||
if (tcg_enabled()) {
|
||||
env->cc_op = calc_cc(env, env->cc_op, env->cc_src, env->cc_dst,
|
||||
env->cc_vr);
|
||||
uint64_t cc = calc_cc(env, env->cc_op, env->cc_src,
|
||||
env->cc_dst, env->cc_vr);
|
||||
|
||||
assert(cc <= 3);
|
||||
r &= ~PSW_MASK_CC;
|
||||
assert(!(env->cc_op & ~3));
|
||||
r |= (uint64_t)env->cc_op << 44;
|
||||
r |= cc << 44;
|
||||
}
|
||||
|
||||
return r;
|
||||
|
|
Loading…
Reference in New Issue