diff options
author | David Hildenbrand <david@redhat.com> | 2021-01-11 17:38:45 +0100 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2021-01-21 11:19:45 +0100 |
commit | e312fa1d78a2387c2ca1f40b88b29d9fdca4dbfc (patch) | |
tree | 07cf1555025ffc03cb77fb771e60b0e17027ce7a /target/s390x | |
parent | d944293d9ab0b8338fbc681e6e5d8ac7829a702f (diff) | |
download | qemu-e312fa1d78a2387c2ca1f40b88b29d9fdca4dbfc.zip qemu-e312fa1d78a2387c2ca1f40b88b29d9fdca4dbfc.tar.gz qemu-e312fa1d78a2387c2ca1f40b88b29d9fdca4dbfc.tar.bz2 |
s390x/tcg: Ignore register content if b1/b2 is zero when handling EXECUTE
In our EXECUTE fast path, we have to ignore the content of r0, if
specified by b1 or b2.
Fixes: d376f123c7de ("target/s390x: Re-implement a few EXECUTE target insns directly")
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20210111163845.18148-6-david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x')
-rw-r--r-- | target/s390x/mem_helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 0108611..1901e9d 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/mem_helper.c @@ -2473,8 +2473,8 @@ void HELPER(ex)(CPUS390XState *env, uint32_t ilen, uint64_t r1, uint64_t addr) uint32_t d1 = extract64(insn, 32, 12); uint32_t b2 = extract64(insn, 28, 4); uint32_t d2 = extract64(insn, 16, 12); - uint64_t a1 = wrap_address(env, env->regs[b1] + d1); - uint64_t a2 = wrap_address(env, env->regs[b2] + d2); + uint64_t a1 = wrap_address(env, (b1 ? env->regs[b1] : 0) + d1); + uint64_t a2 = wrap_address(env, (b2 ? env->regs[b2] : 0) + d2); env->cc_op = helper(env, l, a1, a2, 0); env->psw.addr += ilen; |