]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390: Fix s390_irgen_POPCNT
authorFlorian Krohm <flo2030@eich-krohm.de>
Wed, 4 Feb 2026 19:08:20 +0000 (19:08 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Wed, 4 Feb 2026 19:09:02 +0000 (19:09 +0000)
The POPCNT insn does not cause a specification exception when reserved
bits in m3 are not zero.
Found by disasm-test.

VEX/priv/guest_s390_toIR.c
none/tests/s390x/disasm-test/disasm-test.post.exp
none/tests/s390x/disasm-test/disasm-test.vgtest

index ef955d9f2ce43850d852ee08d3840618a18f0355..e44faea9b90a0e80dd96ea2e8ba8858820e8779e 100644 (file)
@@ -13019,8 +13019,6 @@ s390_irgen_FLOGR(UChar r1, UChar r2)
 static void
 s390_irgen_POPCNT(UChar m3, UChar r1, UChar r2)
 {
-   s390_insn_assert((m3 & 7) == 0);
-
    static const ULong masks[] = {
       0x5555555555555555, 0x3333333333333333, 0x0F0F0F0F0F0F0F0F,
       0x00FF00FF00FF00FF, 0x0000FFFF0000FFFF, 0x00000000FFFFFFFF,
index 68c0b9adb6e1d61f273b67be0352647b7526c9c2..51ae053ed36832b1dba247ea0836c4413f5169c3 100644 (file)
@@ -2,5 +2,5 @@ Looking for missed specification exceptions
 Total:  42131 tests generated
 Total:  42131 specification exceptions
 Looking for unexpected specification exceptions
-Total: 153637 tests generated
+Total: 153653 tests generated
 Total:      0 specification exceptions
index 807250ba13174a3316dc8353d4bc17257a85159b..5fdf132660562032ce4a0895be8354cf03fb716c 100644 (file)
@@ -12,7 +12,6 @@
 # vscef - runs into an assert instead of spec. exc.
 # vsceg - runs into an assert instead of spec. exc.
 # vstef - runs into an assert instead of spec. exc.
-# popcnt - s390_insn_assert is wrong; just "may not operate correctly"
 # srnmb - The compile-time checkable constraint cannot be expressed in opcode.c
 #         But the s390_insn_assert is wrong nevertheless because bits [0:55] are ignored.
 #         Need to mask d2 before checking  (d2 & 0xff)
@@ -20,7 +19,7 @@
 
 prereq: ./disasm-test --check-march=arch14
 prog: /bin/true
-post: ./disasm-test --gcc-flags=-march=arch14 --all --exclude exrl kma vmsl vgef vgeg vscef vsceg vstef popcnt srnmb vster --summary
+post: ./disasm-test --gcc-flags=-march=arch14 --all --exclude exrl kma vmsl vgef vgeg vscef vsceg vstef srnmb vster --summary
 vgopts: -q
 stderr_filter:
 stderrB_filter: