diff options
author | Nina Schoetterl-Glausch <nsg@linux.ibm.com> | 2023-03-10 12:41:56 +0100 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2023-03-13 09:23:42 +0100 |
commit | 54fce97cfcaf5463ee5f325bc1f1d4adc2772f38 (patch) | |
tree | e14ff1ebd40d5ab3e5cf96cfd3e73a91985b43ca /target/s390x/tcg/translate.c | |
parent | d4f784c51b2bd27f4d4e6759dcef9d170d8723be (diff) |
target/s390x: Fix emulation of C(G)HRL
The second operand of COMPARE HALFWORD RELATIVE LONG is a signed
halfword, it does not have the same size as the first operand.
Fixes: a7e836d5eb ("target-s390: Convert COMPARE, COMPARE LOGICAL")
Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20230310114157.3024170-2-nsg@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'target/s390x/tcg/translate.c')
-rw-r--r-- | target/s390x/tcg/translate.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 21a57d5eb2..d324c0b6f2 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -5979,6 +5979,13 @@ static void in2_m2_64a(DisasContext *s, DisasOps *o) #define SPEC_in2_m2_64a 0 #endif +static void in2_mri2_16s(DisasContext *s, DisasOps *o) +{ + o->in2 = tcg_temp_new_i64(); + tcg_gen_qemu_ld16s(o->in2, gen_ri2(s), get_mem_index(s)); +} +#define SPEC_in2_mri2_16s 0 + static void in2_mri2_16u(DisasContext *s, DisasOps *o) { o->in2 = tcg_temp_new_i64(); |