]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390x: Fix VLRL and VSTRL insns (Bug 498422)
authorFlorian Krohm <flo2030@eich-krohm.de>
Thu, 6 Mar 2025 18:39:26 +0000 (18:39 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Thu, 6 Mar 2025 18:39:26 +0000 (18:39 +0000)
The replacement field for these insns is 12-bit wide. So its value
cannot possibly be represented by a UChar. Use UShort instead.

This was found by disasm-test like so:

./disasm-test --run vlrl
*** mismatch VEX: |vlrl  %v6,255,4|    objdump: |vlrl  %v6,4095,4|

./disasm-test --run vstrl
*** mismatch VEX: |vstrl  %v6,255(%r4),7|   objdump: |vstrl  %v6,4095(%r4),7|

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

NEWS
VEX/priv/guest_s390_toIR.c

diff --git a/NEWS b/NEWS
index fd470fee789931bc2c5965f1aeed00320e5d2559..304ce1c0b79c17345e87abe05cf8359ef0994bcf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -52,6 +52,7 @@ are not entered into bugzilla tend to get forgotten about or ignored.
 498143  False positive on EVIOCGRAB ioctl
 498317  FdBadUse is not a valid CoreError type in a suppression
         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
 499183  FreeBSD: differences in avx-vmovq output
 499212  mmap() with MAP_ALIGNED() returns unaligned pointer
index 6da5996452d2de7f4710f4e34ac139c6492532cf..9fddd9549563606e7e7f309f2fe597b713739aa5 100644 (file)
@@ -4326,7 +4326,7 @@ s390_format_VRRa_VVVMMM(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3,
 
 static void
 s390_format_VSI_URDV(const HChar *(*irgen)(UChar v1, IRTemp op2addr, UChar i3),
-                     UChar v1, UChar b2, UChar d2, UChar i3, UChar rxb)
+                     UChar v1, UChar b2, UShort d2, UChar i3, UChar rxb)
 {
    const HChar *mnm;
    IRTemp op2addr = newTemp(Ity_I64);