]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390x: Fix BZ 498632
authorFlorian Krohm <flo2030@eich-krohm.de>
Sat, 22 Mar 2025 18:51:04 +0000 (18:51 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Sat, 22 Mar 2025 18:51:04 +0000 (18:51 +0000)
IR generation for LNGFR was broken. Now fixed.

Fixes https://bugs.kde.org/show_bug.cgi?id=498632

NEWS
VEX/priv/guest_s390_toIR.c

diff --git a/NEWS b/NEWS
index 741ea7319157661411730ce0f2477650215094da..4ae8bde25eddf483157e77d9085038e02ffe28d7 100644 (file)
--- 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
index db8cea1e8aae482ee28ddaff03091c6d92d88573..3bebca53a06e026d923eb179d5df466d57bf3fd6 100644 (file)
@@ -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));