|
|
1778d6 |
From da3b331c63a6aec0ec3206b1d9ca0df9bced3338 Mon Sep 17 00:00:00 2001
|
|
|
1778d6 |
From: Andreas Arnez <arnez@linux.ibm.com>
|
|
|
1778d6 |
Date: Mon, 3 Jan 2022 18:15:05 +0100
|
|
|
1778d6 |
Subject: [PATCH] s390: Fix VFLRX and WFLRX instructions
|
|
|
1778d6 |
|
|
|
1778d6 |
Due to a typo in s390_irgen_VFLR, the VFLR instruction behaves incorrectly
|
|
|
1778d6 |
when its m3 field contains 4, meaning extended format. In that case VFLR
|
|
|
1778d6 |
is also written as VFLRX (or WFLRX) and supposed to round down from the
|
|
|
1778d6 |
extended 128-bit format to the long 64-bit format. However, the typo
|
|
|
1778d6 |
checks for m3 == 2 instead, so the value of 4 is unhandled, causing
|
|
|
1778d6 |
Valgrind to throw a specification exception.
|
|
|
1778d6 |
|
|
|
1778d6 |
This fixes the typo.
|
|
|
1778d6 |
---
|
|
|
1778d6 |
VEX/priv/guest_s390_toIR.c | 2 +-
|
|
|
1778d6 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
1778d6 |
|
|
|
1778d6 |
diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c
|
|
|
1778d6 |
index fffc563d4..3ef104fcd 100644
|
|
|
1778d6 |
--- a/VEX/priv/guest_s390_toIR.c
|
|
|
1778d6 |
+++ b/VEX/priv/guest_s390_toIR.c
|
|
|
1778d6 |
@@ -19008,7 +19008,7 @@ s390_irgen_VFLL(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5)
|
|
|
1778d6 |
static const HChar *
|
|
|
1778d6 |
s390_irgen_VFLR(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5)
|
|
|
1778d6 |
{
|
|
|
1778d6 |
- s390_insn_assert("vflr", m3 == 3 || (s390_host_has_vxe && m3 == 2));
|
|
|
1778d6 |
+ s390_insn_assert("vflr", m3 == 3 || (s390_host_has_vxe && m3 == 4));
|
|
|
1778d6 |
|
|
|
1778d6 |
if (m3 == 3)
|
|
|
1778d6 |
s390_vector_fp_convert(Iop_F64toF32, Ity_F64, Ity_F32, True,
|
|
|
1778d6 |
--
|
|
|
1778d6 |
2.31.1
|
|
|
1778d6 |
|