https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=fc40fe4f6472fef88ef78515782deb24e585aea3
commit fc40fe4f6472fef88ef78515782deb24e585aea3
Author: Florian Krohm <fl...@ei...>
Date: Sat Mar 22 18:51:04 2025 +0000
s390x: Fix BZ 498632
IR generation for LNGFR was broken. Now fixed.
Fixes https://bugs.kde.org/show_bug.cgi?id=498632
Diff:
---
NEWS | 1 +
VEX/priv/guest_s390_toIR.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index 741ea73191..4ae8bde25e 100644
--- a/NEWS
+++ b/NEWS
@@ -55,6 +55,7 @@ are not entered into bugzilla tend to get forgotten about or ignored.
even though it's generated by --gen-suppressions=yes
498422 s390x: Fix VLRL and VSTRL insns
498492 none/tests/amd64/lzcnt64 crashes on FreeBSD compiled with clang
+498632 s390x: Fix LNGFR insn
498942 s390x: Rework s390_disasm interface
499183 FreeBSD: differences in avx-vmovq output
499212 mmap() with MAP_ALIGNED() returns unaligned pointer
diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c
index db8cea1e8a..3bebca53a0 100644
--- a/VEX/priv/guest_s390_toIR.c
+++ b/VEX/priv/guest_s390_toIR.c
@@ -8477,12 +8477,12 @@ s390_irgen_LNGR(UChar r1, UChar r2)
}
static const HChar *
-s390_irgen_LNGFR(UChar r1, UChar r2 __attribute__((unused)))
+s390_irgen_LNGFR(UChar r1, UChar r2)
{
IRTemp op2 = newTemp(Ity_I64);
IRTemp result = newTemp(Ity_I64);
- assign(op2, unop(Iop_32Sto64, get_gpr_w1(r1)));
+ assign(op2, unop(Iop_32Sto64, get_gpr_w1(r2)));
assign(result, mkite(binop(Iop_CmpLE64S, mkexpr(op2), mkU64(0)), mkexpr(op2),
binop(Iop_Sub64, mkU64(0), mkexpr(op2))));
put_gpr_dw0(r1, mkexpr(result));
|