]> git.ipfire.org Git - thirdparty/valgrind.git/commit
s390x: Fix IR generation for SRNMB
authorFlorian Krohm <flo2030@eich-krohm.de>
Sat, 12 Apr 2025 21:45:22 +0000 (21:45 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Sat, 12 Apr 2025 21:57:27 +0000 (21:57 +0000)
commit1d8257e4a24356198d9a620904ac516bc94d6699
tree22ac2dcdf81106b050cfaf0313f81bd300a13d96
parent3a23860abe7737d3fababd8c0bb19cf68332fea0
s390x: Fix IR generation for SRNMB

disasm-test generated this test:

  asm volatile("srnmb 4095(%r0)");

which was disassembled in VEX to

  srnmb 0

causing a mismatch with what objdump does.

4095 is not a valid bfp rounding mode and the old implementation of
s390_irgen_SRNMB let it slide by with a warning. However, POP calls for a
specification exception in this case. This is what this patch changes.i
It also eliminates the s390_irgen_srnmb_wrapper function along the way.

While adjusting none/tests/s390x/srnmb.* I noticed that the line
number shown in the specification exception is incorrect. This
is not a regression. It has been incorrect before as well.

I have opened https://bugs.kde.org/show_bug.cgi?id=502729 fro the line
number issue.
VEX/priv/guest_s390_toIR.c
VEX/priv/main_main.c
VEX/pub/libvex_emnote.h
none/tests/s390x/srnmb.c
none/tests/s390x/srnmb.stderr.exp
none/tests/s390x/srnmb.stdout.exp