[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 30/37] target/s390x: Do not modify cpu state in s390_cpu_get_psw_m
From: |
Cornelia Huck |
Subject: |
[PULL 30/37] target/s390x: Do not modify cpu state in s390_cpu_get_psw_mask |
Date: |
Mon, 21 Jun 2021 11:58:35 +0200 |
From: Richard Henderson <richard.henderson@linaro.org>
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>
---
target/s390x/helper.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target/s390x/helper.c b/target/s390x/helper.c
index d311903b94ca..559fc3573fe3 100644
--- a/target/s390x/helper.c
+++ b/target/s390x/helper.c
@@ -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;
--
2.31.1
- [PULL 21/37] s390x/tcg: Implement 32/128 bit for VECTOR FP TEST DATA CLASS IMMEDIATE, (continued)
- [PULL 21/37] s390x/tcg: Implement 32/128 bit for VECTOR FP TEST DATA CLASS IMMEDIATE, Cornelia Huck, 2021/06/21
- [PULL 20/37] s390x/tcg: Implement 32/128 bit for VECTOR FP PERFORM SIGN OPERATION, Cornelia Huck, 2021/06/21
- [PULL 23/37] s390x/tcg: Implement VECTOR FP NEGATIVE MULTIPLY AND (ADD|SUBTRACT), Cornelia Huck, 2021/06/21
- [PULL 24/37] s390x/tcg: Implement VECTOR FP (MAXIMUM|MINIMUM), Cornelia Huck, 2021/06/21
- [PULL 22/37] s390x/tcg: Implement 32/128 bit for VECTOR FP MULTIPLY AND (ADD|SUBTRACT), Cornelia Huck, 2021/06/21
- [PULL 25/37] linux-user: elf: s390x: Prepare for Vector enhancements facility, Cornelia Huck, 2021/06/21
- [PULL 27/37] s390x/cpumodel: Bump up QEMU model to a stripped-down IBM z14 GA2, Cornelia Huck, 2021/06/21
- [PULL 26/37] s390x/tcg: We support Vector enhancements facility, Cornelia Huck, 2021/06/21
- [PULL 28/37] configure: Check whether we can compile the s390-ccw bios with -msoft-float, Cornelia Huck, 2021/06/21
- [PULL 29/37] target/s390x: Expose load_psw and get_psw_mask to cpu.h, Cornelia Huck, 2021/06/21
- [PULL 30/37] target/s390x: Do not modify cpu state in s390_cpu_get_psw_mask,
Cornelia Huck <=
- [PULL 31/37] target/s390x: Improve s390_cpu_dump_state vs cc_op, Cornelia Huck, 2021/06/21
- [PULL 32/37] target/s390x: Use s390_cpu_{set_psw, get_psw_mask} in gdbstub, Cornelia Huck, 2021/06/21
- [PULL 35/37] s390x/css: Split out the IRB sense data, Cornelia Huck, 2021/06/21
- [PULL 33/37] linux-user/s390x: Save and restore psw.mask properly, Cornelia Huck, 2021/06/21
- [PULL 34/37] s390x/css: Introduce an ESW struct, Cornelia Huck, 2021/06/21
- [PULL 36/37] s390x/css: Refactor IRB construction, Cornelia Huck, 2021/06/21
- [PULL 37/37] s390x/css: Add passthrough IRB, Cornelia Huck, 2021/06/21
- Re: [PULL 00/37] s390x update, no-reply, 2021/06/21
- Re: [PULL 00/37] s390x update, Peter Maydell, 2021/06/22