You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(83) |
Oct
(89) |
Nov
(97) |
Dec
(30) |
| 2024 |
Jan
(25) |
Feb
(73) |
Mar
(76) |
Apr
(122) |
May
(46) |
Jun
(44) |
Jul
(27) |
Aug
(30) |
Sep
(33) |
Oct
(67) |
Nov
(91) |
Dec
(70) |
| 2025 |
Jan
(44) |
Feb
(36) |
Mar
(85) |
Apr
(100) |
May
(138) |
Jun
(55) |
Jul
(107) |
Aug
(96) |
Sep
(151) |
Oct
(86) |
Nov
|
Dec
|
|
From: Mark W. <ma...@kl...> - 2025-10-02 20:57:37
|
Hi, On Thu, Oct 02, 2025 at 09:30:11AM -0700, Bart Van Assche via Valgrind-developers wrote: > On 10/1/25 10:48 PM, Paul Floyd wrote: > >+#if !defined(VGO_freebsd) // Darwin as well? > > Isn't adding this type of #ifdefs a software anti-pattern? Please > consider adding a configure test for dirent64() and getdent64() and to > test the appropriate HAVE_* macro here. Note that the other checks for this feature use: #if defined(VGO_linux) && defined(__NR_getdents) It would be good to use the same guards everywhere. Were these guards placed wrongly? What was the actual build failure on freebsd? Thanks, Mark |
|
From: Mark W. <ma...@kl...> - 2025-10-02 20:53:16
|
Hi Florian, On Thu, Oct 02, 2025 at 12:26:16AM +0200, Florian Krohm wrote: > Sorry for that... I did run make post-regtest-checks but that was not good > enough. Please check out the attached patch in > https://bugs.kde.org/show_bug.cgi?id=495483 > which should help. That looks nice (I do have a wording nitpick, but feel free to ignore if you feel no-print is more clear than html). I wouldn't integrate the make dist with the post-regtest-checks though. It wouldn't have caught the issue because it only generates the tar ball. make distcheck would have caught it, but I think that make distcheck should be a separate step/check (it does multiple builds and takes a long time even with BUILD_DOCS=none). Cheers, Mark |
|
From: Paul F. <pj...@wa...> - 2025-10-02 19:55:40
|
On 02-10-25 16:30, Bart Van Assche via Valgrind-developers wrote: > On 10/1/25 10:48 PM, Paul Floyd wrote: >> +#if !defined(VGO_freebsd) // Darwin as well? > > Isn't adding this type of #ifdefs a software anti-pattern? Please > consider adding a configure test for dirent64() and getdent64() and to > test the appropriate HAVE_* macro here. Hi Bart For the moment I just want to be able to build on FreeBSD. This is going to take more than just checking for struct dirent64 and/or getdent64(). macOS doesn't have /proc. FreeBSD can have a /proc mounted but it's not done by default and it doesn't have any fd or fdinfo directories. So there's no point trying to filter out Valgrind's own file descriptors in these directories on those platforms. illumos is more like Linux, I'll check soon if it has getdent64 and the same or simular /proc contents. A+ Paul |
|
From: Alexandra H. <aha...@so...> - 2025-10-02 17:43:46
|
https://sourceware.org/cgit/valgrind/commit/?id=a08e6ed08f6b24ecf35d443b52e5db16ccb05f77 commit a08e6ed08f6b24ecf35d443b52e5db16ccb05f77 Author: Alexandra Hájková <aha...@re...> Date: Tue Sep 30 09:54:58 2025 -0400 getdents_filter.vgtest: Add filter_sort On some file systems the testfiles 1000 and 1001 come out in different order. Add filter_sort to sort the output lines to always appear at the same order. Diff: --- .gitignore | 1 + none/tests/Makefile.am | 3 ++- none/tests/filter_sort | 2 ++ none/tests/linux/getdents_filter.stdout.exp | 12 ++++++------ none/tests/linux/getdents_filter.vgtest | 1 + 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 645f261bcd..01dd2a3bc6 100644 --- a/.gitignore +++ b/.gitignore @@ -1916,6 +1916,7 @@ /none/tests/linux/open_client /none/tests/linux/pthread-stack /none/tests/linux/stack-overflow +/none/tests/linux/getdents_filter # /none/tests/mips32/ /none/tests/mips32/Makefile diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index f75de49f46..a95d66436d 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -92,7 +92,8 @@ dist_noinst_SCRIPTS = \ filter_stderr \ filter_timestamp \ filter_xml \ - allexec_prepare_prereq + allexec_prepare_prereq \ + filter_sort noinst_HEADERS = fdleak.h diff --git a/none/tests/filter_sort b/none/tests/filter_sort new file mode 100755 index 0000000000..5c376236c2 --- /dev/null +++ b/none/tests/filter_sort @@ -0,0 +1,2 @@ +#!/bin/sh +sort diff --git a/none/tests/linux/getdents_filter.stdout.exp b/none/tests/linux/getdents_filter.stdout.exp index c228ee81fd..7d29d0f664 100644 --- a/none/tests/linux/getdents_filter.stdout.exp +++ b/none/tests/linux/getdents_filter.stdout.exp @@ -1,9 +1,3 @@ -retry_test_start -retry:0 -retry:1 -retry:2 -retry:3 -retry_test_end 0 1 2 @@ -14,3 +8,9 @@ fdinfo:2 fdinfo:3 regular:1000 regular:1001 +retry:0 +retry:1 +retry:2 +retry:3 +retry_test_end +retry_test_start diff --git a/none/tests/linux/getdents_filter.vgtest b/none/tests/linux/getdents_filter.vgtest index eb5bd6cebd..612ebcec27 100644 --- a/none/tests/linux/getdents_filter.vgtest +++ b/none/tests/linux/getdents_filter.vgtest @@ -1,2 +1,3 @@ prog: getdents_filter vgopts: -q +stdout_filter: ../filter_sort |
|
From: Bart V. A. <bva...@ac...> - 2025-10-02 16:30:26
|
On 10/1/25 10:48 PM, Paul Floyd wrote: > +#if !defined(VGO_freebsd) // Darwin as well? Isn't adding this type of #ifdefs a software anti-pattern? Please consider adding a configure test for dirent64() and getdent64() and to test the appropriate HAVE_* macro here. Thanks, Bart. |
|
From: Paul F. <pa...@so...> - 2025-10-02 05:48:53
|
https://sourceware.org/cgit/valgrind/commit/?id=d01f7775d7544316139742a675bd0d49cf7dc3c1 commit d01f7775d7544316139742a675bd0d49cf7dc3c1 Author: Paul Floyd <pj...@wa...> Date: Thu Oct 2 07:46:59 2025 +0200 FreeBSD: fix build, FreeBSD has no dirent64 or getdent64 Need to check Darwin as well. Diff: --- coregrind/m_syswrap/syswrap-generic.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index 3786e9cd89..296ebdd910 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -3994,6 +3994,8 @@ PRE(sys_getdents) PRE_MEM_WRITE( "getdents(dirp)", ARG2, ARG3 ); } +#if !defined(VGO_freebsd) // Darwin as well? + /* Check if the given file descriptor points to a /proc/PID/fd or /proc/PID/fdinfo directory. Returns True if it's a directory we should filter Valgrind FDs from. */ static Bool is_proc_fd_directory(Int fd) @@ -4096,6 +4098,8 @@ static SizeT filter_dirent64_entries(struct vki_dirent64 *dirp, SizeT orig_size) return new_size; } +#endif + /* Make sure we really need the proc filtering using (32bit) getdents, which not every linux arch implements. */ #if defined(VGO_linux) && defined(__NR_getdents) @@ -4130,6 +4134,8 @@ static SizeT filter_valgrind_fds_from_getdents_with_refill(Int fd, struct vki_di } #endif /* defined(VGO_linux) && defined(__NR_getdents) */ +#if !defined(VGO_freebsd) // Darwin as well? + /* Filter out Valgrind's internal file descriptors from getdents64 results with refill capability. Same logic as getdents version but for 64-bit dirent structures. Returns filtered size on success, or -1 if retry syscall failed. */ @@ -4159,6 +4165,8 @@ static SizeT filter_valgrind_fds_from_getdents64_with_refill(Int fd, struct vki_ return new_size; } +#endif + POST(sys_getdents) { vg_assert(SUCCESS); @@ -4186,6 +4194,8 @@ POST(sys_getdents) } } +#if !defined(VGO_freebsd) + PRE(sys_getdents64) { *flags |= SfMayBlock; @@ -4219,6 +4229,8 @@ POST(sys_getdents64) } } +#endif + PRE(sys_getgroups) { PRINT("sys_getgroups ( %ld, %#" FMT_REGWORD "x )", SARG1, ARG2); |
|
From: Florian K. <fl...@ei...> - 2025-10-01 22:26:34
|
On 01.10.25 16:43, Mark Wielaard wrote: > https://sourceware.org/cgit/valgrind/commit/?id=94b0aab338d0e102057308dedc50b3f3d5234e17 > > commit 94b0aab338d0e102057308dedc50b3f3d5234e17 > Author: Mark Wielaard <ma...@kl...> > Date: Wed Oct 1 16:42:17 2025 +0200 > > none/tests/Makefile.am: Add s390x/disasm-test to DIST_SUBDIRS Hi Mark, Sorry for that... I did run make post-regtest-checks but that was not good enough. Please check out the attached patch in https://bugs.kde.org/show_bug.cgi?id=495483 which should help. Thanks, Florian |
|
From: Mark W. <ma...@so...> - 2025-10-01 14:44:06
|
https://sourceware.org/cgit/valgrind/commit/?id=94b0aab338d0e102057308dedc50b3f3d5234e17 commit 94b0aab338d0e102057308dedc50b3f3d5234e17 Author: Mark Wielaard <ma...@kl...> Date: Wed Oct 1 16:42:17 2025 +0200 none/tests/Makefile.am: Add s390x/disasm-test to DIST_SUBDIRS Fixes: 6abf08f96a97 ("disasm-test: Makefile tweaks") Diff: --- none/tests/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 58e7a52492..f75de49f46 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -77,7 +77,8 @@ if VGCONF_PLATFORMS_INCLUDE_X86_FREEBSD SUBDIRS += x86-freebsd endif -DIST_SUBDIRS = x86 amd64 ppc32 ppc64 arm arm64 s390x mips32 mips64 nanomips \ +DIST_SUBDIRS = x86 amd64 ppc32 ppc64 arm arm64 s390x s390x/disasm-test \ + mips32 mips64 nanomips \ riscv64 linux darwin solaris freebsd amd64-linux x86-linux \ amd64-darwin x86-darwin amd64-solaris x86-solaris x86-freebsd \ scripts . |
|
From: Florian K. <fk...@so...> - 2025-10-01 14:42:58
|
https://sourceware.org/cgit/valgrind/commit/?id=eed42ea290e362eaf333135f4fa53b8687005e54 commit eed42ea290e362eaf333135f4fa53b8687005e54 Author: Florian Krohm <fl...@ei...> Date: Wed Oct 1 14:42:23 2025 +0000 Add BZ 506211 to NEWS Diff: --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index 765d9d3d62..e4722a7293 100644 --- a/NEWS +++ b/NEWS @@ -985,6 +985,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 451626 Syscall param bpf(attr->raw_tracepoint.name) points to unaddressable byte(s) 451827 [ppc64le] VEX temporary storage exhausted with several vbpermq instructions 451843 valgrind fails to start on a FreeBSD system which enforces W^X +506211 Constant folding improvements 509157 riscv64: Shift instructions can behave wrong To see details of a given bug, visit |
|
From: Florian K. <fk...@so...> - 2025-10-01 12:49:49
|
https://sourceware.org/cgit/valgrind/commit/?id=6abf08f96a97bf12aac01cef97ed39936eb038b3 commit 6abf08f96a97bf12aac01cef97ed39936eb038b3 Author: Florian Krohm <fl...@ei...> Date: Wed Oct 1 12:48:12 2025 +0000 disasm-test: Makefile tweaks disasm-test/Makefile.am: Include Makefile.tool-tests.am not Makefile.all.am Also: do not build disasm-test on platforms other than s390x. There is no point doing so as you won't be able to run it in a meaningful way. Diff: --- Makefile.am | 1 - none/tests/Makefile.am | 2 +- none/tests/s390x/disasm-test/Makefile.am | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index a3150abb14..6c5b9f5b63 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,7 +33,6 @@ SUBDIRS = \ perf \ gdbserver_tests \ memcheck/tests/vbit-test \ - none/tests/s390x/disasm-test \ none/tests/iropt-test \ auxprogs \ mpi \ diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 716ce000d3..58e7a52492 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -24,7 +24,7 @@ if VGCONF_ARCHS_INCLUDE_ARM64 SUBDIRS += arm64 endif if VGCONF_ARCHS_INCLUDE_S390X -SUBDIRS += s390x +SUBDIRS += s390x s390x/disasm-test endif if VGCONF_ARCHS_INCLUDE_MIPS32 SUBDIRS += mips32 diff --git a/none/tests/s390x/disasm-test/Makefile.am b/none/tests/s390x/disasm-test/Makefile.am index 5629d7d52d..150f38b321 100644 --- a/none/tests/s390x/disasm-test/Makefile.am +++ b/none/tests/s390x/disasm-test/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/Makefile.all.am +include $(top_srcdir)/Makefile.tool-tests.am EXTRA_DIST = disasm-test.vgtest disasm-test.stderr.exp \ disasm-test.post.exp |
|
From: Florian K. <fk...@so...> - 2025-10-01 12:20:04
|
https://sourceware.org/cgit/valgrind/commit/?id=09f6162dd7ca1e60ceeb6e7fac30a1f9a8cf6641 commit 09f6162dd7ca1e60ceeb6e7fac30a1f9a8cf6641 Author: Florian Krohm <fl...@ei...> Date: Wed Oct 1 12:19:13 2025 +0000 VEX: Remove algebraic simplification for shift IROps. Shl/Shr/Sar(0,x) ==> 0 Don't. Because doing so removes the undefined behaviour in case the shift amount is out of range. This is also consistent with what constant folding does in this case, namely, passing the undefined behaviour down the VEX pipeline. Diff: --- VEX/priv/ir_opt.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/VEX/priv/ir_opt.c b/VEX/priv/ir_opt.c index 4b07b27fc4..1b21c8e3ec 100644 --- a/VEX/priv/ir_opt.c +++ b/VEX/priv/ir_opt.c @@ -2623,13 +2623,6 @@ static IRExpr* fold_Expr_WRK ( IRExpr** env, IRExpr* e ) e2 = e->Iex.Binop.arg1; break; } - /* Shl8/Shl16/Shl32/Shl64(0,x) ==> 0 - Shr8/Shr16/Shr32/Shr64(0,x) ==> 0 - Sar8/Sar16/Sar32/Sar64(0,x) ==> 0 */ - if (isZeroU(e->Iex.Binop.arg1)) { - e2 = e->Iex.Binop.arg1; - break; - } break; case Iop_Or1: |
|
From: Florian K. <fk...@so...> - 2025-09-30 20:28:31
|
https://sourceware.org/cgit/valgrind/commit/?id=56f62f74ada99daf1a18cd1abe5309d4fc9c085c commit 56f62f74ada99daf1a18cd1abe5309d4fc9c085c Author: Florian Krohm <fl...@ei...> Date: Tue Sep 30 20:27:43 2025 +0000 Add BZ 509157 to NEWS. Diff: --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index d7367ba054..765d9d3d62 100644 --- a/NEWS +++ b/NEWS @@ -985,6 +985,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 451626 Syscall param bpf(attr->raw_tracepoint.name) points to unaddressable byte(s) 451827 [ppc64le] VEX temporary storage exhausted with several vbpermq instructions 451843 valgrind fails to start on a FreeBSD system which enforces W^X +509157 riscv64: Shift instructions can behave wrong To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX |
|
From: Florian K. <fk...@so...> - 2025-09-30 20:15:56
|
https://sourceware.org/cgit/valgrind/commit/?id=97831bbbc208f3c574095770aff9b19e5a2c6aae commit 97831bbbc208f3c574095770aff9b19e5a2c6aae Author: Florian Krohm <fl...@ei...> Date: Tue Sep 30 20:14:24 2025 +0000 riscv64: Fix IR generation for shift operations (BZ 509157) For SLL, SRL, and SRA the shift amount is 6 bits wide - not 8 bits. For SLLW, SRLW, and SRAW the shift amount is 5 bits wide - not 8 bits. Patch for IR generation by Christoph Jung (chr...@go...). Also clarify semantics of bitwise shift operators in libvex_ir.h Fixes https://bugs.kde.org/show_bug.cgi?id=509157 Diff: --- VEX/priv/guest_riscv64_toIR.c | 13 +++++++++---- VEX/pub/libvex_ir.h | 12 ++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/VEX/priv/guest_riscv64_toIR.c b/VEX/priv/guest_riscv64_toIR.c index 59297acd15..c90444ef1d 100644 --- a/VEX/priv/guest_riscv64_toIR.c +++ b/VEX/priv/guest_riscv64_toIR.c @@ -1550,7 +1550,8 @@ static Bool dis_RV64I(/*MB_OUT*/ DisResult* dres, break; case 0b001: expr = binop(Iop_Shl64, getIReg64(rs1), - unop(Iop_64to8, getIReg64(rs2))); + unop(Iop_64to8, binop(Iop_And64, mkU64(0b00111111), + getIReg64(rs2)))); break; case 0b010: expr = unop(Iop_1Uto64, @@ -1565,7 +1566,8 @@ static Bool dis_RV64I(/*MB_OUT*/ DisResult* dres, break; case 0b101: expr = binop(is_base ? Iop_Shr64 : Iop_Sar64, getIReg64(rs1), - unop(Iop_64to8, getIReg64(rs2))); + unop(Iop_64to8, binop(Iop_And64, mkU64(0b00111111), + getIReg64(rs2)))); break; case 0b110: expr = binop(Iop_Or64, getIReg64(rs1), getIReg64(rs2)); @@ -1719,7 +1721,9 @@ static Bool dis_RV64I(/*MB_OUT*/ DisResult* dres, if (rd != 0) putIReg32( irsb, rd, - binop(Iop_Shl32, getIReg32(rs1), unop(Iop_64to8, getIReg64(rs2)))); + binop(Iop_Shl32, getIReg32(rs1), + unop(Iop_64to8, binop(Iop_And64, mkU64(0b00011111), + getIReg64(rs2))))); DIP("sllw %s, %s, %s\n", nameIReg(rd), nameIReg(rs1), nameIReg(rs2)); return True; } @@ -1734,7 +1738,8 @@ static Bool dis_RV64I(/*MB_OUT*/ DisResult* dres, if (rd != 0) putIReg32(irsb, rd, binop(is_log ? Iop_Shr32 : Iop_Sar32, getIReg32(rs1), - unop(Iop_64to8, getIReg64(rs2)))); + unop(Iop_64to8, binop(Iop_And64, mkU64(0b00011111), + getIReg64(rs2))))); DIP("%s %s, %s, %s\n", is_log ? "srlw" : "sraw", nameIReg(rd), nameIReg(rs1), nameIReg(rs2)); return True; diff --git a/VEX/pub/libvex_ir.h b/VEX/pub/libvex_ir.h index 8c68fab441..7cb9c6b0f8 100644 --- a/VEX/pub/libvex_ir.h +++ b/VEX/pub/libvex_ir.h @@ -434,6 +434,18 @@ typedef Iop_Or8, Iop_Or16, Iop_Or32, Iop_Or64, Iop_And8, Iop_And16, Iop_And32, Iop_And64, Iop_Xor8, Iop_Xor16, Iop_Xor32, Iop_Xor64, + /* Bitwise shift ops + Semantics as per C standard: + If the value of the right operand is negative or is greater + than or equal to the width of the left operand, the behaviour is + undefined. + For Shl: The result of E1 << E2 is E1 left-shifted E2 bit positions. + Vacated bits are filled with zeroes. + For Shr: The result of E1 >> E2 is E1 right-shifted E2 bit positions. + Vacated bits are filled with zeroes. + For Sar: The result of E1 >> E2 is E1 right-shifted E2 bit positions. + Vacated bits are filled with the most significant bit of E1 prior + to shifting. */ Iop_Shl8, Iop_Shl16, Iop_Shl32, Iop_Shl64, Iop_Shr8, Iop_Shr16, Iop_Shr32, Iop_Shr64, Iop_Sar8, Iop_Sar16, Iop_Sar32, Iop_Sar64, |
|
From: Cyril H. <ch...@su...> - 2025-09-30 12:18:03
|
Good news everyone,
the Linux Test Project test suite stable release for *September 2025* has been
released.
Since the last release 221 patches by 25 authors were merged.
Patch review is what most of the projects struggle with and LTP is no
different. If you can spare some effort helping with the patch review is more
than welcomed.
NOTABLE CHANGES
===============
* New tests
- CVE-2025-21756 regression test for fcdd2242c023 ('vsock: Keep the binding until socket destruction')
- CVE-2025-38236 regression test for 32ca245464e1 ('af_unix: Don't leave consecutive consumed OOB skbs')
- file_attr[01-04] tests for file_getattr() and file_setattr() syscalls
- clock_settime04 Tests that changing the CLOCK_REALTIME clock has no effect
on a relative/absolute clock_nanosleep()
- statmount09 that verifies that statmount() is correctly reading the mount
ID for the current namespace
- listxattr04 regression test for 8b0ba61df5a1 ('fs/xattr.c: fix simple_xattr_list to always include security.* xattrs')
- ioctl_pidfd[01-06] tests for PIDFD_GET_INFO ioctl() and PIDFD_INFO_EXIT flag
- mount08 regression test for d80b065bb172 ('proc: restrict overmounting of ephemeral entities')
- unshare05 tests that unshare(CLONE_NEWPID) assign pid 1 to the first child
- ioctl10 test for PROCMAP_QUERY ioctl()
- landlock02 test for landlock ABI v6
- landlock09 test for unix socket landlock sandboxing
- landlock10 test for signal sandboxing
- epoll_pwait06 regression test for d9ec73301099 ('fs/eventpoll: fix endless busy loop after timeout has expired')
- lsm_get_self_attr[01-03] tests for lst_get_self_attr() syscall
- lsm_list_modules[01-02] tests for lsm_list_modules() syscall
- lsm_set_self_attr01 test for lsm_set_self_attr() syscall
* Increased coverage
- open13 now checks that more operations are failing with EBADF on O_PATH fd
and also verifies that dup() preserves O_PATH flag
* Rewritten and updated tests
- open posix aio_cancel_7-1 was rewritten to trigger the tested condition reliably
- mmap22 now uses mincore() to test MAP_DROPPABLE flag
- open posix pthread_rwlock_rdlock now use PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP
on glibc to force POSIX mandated behavior
- ioctl_loop01 and ioctl09 tests now use loop device instead of the backing
úfile for partitioning
- sched_football thread synchronization at the start was rewritten to make sure
threads are started in the right order
* Removed tests
- eject command test
- kdump testsuite which was unmaintained for nearly two decades
* General smaller improvements
- LTP kernel modules can now be build separately with 'make modules'
- The new shell test library now support setup() and cleanup() functions
- The concept of min_runtime was added to the test library, now tests that run
for longer time can define min_runtime in order to make sure that the test
actually runs for a reasonable runtime when test runtime is scaled down.
For details see:
81ba405dfbd9 ('tst_test: Add min_runtime to control lower bound of scaled runtime')
- Test library now properly translates MS_RDONLY flag for FUSE based mounts
- The test metadata parser now correctly handles designed initializers
Details in:
375286fb9361 ('metaparse: Map arrays with designated initializers to JSON objects')
- New LTP_QUIET environment variable was introduced, if set TINFO, TDEBUG and
TCONF messages are suppresed. This can be combined with the previously
introduced LTP_REPRODUCIBLE_OUTPUT to create shorter logs that are easier to
compare between runs.
* Kirk and ltx has been fixed and now works well together
This marks a milestone in new LTP test runner development as we are nearing
the vision we had for years. The ltx, which is minimalistic daemon that
communicates over byte oriented connection, can be started on the system
under test and kirk can connect to ltx from a machine that drives the testing
and run tests in parallel using ltx.
The documentation is sparse at the moment and kirk qemu SUT does not start
ltx automatically. However if you want to feel adventurous and try ltx in a
qemu virtual machine with communication over virtio with these steps:
Manually start qemu virtual machine on a host:
mkfifo ltx-io.in
mkfifo ltx-io.out
qemu- ... -chardev pipe,id=ltx-io,path=ltx-io -device virtserialport,chardev=ltx-io,name=ltx-io
Start ltx inside of the guest:
/opt/ltp/ltx -s /dev/virtio-ports/ltx-io
And on a host use kirk to talk to ltx via the virtio serial:
./kirk --run-suite syscalls --sut ltx:infile=ltx-io.in:outfile=ltx-io.out
Parallel run can be started by passing number of workers (-w N) to kirk.
Similarily you can run ltx and kirk over real serial null modem between two
machines.
Next step that is already in queue is separation of communication channel and
SUT definition in kirk. That will allow us to select different ways how kirk
connects to SUT e.g. qemu while the SUT module will handle the power e.g.
reboot. Hopefully that will happen in the next release and we will be
finally removing the old and deprecated runltp next year.
* Testers guide to the Linux Test Project was added into documentation:
https://linux-test-project.readthedocs.io/en/latest/users/testers_guide.html
* Documentation was written for test macros:
https://linux-test-project.readthedocs.io/en/latest/developers/api_c_tests.html#test-macros
* 52 testcases were converted to the new test library
+ The usual amount of fixes and cleanups
DOWNLOAD AND LINKS
==================
The latest version of the test-suite contains 3000+ tests for the Linux
and can be downloaded at:
https://github.com/linux-test-project/ltp/releases/tag/20250930
The project pages as well as GIT repository are hosted on GitHub:
https://github.com/linux-test-project/ltp
If you ever wondered how to write a LTP testcase, don't miss our developer
documentation at:
https://linux-test-project.readthedocs.io/en/latest/developers/test_case_tutorial.html
And our library API documentation at:
https://linux-test-project.readthedocs.io/en/latest/developers/api_c_tests.html
Patches, new tests, bugs, comments or questions should go to to our mailing
list at lt...@li....
CREDITS
=======
Many thanks to the people contributing to this release:
git shortlog -s -e -n 20250530..
50 Andrea Cervesato <and...@su...>
50 Petr Vorel <pv...@su...>
33 Ricardo B. Marlière <rb...@su...>
16 Cyril Hrubis <ch...@su...>
15 Li Wang <li...@re...>
14 Martin Doucha <md...@su...>
13 Wei Gao <we...@su...>
5 Avinesh Kumar <ak...@su...>
4 Tiezhu Yang <yan...@lo...>
3 Florian Schmaus <flo...@co...>
2 Amir Goldstein <ami...@gm...>
2 Jack Morgan <jm...@na...>
2 Martin Cermak <mc...@re...>
1 Ben Copeland <ben...@li...>
1 Charles Shi <sc...@gm...>
1 Jan Kara <ja...@su...>
1 Jan Polensky <ja...@li...>
1 Jan Stancek <jst...@re...>
1 Liheng Chen <791...@qq...>
1 Mark Wielaard <ma...@kl...>
1 Mike Tipton via ltp <lt...@li...>
1 Tengda Wu <st...@gm...>
1 Xiao Yang <ice...@gm...>
1 lufei <lu...@un...>
1 yang.zhang <zha...@ky...>
And also thanks to patch reviewers:
git log 20250530.. | grep -Ei '(reviewed|acked)-by:' | sed 's/.*by: //' | sort | uniq -c | sort -n -r
97 Cyril Hrubis <ch...@su...>
54 Petr Vorel <pv...@su...>
48 Li Wang <li...@re...>
38 Andrea Cervesato <and...@su...>
11 Avinesh Kumar <ak...@su...>
10 Wei Gao <we...@su...>
4 Ricardo B. Marlière <rb...@su...>
3 Jan Stancek <jst...@re...>
2 Mimi Zohar <zo...@li...>
1 Pedro Falcato <pfa...@su...>
1 Martin Doucha <md...@su...>
1 Jan Kara <ja...@su...>
--
Cyril Hrubis
ch...@su...
|
|
From: <min...@wi...> - 2025-09-30 09:57:38
|
From: Mingli Yu <min...@wi...> Though the valgrind testing is extended to produce automake-style log into test-suite-overall.log [1], it's better also print the test result to the stdout. [1] https://sourceware.org/git/?p=valgrind.git;a=commitdiff;h=61e44a4aef8775b925a7a91f403ebd7f4f6670a4 Signed-off-by: Mingli Yu <min...@wi...> --- tests/vg_regtest.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in index 945b4c161..2f5f3f678 100644 --- a/tests/vg_regtest.in +++ b/tests/vg_regtest.in @@ -720,6 +720,7 @@ sub test_one_dir($$) close(TSDIRLOG); my $result = do_one_test($full_dir, $f); print TSLOG scalar localtime, " result: $result $full_dir/$f.log\n"; + print "$result: $full_dir/$f\n"; $num_results{$result} ++; if ($result ne "PASS") { # transcribe .log file into the overall log. @@ -823,6 +824,7 @@ while (1) { # we will exit after one loop, unless looptillfail my $result = do_one_test($dir, $file); print TSLOG scalar localtime, " result: $result $dir/$file.log\n"; + print "$result: $dir/$file\n"; $num_results{$result} ++; if ($result ne "PASS") { # transcribe .log file into the overall log. -- 2.34.1 |
|
From: Florian K. <fk...@so...> - 2025-09-29 22:35:53
|
https://sourceware.org/cgit/valgrind/commit/?id=a984b14036fce483f98ece084c4d54370749fd26 commit a984b14036fce483f98ece084c4d54370749fd26 Author: Florian Krohm <fl...@ei...> Date: Mon Sep 29 22:35:10 2025 +0000 s390: Cleanup none/tests/s390x/Makefile.am Diff: --- none/tests/s390x/Makefile.am | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am index e0ca00d5ba..22b8128bba 100644 --- a/none/tests/s390x/Makefile.am +++ b/none/tests/s390x/Makefile.am @@ -32,7 +32,8 @@ check_PROGRAMS = $(INSN_TESTS) \ allexec \ op00 -noinst_HEADERS = vector.h +noinst_HEADERS = add.h and.h div.h dfp_utils.h insert.h mul.h opcodes.h \ + or.h rounding.h sub.h svc.h table.h test.h vector.h xor.h EXTRA_DIST = \ $(addsuffix .stderr.exp,$(INSN_TESTS)) \ @@ -49,20 +50,9 @@ EXTRA_DIST = \ ecag.stdout.exp-z13 ecag.stdout.exp-z14 ecag.stdout.exp-z15 \ ecag.stdout.exp-z16 \ op00.stderr.exp op00.vgtest \ - test.h opcodes.h add.h and.h div.h insert.h dfp_utils.h \ - mul.h or.h sub.h xor.h table.h svc.h rounding.h \ - dfp-1.stderr.exp dfp-1.stdout.exp dfp-1.vgtest \ - dfp-2.stderr.exp dfp-2.stdout.exp dfp-2.vgtest \ - dfp-3.stderr.exp dfp-3.stdout.exp dfp-3.vgtest \ - dfp-4.stderr.exp dfp-4.stdout.exp dfp-4.vgtest \ - dfptest.stderr.exp dfptest.stdout.exp dfptest.vgtest \ - dfpext.stderr.exp dfpext.stdout.exp dfpext.vgtest \ - dfpconv.stderr.exp dfpconv.stdout.exp dfpconv.vgtest \ dfp-XxC.vgtest dfp-XxC.stderr.exp dfp-XxC.post.exp \ dfp-XiC.vgtest dfp-XiC.stderr.exp dfp-XiC.post.exp \ - srnmt.stderr.exp srnmt.stdout.exp srnmt.vgtest \ - stfle.stdout.exp-z16 \ - pfpo.stderr.exp pfpo.stdout.exp pfpo.vgtest + stfle.stdout.exp-z16 AM_CFLAGS += @FLAG_M64@ AM_CXXFLAGS += @FLAG_M64@ |
|
From: Florian K. <fk...@so...> - 2025-09-29 21:37:23
|
https://sourceware.org/cgit/valgrind/commit/?id=d60982b80c6a7ae7a731305e3087345de4c1a023 commit d60982b80c6a7ae7a731305e3087345de4c1a023 Author: Florian Krohm <fl...@ei...> Date: Mon Sep 29 21:34:56 2025 +0000 s390: Add testcases for unhandled IEEE exceptions. Fixes BZ 306098 New emulation warnings: EmWarn_S390X_XxC_not_zero and EmWarn_S390X_XiC_not_zero New testcases bfp-XxC, dfp-XxC, and dfp-XiC. New testcase driver emwarn-gen.pl to get around valgrind's restriction on the number of emulation warnings. Fixes https://bugs.kde.org/show_bug.cgi?id=306098 Diff: --- NEWS | 1 + VEX/priv/guest_s390_toIR.c | 250 ++++++++++++++++++++++-------------- VEX/priv/main_main.c | 10 +- VEX/pub/libvex_emnote.h | 18 ++- none/tests/s390x/Makefile.am | 5 +- none/tests/s390x/bfp-XxC.post.exp | 234 +++++++++++++++++++++++++++++++++ none/tests/s390x/bfp-XxC.stderr.exp | 2 + none/tests/s390x/bfp-XxC.vgtest | 3 + none/tests/s390x/dfp-XiC.post.exp | 36 ++++++ none/tests/s390x/dfp-XiC.stderr.exp | 2 + none/tests/s390x/dfp-XiC.vgtest | 3 + none/tests/s390x/dfp-XxC.post.exp | 146 +++++++++++++++++++++ none/tests/s390x/dfp-XxC.stderr.exp | 2 + none/tests/s390x/dfp-XxC.vgtest | 3 + none/tests/s390x/emwarn-gen.pl | 179 ++++++++++++++++++++++++++ 15 files changed, 794 insertions(+), 100 deletions(-) diff --git a/NEWS b/NEWS index 1d2a6ea653..d7367ba054 100644 --- a/NEWS +++ b/NEWS @@ -67,6 +67,7 @@ bugzilla (https://bugs.kde.org/enter_bug.cgi?product=valgrind) rather than mailing the developers (or mailing lists) directly -- bugs that are not entered into bugzilla tend to get forgotten about or ignored. +306098 s390x: Alternate opcode form for convert to/from fixed and friends 309100 s390x: Testcases for extended BFP 309554 Wrap syscall remap_file_pages (216) 331311 Valgrind shows open files in /proc/self/fd that don't work for the process diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 1f18fee662..aad1a0dbb5 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -778,7 +778,7 @@ static void s390_print(HChar *text, IRExpr *value) { IRDirty *d; - + d = unsafeIRDirty_0_N(0 /* regparms */, "s390_do_print", &s390_do_print, mkIRExprVec_2(mkU64((ULong)text), value)); stmt(IRStmt_Dirty(d)); @@ -11458,13 +11458,14 @@ s390_irgen_ADB(UChar r1, IRTemp op2addr) } static const HChar * -s390_irgen_CEFBRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CEFBRA(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext && m3 != S390_BFP_ROUND_PER_FPC) { emulation_warning(EmWarn_S390X_fpext_rounding); m3 = S390_BFP_ROUND_PER_FPC; } + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); s390_insn_assert("cefbra", is_valid_rounding_mode(m3)); IRTemp op2 = newTemp(Ity_I32); @@ -11477,10 +11478,11 @@ s390_irgen_CEFBRA(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CDFBRA(UChar m3, - UChar m4 __attribute__((unused)), UChar r1, UChar r2) +s390_irgen_CDFBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cdfbra", is_valid_rounding_mode(m3)); + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I32); @@ -11491,13 +11493,14 @@ s390_irgen_CDFBRA(UChar m3, } static const HChar * -s390_irgen_CEGBRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CEGBRA(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext && m3 != S390_BFP_ROUND_PER_FPC) { emulation_warning(EmWarn_S390X_fpext_rounding); m3 = S390_BFP_ROUND_PER_FPC; } + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); s390_insn_assert("cegbra", is_valid_rounding_mode(m3)); IRTemp op2 = newTemp(Ity_I64); @@ -11510,13 +11513,14 @@ s390_irgen_CEGBRA(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CDGBRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CDGBRA(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext && m3 != S390_BFP_ROUND_PER_FPC) { emulation_warning(EmWarn_S390X_fpext_rounding); m3 = S390_BFP_ROUND_PER_FPC; } + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); s390_insn_assert("cdgbra", is_valid_rounding_mode(m3)); IRTemp op2 = newTemp(Ity_I64); @@ -11529,13 +11533,14 @@ s390_irgen_CDGBRA(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CELFBR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CELFBR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("celfbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I32); @@ -11547,13 +11552,14 @@ s390_irgen_CELFBR(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CDLFBR(UChar m3, - UChar m4 __attribute__((unused)), UChar r1, UChar r2) +s390_irgen_CDLFBR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("cdlfbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I32); @@ -11564,13 +11570,14 @@ s390_irgen_CDLFBR(UChar m3, } static const HChar * -s390_irgen_CELGBR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CELGBR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("celgbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I64); @@ -11582,13 +11589,14 @@ s390_irgen_CELGBR(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CDLGBR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CDLGBR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("cdlgbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I64); @@ -11601,13 +11609,14 @@ s390_irgen_CDLGBR(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CLFEBR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CLFEBR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("clfebr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F32); IRTemp result = newTemp(Ity_I32); @@ -11623,13 +11632,14 @@ s390_irgen_CLFEBR(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CLFDBR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CLFDBR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("clfdbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F64); IRTemp result = newTemp(Ity_I32); @@ -11645,13 +11655,14 @@ s390_irgen_CLFDBR(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CLGEBR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CLGEBR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("clgebr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F32); IRTemp result = newTemp(Ity_I64); @@ -11667,13 +11678,14 @@ s390_irgen_CLGEBR(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CLGDBR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CLGDBR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("clgdbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F64); IRTemp result = newTemp(Ity_I64); @@ -11689,10 +11701,11 @@ s390_irgen_CLGDBR(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CFEBRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CFEBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cfebra", is_valid_rounding_mode(m3)); + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F32); IRTemp result = newTemp(Ity_I32); @@ -11708,10 +11721,11 @@ s390_irgen_CFEBRA(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CFDBRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CFDBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cfdbra", is_valid_rounding_mode(m3)); + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F64); IRTemp result = newTemp(Ity_I32); @@ -11727,10 +11741,11 @@ s390_irgen_CFDBRA(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CGEBRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CGEBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cgebra", is_valid_rounding_mode(m3)); + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F32); IRTemp result = newTemp(Ity_I64); @@ -11746,10 +11761,11 @@ s390_irgen_CGEBRA(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CGDBRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CGDBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cgdbra", is_valid_rounding_mode(m3)); + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F64); IRTemp result = newTemp(Ity_I64); @@ -11903,13 +11919,14 @@ s390_irgen_LDEB(UChar r1, IRTemp op2addr) } static const HChar * -s390_irgen_LEDBRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_LEDBRA(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext && m3 != S390_BFP_ROUND_PER_FPC) { emulation_warning(EmWarn_S390X_fpext_rounding); m3 = S390_BFP_ROUND_PER_FPC; } + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); s390_insn_assert("ledbra", is_valid_rounding_mode(m3)); IRTemp op = newTemp(Ity_F64); @@ -12162,11 +12179,13 @@ s390_irgen_CXTR(UChar r1, UChar r2) static const HChar * s390_irgen_CDFTR(UChar m3 __attribute__((unused)), - UChar m4 __attribute__((unused)), UChar r1, UChar r2) + UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I32); assign(op2, get_gpr_w1(r2)); @@ -12177,12 +12196,14 @@ s390_irgen_CDFTR(UChar m3 __attribute__((unused)), static const HChar * s390_irgen_CXFTR(UChar m3 __attribute__((unused)), - UChar m4 __attribute__((unused)), UChar r1, UChar r2) + UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { s390_insn_assert("cxftr", is_valid_fpr_pair(r1)); + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I32); @@ -12193,8 +12214,7 @@ s390_irgen_CXFTR(UChar m3 __attribute__((unused)), } static const HChar * -s390_irgen_CDGTRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CDGTRA(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); @@ -12205,6 +12225,8 @@ s390_irgen_CDGTRA(UChar m3, UChar m4 __attribute__((unused)), emulation_warning(EmWarn_S390X_fpext_rounding); m3 = S390_DFP_ROUND_PER_FPC_0; } + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); assign(op2, get_gpr_dw0(r2)); put_dpr_dw0(r1, binop(Iop_I64StoD64, mkexpr(encode_dfp_rounding_mode(m3)), @@ -12215,12 +12237,14 @@ s390_irgen_CDGTRA(UChar m3, UChar m4 __attribute__((unused)), static const HChar * s390_irgen_CXGTRA(UChar m3 __attribute__((unused)), - UChar m4 __attribute__((unused)), UChar r1, UChar r2) + UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { s390_insn_assert("cxgtra", is_valid_fpr_pair(r1)); + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I64); @@ -12235,7 +12259,7 @@ s390_irgen_CXGTRA(UChar m3 __attribute__((unused)), static const HChar * s390_irgen_CDLFTR(UChar m3 __attribute__((unused)), - UChar m4 __attribute__((unused)), UChar r1, UChar r2) + UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); @@ -12243,6 +12267,8 @@ s390_irgen_CDLFTR(UChar m3 __attribute__((unused)), if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I32); assign(op2, get_gpr_w1(r2)); @@ -12254,7 +12280,7 @@ s390_irgen_CDLFTR(UChar m3 __attribute__((unused)), static const HChar * s390_irgen_CXLFTR(UChar m3 __attribute__((unused)), - UChar m4 __attribute__((unused)), UChar r1, UChar r2) + UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); @@ -12263,6 +12289,8 @@ s390_irgen_CXLFTR(UChar m3 __attribute__((unused)), emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("cxlftr", is_valid_fpr_pair(r1)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I32); @@ -12274,8 +12302,7 @@ s390_irgen_CXLFTR(UChar m3 __attribute__((unused)), } static const HChar * -s390_irgen_CDLGTR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CDLGTR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); @@ -12283,6 +12310,8 @@ s390_irgen_CDLGTR(UChar m3, UChar m4 __attribute__((unused)), if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I64); assign(op2, get_gpr_dw0(r2)); @@ -12296,7 +12325,7 @@ s390_irgen_CDLGTR(UChar m3, UChar m4 __attribute__((unused)), static const HChar * s390_irgen_CXLGTR(UChar m3 __attribute__((unused)), - UChar m4 __attribute__((unused)), UChar r1, UChar r2) + UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); @@ -12305,6 +12334,8 @@ s390_irgen_CXLGTR(UChar m3 __attribute__((unused)), emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("cxlgtr", is_valid_fpr_pair(r1)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I64); @@ -12316,8 +12347,7 @@ s390_irgen_CXLGTR(UChar m3 __attribute__((unused)), } static const HChar * -s390_irgen_CFDTR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CFDTR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); @@ -12325,6 +12355,8 @@ s390_irgen_CFDTR(UChar m3, UChar m4 __attribute__((unused)), if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_D64); IRTemp result = newTemp(Ity_I32); IRTemp rounding_mode = encode_dfp_rounding_mode(m3); @@ -12340,8 +12372,7 @@ s390_irgen_CFDTR(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CFXTR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CFXTR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); @@ -12350,6 +12381,8 @@ s390_irgen_CFXTR(UChar m3, UChar m4 __attribute__((unused)), emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("cfxtr", is_valid_fpr_pair(r2)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_D128); IRTemp result = newTemp(Ity_I32); @@ -12367,8 +12400,7 @@ s390_irgen_CFXTR(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CGDTRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CGDTRA(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); @@ -12376,6 +12408,8 @@ s390_irgen_CGDTRA(UChar m3, UChar m4 __attribute__((unused)), if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_D64); IRTemp rounding_mode = encode_dfp_rounding_mode(m3); @@ -12388,8 +12422,7 @@ s390_irgen_CGDTRA(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CGXTRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CGXTRA(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); @@ -12398,6 +12431,8 @@ s390_irgen_CGXTRA(UChar m3, UChar m4 __attribute__((unused)), emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("cgxtra", is_valid_fpr_pair(r2)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_D128); IRTemp rounding_mode = encode_dfp_rounding_mode(m3); @@ -12456,8 +12491,7 @@ s390_irgen_CEXTR(UChar r1, UChar r2) } static const HChar * -s390_irgen_CLFDTR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CLFDTR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); @@ -12465,6 +12499,8 @@ s390_irgen_CLFDTR(UChar m3, UChar m4 __attribute__((unused)), if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_D64); IRTemp result = newTemp(Ity_I32); IRTemp rounding_mode = encode_dfp_rounding_mode(m3); @@ -12480,8 +12516,7 @@ s390_irgen_CLFDTR(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CLFXTR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CLFXTR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); @@ -12490,6 +12525,8 @@ s390_irgen_CLFXTR(UChar m3, UChar m4 __attribute__((unused)), emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("clfxtr", is_valid_fpr_pair(r2)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_D128); IRTemp result = newTemp(Ity_I32); @@ -12507,8 +12544,7 @@ s390_irgen_CLFXTR(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CLGDTR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CLGDTR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); @@ -12516,6 +12552,8 @@ s390_irgen_CLGDTR(UChar m3, UChar m4 __attribute__((unused)), if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_D64); IRTemp result = newTemp(Ity_I64); IRTemp rounding_mode = encode_dfp_rounding_mode(m3); @@ -12531,8 +12569,7 @@ s390_irgen_CLGDTR(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CLGXTR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CLGXTR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); @@ -12541,6 +12578,8 @@ s390_irgen_CLGXTR(UChar m3, UChar m4 __attribute__((unused)), emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("clgxtr", is_valid_fpr_pair(r2)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_D128); IRTemp result = newTemp(Ity_I64); @@ -12701,11 +12740,13 @@ s390_irgen_IEXTR(UChar r3, UChar r1, UChar r2) } static const HChar * -s390_irgen_LDETR(UChar m4 __attribute__((unused)), UChar r1, UChar r2) +s390_irgen_LDETR(UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { + if ((m4 & 0x8) != 0) + emulation_warning(EmWarn_S390X_XiC_not_zero); IRTemp op = newTemp(Ity_D32); assign(op, get_dpr_w0(r2)); @@ -12715,11 +12756,13 @@ s390_irgen_LDETR(UChar m4 __attribute__((unused)), UChar r1, UChar r2) } static const HChar * -s390_irgen_LXDTR(UChar m4 __attribute__((unused)), UChar r1, UChar r2) +s390_irgen_LXDTR(UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { + if ((m4 & 0x8) != 0) + emulation_warning(EmWarn_S390X_XiC_not_zero); s390_insn_assert("lxdtr", is_valid_fpr_pair(r1)); IRTemp op = newTemp(Ity_D64); @@ -12731,8 +12774,7 @@ s390_irgen_LXDTR(UChar m4 __attribute__((unused)), UChar r1, UChar r2) } static const HChar * -s390_irgen_LDXTR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_LDXTR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); @@ -12746,6 +12788,10 @@ s390_irgen_LDXTR(UChar m3, UChar m4 __attribute__((unused)), emulation_warning(EmWarn_S390X_fpext_rounding); m3 = S390_DFP_ROUND_PER_FPC_0; } + if ((m4 & 0x8) != 0) + emulation_warning(EmWarn_S390X_XiC_not_zero); + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp result = newTemp(Ity_D64); assign(result, binop(Iop_D128toD64, mkexpr(encode_dfp_rounding_mode(m3)), @@ -12756,8 +12802,7 @@ s390_irgen_LDXTR(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_LEDTR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_LEDTR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); @@ -12768,6 +12813,10 @@ s390_irgen_LEDTR(UChar m3, UChar m4 __attribute__((unused)), emulation_warning(EmWarn_S390X_fpext_rounding); m3 = S390_DFP_ROUND_PER_FPC_0; } + if ((m4 & 0x8) != 0) + emulation_warning(EmWarn_S390X_XiC_not_zero); + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_D64); assign(op, get_dpr_dw0(r2)); @@ -14855,11 +14904,12 @@ s390_irgen_KDB(UChar r1, IRTemp op2addr) } static const HChar * -s390_irgen_CXFBRA(UChar m3, - UChar m4 __attribute__((unused)), UChar r1, UChar r2) +s390_irgen_CXFBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cxfbra", is_valid_fpr_pair(r1)); s390_insn_assert("cxfbra", is_valid_rounding_mode(m3)); + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I32); @@ -14870,14 +14920,15 @@ s390_irgen_CXFBRA(UChar m3, } static const HChar * -s390_irgen_CXLFBR(UChar m3, - UChar m4 __attribute__((unused)), UChar r1, UChar r2) +s390_irgen_CXLFBR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("cxlfbr", is_valid_fpr_pair(r1)); s390_insn_assert("cxlfbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I32); @@ -14889,11 +14940,12 @@ s390_irgen_CXLFBR(UChar m3, static const HChar * -s390_irgen_CXGBRA(UChar m3, - UChar m4 __attribute__((unused)), UChar r1, UChar r2) +s390_irgen_CXGBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cxgbra", is_valid_fpr_pair(r1)); s390_insn_assert("cxgbra", is_valid_rounding_mode(m3)); + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I64); @@ -14904,14 +14956,15 @@ s390_irgen_CXGBRA(UChar m3, } static const HChar * -s390_irgen_CXLGBR(UChar m3, - UChar m4 __attribute__((unused)), UChar r1, UChar r2) +s390_irgen_CXLGBR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("cxlgbr", is_valid_fpr_pair(r1)); s390_insn_assert("cxlgbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I64); @@ -14922,11 +14975,12 @@ s390_irgen_CXLGBR(UChar m3, } static const HChar * -s390_irgen_CFXBRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CFXBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cfxbra", is_valid_fpr_pair(r2)); s390_insn_assert("cfxbra", is_valid_rounding_mode(m3)); + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F128); IRTemp result = newTemp(Ity_I32); @@ -14942,14 +14996,15 @@ s390_irgen_CFXBRA(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CLFXBR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CLFXBR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("clfxbr", is_valid_fpr_pair(r2)); s390_insn_assert("clfxbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F128); IRTemp result = newTemp(Ity_I32); @@ -14966,11 +15021,12 @@ s390_irgen_CLFXBR(UChar m3, UChar m4 __attribute__((unused)), static const HChar * -s390_irgen_CGXBRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CGXBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cgxbra", is_valid_fpr_pair(r2)); s390_insn_assert("cgxbra", is_valid_rounding_mode(m3)); + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F128); IRTemp result = newTemp(Ity_I64); @@ -14986,14 +15042,15 @@ s390_irgen_CGXBRA(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_CLGXBR(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_CLGXBR(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext) { emulation_failure(EmFail_S390X_fpext); } else { s390_insn_assert("clgxbr", is_valid_fpr_pair(r2)); s390_insn_assert("clgxbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F128); IRTemp result = newTemp(Ity_I64); @@ -15112,10 +15169,11 @@ s390_irgen_LXEB(UChar r1, IRTemp op2addr) } static const HChar * -s390_irgen_FIEBRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_FIEBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("fiebra", is_valid_rounding_mode(m3)); + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp result = newTemp(Ity_F32); @@ -15127,10 +15185,11 @@ s390_irgen_FIEBRA(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_FIDBRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_FIDBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("fidbra", is_valid_rounding_mode(m3)); + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp result = newTemp(Ity_F64); @@ -15142,12 +15201,13 @@ s390_irgen_FIDBRA(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_FIXBRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_FIXBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("fixbra", is_valid_fpr_pair(r1)); s390_insn_assert("fixbra", is_valid_fpr_pair(r2)); s390_insn_assert("fixbra", is_valid_rounding_mode(m3)); + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp result = newTemp(Ity_F128); @@ -15237,13 +15297,14 @@ s390_irgen_LPXBR(UChar r1, UChar r2) } static const HChar * -s390_irgen_LDXBRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_LDXBRA(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext && m3 != S390_BFP_ROUND_PER_FPC) { emulation_warning(EmWarn_S390X_fpext_rounding); m3 = S390_BFP_ROUND_PER_FPC; } + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); s390_insn_assert("ldxbra", is_valid_fpr_pair(r1)); s390_insn_assert("ldxbra", is_valid_fpr_pair(r2)); s390_insn_assert("ldxbra", is_valid_rounding_mode(m3)); @@ -15258,13 +15319,14 @@ s390_irgen_LDXBRA(UChar m3, UChar m4 __attribute__((unused)), } static const HChar * -s390_irgen_LEXBRA(UChar m3, UChar m4 __attribute__((unused)), - UChar r1, UChar r2) +s390_irgen_LEXBRA(UChar m3, UChar m4, UChar r1, UChar r2) { if (! s390_host_has_fpext && m3 != S390_BFP_ROUND_PER_FPC) { emulation_warning(EmWarn_S390X_fpext_rounding); m3 = S390_BFP_ROUND_PER_FPC; } + if (s390_host_has_fpext && (m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); s390_insn_assert("lexbra", is_valid_fpr_pair(r1)); s390_insn_assert("lexbra", is_valid_fpr_pair(r2)); s390_insn_assert("lexbra", is_valid_rounding_mode(m3)); @@ -16088,7 +16150,7 @@ s390_irgen_TRE(UChar r1,UChar r2) /* Load character from source string and compare with test byte */ assign(op, load(Ity_I8, mkexpr(src_addr))); - + s390_cc_set_val(1); next_insn_if(binop(Iop_CmpEQ8, mkexpr(op), mkexpr(test_byte))); diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index db78238ae2..85da551d56 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -719,7 +719,7 @@ IRSB* LibVEX_FrontEnd ( /*MOD*/ VexTranslateArgs* vta, vta->guest_extents, &vta->archinfo_host, guest_word_type, host_word_type); - + if (vex_traceflags & VEX_TRACE_INST) { vex_printf("\n------------------------" " After instrumentation " @@ -1541,6 +1541,14 @@ const HChar* LibVEX_EmNote_string ( VexEmNote ew ) " feature requires the floating point extension facility\n" " which is not available on this host. Continuing using\n" " the rounding mode from FPC. Results may differ!"; + case EmWarn_S390X_XxC_not_zero: + return "Encountered an insn with the IEEE-inexact-exception control\n" + " (XxC) bit set to 1. This is not supported. Continuing anyway.\n" + " IEEE-inexact exceptions will not be suppressed."; + case EmWarn_S390X_XiC_not_zero: + return "Encountered an insn with the IEEE-invalid-operation-exception\n" + " control (XiC) bit set to 1. This is not supported. Continuing anyway.\n" + " IEEE-invalid-operation exceptions will not be suppressed."; case EmFail_S390X_stfle: return "Instruction stfle is not supported on this host"; case EmFail_S390X_stckf: diff --git a/VEX/pub/libvex_emnote.h b/VEX/pub/libvex_emnote.h index be17a8922f..bd998a1c0e 100644 --- a/VEX/pub/libvex_emnote.h +++ b/VEX/pub/libvex_emnote.h @@ -37,7 +37,7 @@ #include "libvex_basictypes.h" /* VEX can sometimes generate code which returns to the dispatcher - with the guest state pointer set to VEX_TRC_JMP_EMWARN or + with the guest state pointer set to VEX_TRC_JMP_EMWARN or VEX_TRC_JMP_EMFAIL. This means that VEX is trying to tell Valgrind something noteworthy about emulation progress. For example, that Valgrind is doing imprecise emulation in some sense. The guest's pseudo-register @@ -67,16 +67,16 @@ typedef /* unmasking SSE FP exceptions is not supported */ EmWarn_X86_sseExns, - + /* setting mxcsr.fz is not supported */ EmWarn_X86_fz, - + /* setting mxcsr.daz is not supported */ EmWarn_X86_daz, /* settings to %eflags.ac (alignment check) are noted but ignored */ EmWarn_X86_acFlag, - + /* unmasking PPC32/64 FP exceptions is not supported */ EmWarn_PPCexns, @@ -89,6 +89,16 @@ typedef facility is not available on this host */ EmWarn_S390X_fpext_rounding, + /* Various BFP insns have an M4 field containing the + IEEE-inexact-exception (XxC) control bit. That bit cannot me modelled + in VEX and is expected to be zero. */ + EmWarn_S390X_XxC_not_zero, + + /* Various DFP insns have an M4 field containing the + IEEE-invalid-operation (XiC) control bit. That bit cannot me modelled + in VEX and is expected to be zero. */ + EmWarn_S390X_XiC_not_zero, + /* stfle insn is not supported on this host */ EmFail_S390X_stfle, diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am index 66254c3bbf..e0ca00d5ba 100644 --- a/none/tests/s390x/Makefile.am +++ b/none/tests/s390x/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/Makefile.tool-tests.am -dist_noinst_SCRIPTS = filter_stderr bfp-emit.pl +dist_noinst_SCRIPTS = filter_stderr bfp-emit.pl emwarn-gen.pl INSN_TESTS = clc clcle cvb cvd icm lpr lam_stam xc mvst add sub mul \ and or xor insert div srst fold_And16 flogr sub_EI add_EI \ @@ -44,6 +44,7 @@ EXTRA_DIST = \ bfp-load.vgtest bfp-load.stdout.exp bfp-load.stderr.exp \ bfp-tdc.vgtest bfp-tdc.stdout.exp bfp-tdc.stderr.exp \ bfp-emit.vgtest bfp-emit.stderr.exp bfp-emit.post.exp \ + bfp-XxC.vgtest bfp-XxC.stderr.exp bfp-XxC.post.exp \ ecag.stdout.exp-z10ec ecag.stdout.exp-z196 ecag.stdout.exp-zec12 \ ecag.stdout.exp-z13 ecag.stdout.exp-z14 ecag.stdout.exp-z15 \ ecag.stdout.exp-z16 \ @@ -57,6 +58,8 @@ EXTRA_DIST = \ dfptest.stderr.exp dfptest.stdout.exp dfptest.vgtest \ dfpext.stderr.exp dfpext.stdout.exp dfpext.vgtest \ dfpconv.stderr.exp dfpconv.stdout.exp dfpconv.vgtest \ + dfp-XxC.vgtest dfp-XxC.stderr.exp dfp-XxC.post.exp \ + dfp-XiC.vgtest dfp-XiC.stderr.exp dfp-XiC.post.exp \ srnmt.stderr.exp srnmt.stdout.exp srnmt.vgtest \ stfle.stdout.exp-z16 \ pfpo.stderr.exp pfpo.stdout.exp pfpo.vgtest diff --git a/none/tests/s390x/bfp-XxC.post.exp b/none/tests/s390x/bfp-XxC.post.exp new file mode 100644 index 0000000000..4e63c6b4e6 --- /dev/null +++ b/none/tests/s390x/bfp-XxC.post.exp @@ -0,0 +1,234 @@ + +============================================================ +BFP CONVERT FROM FIXED +============================================================ +Testing: cefbra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cdfbra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cxfbra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cegbra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cdgbra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cxgbra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + + +============================================================ +BFP CONVERT FROM LOGICAL +============================================================ +Testing: celfbr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cdlfbr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cxlfbr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: celgbr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cdlgbr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cxlgbr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + + +============================================================ +BFP CONVERT TO FIXED +============================================================ +Testing: cfebra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cfdbra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cfxbra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cgebra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cgdbra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cgxbra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + + +============================================================ +BFP CONVERT TO LOGICAL +============================================================ +Testing: clfebr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: clfdbr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: clfxbr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: clgebr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: clgdbr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: clgxbr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + + +============================================================ +BFP LOAD FP INTEGER +============================================================ +Testing: fiebra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: fidbra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: fixbra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + + +============================================================ +BFP LOAD ROUNDED +============================================================ +Testing: ledbra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: ldxbra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: lexbra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + diff --git a/none/tests/s390x/bfp-XxC.stderr.exp b/none/tests/s390x/bfp-XxC.stderr.exp new file mode 100644 index 0000000000..139597f9cb --- /dev/null +++ b/none/tests/s390x/bfp-XxC.stderr.exp @@ -0,0 +1,2 @@ + + diff --git a/none/tests/s390x/bfp-XxC.vgtest b/none/tests/s390x/bfp-XxC.vgtest new file mode 100644 index 0000000000..af289c94ad --- /dev/null +++ b/none/tests/s390x/bfp-XxC.vgtest @@ -0,0 +1,3 @@ +prereq: ../../../tests/s390x_features s390x-fpext +prog: /bin/true +post: ./emwarn-gen.pl --bfp-XxC diff --git a/none/tests/s390x/dfp-XiC.post.exp b/none/tests/s390x/dfp-XiC.post.exp new file mode 100644 index 0000000000..e51ad83302 --- /dev/null +++ b/none/tests/s390x/dfp-XiC.post.exp @@ -0,0 +1,36 @@ + +============================================================ +DFP LOAD LENGTHENED +============================================================ +Testing: ldetr 0,0,8 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-invalid-operation-exception + control (XiC) bit set to 1. This is not supported. Continuing anyway. + IEEE-invalid-operation exceptions will not be suppressed. + at 0x........: (below main) + +Testing: lxdtr 0,0,8 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-invalid-operation-exception + control (XiC) bit set to 1. This is not supported. Continuing anyway. + IEEE-invalid-operation exceptions will not be suppressed. + at 0x........: (below main) + + +============================================================ +DFP LOAD ROUNDED +============================================================ +Testing: ledtr 0,0,0,8 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-invalid-operation-exception + control (XiC) bit set to 1. This is not supported. Continuing anyway. + IEEE-invalid-operation exceptions will not be suppressed. + at 0x........: (below main) + +Testing: ldxtr 0,0,0,8 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-invalid-operation-exception + control (XiC) bit set to 1. This is not supported. Continuing anyway. + IEEE-invalid-operation exceptions will not be suppressed. + at 0x........: (below main) + diff --git a/none/tests/s390x/dfp-XiC.stderr.exp b/none/tests/s390x/dfp-XiC.stderr.exp new file mode 100644 index 0000000000..139597f9cb --- /dev/null +++ b/none/tests/s390x/dfp-XiC.stderr.exp @@ -0,0 +1,2 @@ + + diff --git a/none/tests/s390x/dfp-XiC.vgtest b/none/tests/s390x/dfp-XiC.vgtest new file mode 100644 index 0000000000..bea81fbee8 --- /dev/null +++ b/none/tests/s390x/dfp-XiC.vgtest @@ -0,0 +1,3 @@ +prereq: ../../../tests/s390x_features s390x-fpext && ../../../tests/s390x_features s390x-dfp +prog: /bin/true +post: ./emwarn-gen.pl --dfp-XiC diff --git a/none/tests/s390x/dfp-XxC.post.exp b/none/tests/s390x/dfp-XxC.post.exp new file mode 100644 index 0000000000..a3af320116 --- /dev/null +++ b/none/tests/s390x/dfp-XxC.post.exp @@ -0,0 +1,146 @@ + +============================================================ +DFP CONVERT FROM FIXED +============================================================ +Testing: cdgtra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cxgtra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cdftr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cxftr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + + +============================================================ +DFP CONVERT FROM LOGICAL +============================================================ +Testing: cdlgtr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cxlgtr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cdlftr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cxlftr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + + +============================================================ +DFP CONVERT TO FIXED +============================================================ +Testing: cgdtra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cgxtra 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cfdtr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: cfxtr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + + +============================================================ +DFP CONVERT TO LOGICAL +============================================================ +Testing: clgdtr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: clgxtr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: clfdtr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: clfxtr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + + +============================================================ +DFP LOAD ROUNDED +============================================================ +Testing: ledtr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + +Testing: ldxtr 0,0,0,4 +Emulation warning: unsupported action: + Encountered an insn with the IEEE-inexact-exception control + (XxC) bit set to 1. This is not supported. Continuing anyway. + IEEE-inexact exceptions will not be suppressed. + at 0x........: (below main) + diff --git a/none/tests/s390x/dfp-XxC.stderr.exp b/none/tests/s390x/dfp-XxC.stderr.exp new file mode 100644 index 0000000000..139597f9cb --- /dev/null +++ b/none/tests/s390x/dfp-XxC.stderr.exp @@ -0,0 +1,2 @@ + + diff --git a/none/tests/s390x/dfp-XxC.vgtest b/none/tests/s390x/dfp-XxC.vgtest new file mode 100644 index 0000000000..681c300a12 --- /dev/null +++ b/none/tests/s390x/dfp-XxC.vgtest @@ -0,0 +1,3 @@ +prereq: ../../../tests/s390x_features s390x-fpext && ../../../tests/s390x_features s390x-dfp +prog: /bin/true +post: ./emwarn-gen.pl --dfp-XxC diff --git a/none/tests/s390x/emwarn-gen.pl b/none/tests/s390x/emwarn-gen.pl new file mode 100755 index 0000000000..7a142d795a --- /dev/null +++ b/none/tests/s390x/emwarn-gen.pl @@ -0,0 +1,179 @@ +#!/usr/bin/env perl + +#-------------------------------------------------------------------- +# Create testcases for checking BFP/DFP emulation warnings +# +# This machinery is to circumwent valgrind's limitation of at most +# 3 emulation warnings per emulation kind. +#-------------------------------------------------------------------- + +use strict; +use warnings; +use Cwd 'abs_path'; +use Getopt::Long; + +my $rootdir = get_rootdir(); +my $runone = "$rootdir/auxprogs/s390-runone"; +my $valgrind = "$rootdir/coregrind/valgrind"; +my $valargs = "-q --tool=none --show-emwarns=yes"; + +&main; + +sub main +{ + GetOptions("bfp-XxC" => sub { test_bfp_XxC(); }, + "dfp-XiC" => sub { test_dfp_XiC(); }, + "dfp-XxC" => sub { test_dfp_XxC(); }, + ) or exit 1; + exit 0; +} + +sub test_bfp_XxC +{ + header("BFP CONVERT FROM FIXED"); + run_insn_test("cefbra 0,0,0,4"); + run_insn_test("cdfbra 0,0,0,4"); + run_insn_test("cxfbra 0,0,0,4"); + run_insn_test("cegbra 0,0,0,4"); + run_insn_test("cdgbra 0,0,0,4"); + run_insn_test("cxgbra 0,0,0,4"); + + header("BFP CONVERT FROM LOGICAL"); + run_insn_test("celfbr 0,0,0,4"); + run_insn_test("cdlfbr 0,0,0,4"); + run_insn_test("cxlfbr 0,0,0,4"); + run_insn_test("celgbr 0,0,0,4"); + run_insn_test("cdlgbr 0,0,0,4"); + run_insn_test("cxlgbr 0,0,0,4"); + + header("BFP CONVERT TO FIXED"); + run_insn_test("cfebra 0,0,0,4"); + run_insn_test("cfdbra 0,0,0,4"); + run_insn_test("cfxbra 0,0,0,4"); + run_insn_test("cgebra 0,0,0,4"); + run_insn_test("cgdbra 0,0,0,4"); + run_insn_test("cgxbra 0,0,0,4"); + + header("BFP CONVERT TO LOGICAL"); + run_insn_test("clfebr 0,0,0,4"); + run_insn_test("clfdbr 0,0,0,4"); + run_insn_test("clfxbr 0,0,0,4"); + run_insn_test("clgebr 0,0,0,4"); + run_insn_test("clgdbr 0,0,0,4"); + run_insn_test("clgxbr 0,0,0,4"); + + header("BFP LOAD FP INTEGER"); + run_insn_test("fiebra 0,0,0,4"); + run_insn_test("fidbra 0,0,0,4"); + run_insn_test("fixbra 0,0,0,4"); + + header("BFP LOAD ROUNDED"); + run_insn_test("ledbra 0,0,0,4"); + run_insn_test("ldxbra 0,0,0,4"); + run_insn_test("lexbra 0,0,0,4"); +} + +sub test_dfp_XxC +{ + header("DFP CONVERT FROM FIXED"); + run_insn_test("cdgtra 0,0,0,4"); + run_insn_test("cxgtra 0,0,0,4"); + run_insn_test("cdftr 0,0,0,4"); + run_insn_test("cxftr 0,0,0,4"); + + header("DFP CONVERT FROM LOGICAL"); + run_insn_test("cdlgtr 0,0,0,4"); + run_insn_test("cxlgtr 0,0,0,4"); + run_insn_test("cdlftr 0,0,0,4"); + run_insn_test("cxlftr 0,0,0,4"); + + header("DFP CONVERT TO FIXED"); + run_insn_test("cgdtra 0,0,0,4"); + run_insn_test("cgxtra 0,0,0,4"); + run_insn_test("cfdtr 0,0,0,4"); + run_insn_test("cfxtr 0,0,0,4"); + + header("DFP CONVERT TO LOGICAL"); + run_insn_test("clgdtr 0,0,0,4"); + run_insn_test("clgxtr 0,0,0,4"); + run_insn_test("clfdtr 0,0,0,4"); + run_insn_test("clfxtr 0,0,0,4"); + + header("DFP LOAD ROUNDED"); + run_insn_test("ledtr 0,0,0,4"); + run_insn_test("ldxtr 0,0,0,4"); +} + +sub test_dfp_XiC +{ + header("DFP LOAD LENGTHENED"); + run_insn_test("ldetr 0,0,8"); + run_insn_test("lx... [truncated message content] |
|
From: Andreas A. <ar...@so...> - 2025-09-29 14:11:40
|
https://sourceware.org/cgit/valgrind/commit/?id=69e975e759c81a7790eb1f0e58881cef64c560c6 commit 69e975e759c81a7790eb1f0e58881cef64c560c6 Author: Andreas Arnez <ar...@li...> Date: Mon Sep 29 16:11:04 2025 +0200 s390x: Fix inline assembly for STFLE The inline assembly for emitting the STFLE instruction changes GPR 0, but fails to mention it in the clobber list. Depending on the compiler's mood, this may result in wrong code. A simple fix would be to just add "0" to the clobber list, but for readability it also helps to move the inline assembly to a separate function. So do that. In that function, use an "asm" variable for GPR 0 instead of moving the value back and forth between registers. Diff: --- coregrind/m_extension/extension-s390x.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/coregrind/m_extension/extension-s390x.c b/coregrind/m_extension/extension-s390x.c index 98b825d9b5..a0c2913d47 100644 --- a/coregrind/m_extension/extension-s390x.c +++ b/coregrind/m_extension/extension-s390x.c @@ -902,6 +902,20 @@ static UWord do_extension_DFLTCC(ThreadState* tst, ULong variant) /*--- STFLE (store facility list extended) ---*/ /*---------------------------------------------------------------*/ +static int do_STFLE_insn(void* addr, ULong nwords, ULong* gpr0) +{ + register ULong reg0 asm("0") = *gpr0; + Int cc; + + asm(".insn s,0xb2b00000,%[out]\n" /* stfle */ + "ipm %[cc]\n" + : [out] "=Q"(*(ULong(*)[nwords])addr), [r0] "+d"(reg0), [cc] "=d"(cc) + : + : "cc"); + *gpr0 = reg0; + return cc >> 28; +} + static enum ExtensionError do_extension_STFLE(ThreadState* tst, ULong variant) { Int cc = 0; @@ -972,15 +986,8 @@ static enum ExtensionError do_extension_STFLE(ThreadState* tst, ULong variant) /* 195: unassigned */ | S390_SETBITS(196, 197)), }; - asm("lgr 0,%[r0]\n" - ".insn s,0xb2b00000,%[out]\n" /* stfle */ - "lgr %[r0],0\n" - "ipm %[cc]\n" - "srl %[cc],28\n" - : [out] "=Q"(*(ULong(*)[last_dw + 1])(void*)addr), [r0] "+d"(gpr0), - [cc] "=d"(cc) - : - : "cc"); + + cc = do_STFLE_insn((void*)addr, last_dw + 1, &gpr0); WRITE_GPR(tst, 0, gpr0); if (last_dw > (gpr0 & 0xff)) |
|
From: Martin C. <mc...@re...> - 2025-09-29 10:52:26
|
Thank-you Cyril. Looks perfect. Martin On Mon 2025-09-29 12:46 , Cyril Hrubis wrote: > Hi! > > I'm attaching updated patch. Hope it does address your comments. > > Please check. > > I dared to add your Signed-off-by: (I hope you do not mind) and merged, > thanks. > > Ah, and also removed the TWARN from the patch description since we does > not skip TWARN in this patch revision. > > -- > Cyril Hrubis > ch...@su... > |
|
From: Cyril H. <ch...@su...> - 2025-09-29 10:45:38
|
Hi! > I'm attaching updated patch. Hope it does address your comments. > Please check. I dared to add your Signed-off-by: (I hope you do not mind) and merged, thanks. Ah, and also removed the TWARN from the patch description since we does not skip TWARN in this patch revision. -- Cyril Hrubis ch...@su... |
|
From: Florian K. <fk...@so...> - 2025-09-28 13:18:04
|
https://sourceware.org/cgit/valgrind/commit/?id=78aa1064d8d7d46ebfb5ce488ff3355ce0db16cd commit 78aa1064d8d7d46ebfb5ce488ff3355ce0db16cd Author: Florian Krohm <fl...@ei...> Date: Sun Sep 28 13:17:28 2025 +0000 Add BZ 309100 Diff: --- NEWS | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 147f4f56f5..1d2a6ea653 100644 --- a/NEWS +++ b/NEWS @@ -67,8 +67,9 @@ bugzilla (https://bugs.kde.org/enter_bug.cgi?product=valgrind) rather than mailing the developers (or mailing lists) directly -- bugs that are not entered into bugzilla tend to get forgotten about or ignored. -331311 Valgrind shows open files in /proc/self/fd that don't work for the process +309100 s390x: Testcases for extended BFP 309554 Wrap syscall remap_file_pages (216) +331311 Valgrind shows open files in /proc/self/fd that don't work for the process 338803 Handling of dwz debug alt files or cross-CU is broken 369030 Wrap linux syscall: 171 (setdomainname) 388526 Inconsistent severity in message text: "WARNING: Serious error" @@ -139,8 +140,8 @@ are not entered into bugzilla tend to get forgotten about or ignored. 509139 Update BadSize error messages 509258 FreeBSD: add jail_attach_jd and jail_remove_jd syscall wrappers 509517 s390x: Even/odd lane confusion in various vector insns -509572 s390x: Overhaul BFP testsuite 509566 Wrap amd64-linux syscall: 442 (mount_setattr) +509572 s390x: Overhaul BFP testsuite 509590 Run the LTP tests with LTP_QUIET 509567 unhandled amd64-linux syscall: 443 (quotactl_fd) 509642 Add missing ppc64-linux syswraps |
|
From: Florian K. <fk...@so...> - 2025-09-26 22:02:45
|
https://sourceware.org/cgit/valgrind/commit/?id=b5b7e0238af259848996cf79b763600e2b76a14a commit b5b7e0238af259848996cf79b763600e2b76a14a Author: Florian Krohm <fl...@ei...> Date: Fri Sep 26 22:01:46 2025 +0000 Fix file permissions. The following files do not need to be executable: - configure.ac - Makefile*am - *.in The following files lack execute permission: - tests/platform_test - tests/vg_regtest - perf/vg_perf So from now on you can just run tests/vg_regtest and perf/vg_perf without the perl prefix. Docs changed accordingly. Diff: --- Makefile.all.am | 0 README_DEVELOPERS | 44 +++++++++++----------- cachegrind/cg_annotate.in | 0 cachegrind/cg_diff.in | 0 cachegrind/cg_merge.in | 0 configure.ac | 6 ++- coregrind/link_tool_exe_freebsd.in | 0 coregrind/vgstack.in | 0 drd/scripts/download-and-build-splash2.in | 0 drd/tests/Makefile.am | 0 drd/tests/filter_error_count.in | 0 drd/tests/filter_error_summary.in | 0 drd/tests/filter_stderr.in | 0 .../filter_stderr_and_thread_no_and_offset.in | 0 drd/tests/filter_thread_no.in | 0 drd/tests/filter_xml_and_thread_no.in | 0 gdbserver_tests/Makefile.am | 0 gdbserver_tests/README_DEVELOPERS | 4 +- gdbserver_tests/filter_gdb.in | 0 gdbserver_tests/filter_memcheck_monitor.in | 0 gdbserver_tests/filter_stderr.in | 0 gdbserver_tests/filter_vgdb.in | 0 helgrind/tests/Makefile.am | 0 helgrind/tests/filter_stderr.in | 0 massif/ms_print.in | 0 memcheck/tests/filter_dw4.in | 0 memcheck/tests/filter_overlaperror.in | 0 memcheck/tests/filter_stderr.in | 0 memcheck/tests/filter_supp.in | 0 memcheck/tests/x86/filter_pushfpopf.in | 0 tests/filter_discards.in | 0 tests/filter_stderr_basic.in | 0 tests/platform_test | 0 tests/vg_regtest.in | 2 +- 34 files changed, 29 insertions(+), 27 deletions(-) diff --git a/Makefile.all.am b/Makefile.all.am old mode 100755 new mode 100644 diff --git a/README_DEVELOPERS b/README_DEVELOPERS index fc5a801295..22e229bd49 100644 --- a/README_DEVELOPERS +++ b/README_DEVELOPERS @@ -53,15 +53,15 @@ To build and run all the regression tests, run "make [--quiet] regtest". To run a subset of the regression tests, execute: - perl tests/vg_regtest <name> + tests/vg_regtest <name> where <name> is a directory (all tests within will be run) or a single .vgtest test file, or the name of a program which has a like-named .vgtest file. Eg: - perl tests/vg_regtest memcheck - perl tests/vg_regtest memcheck/tests/badfree.vgtest - perl tests/vg_regtest memcheck/tests/badfree + tests/vg_regtest memcheck + tests/vg_regtest memcheck/tests/badfree.vgtest + tests/vg_regtest memcheck/tests/badfree The details of each vgtest run are logged to individual "vgtest.log" files. These are listed, and non-passing tests detailed, in the @@ -114,22 +114,22 @@ To build and run all the performance tests, run "make [--quiet] perf". To run a subset of the performance suite, execute: - perl perf/vg_perf <name> + perf/vg_perf <name> where <name> is a directory (all tests within will be run) or a single .vgperf test file, or the name of a program which has a like-named .vgperf file. Eg: - perl perf/vg_perf perf/ - perl perf/vg_perf perf/bz2.vgperf - perl perf/vg_perf perf/bz2 + perf/vg_perf perf/ + perf/vg_perf perf/bz2.vgperf + perf/vg_perf perf/bz2 To compare multiple versions of Valgrind, use the --vg= option multiple times. For example, if you have two Valgrinds next to each other, one in trunk1/ and one in trunk2/, from within either trunk1/ or trunk2/ do this to compare them on all the performance tests: - perl perf/vg_perf --vg=../trunk1 --vg=../trunk2 perf/ + perf/vg_perf --vg=../trunk1 --vg=../trunk2 perf/ Writing regression tests ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -183,7 +183,7 @@ See tests/vg_regtest for a full description of all possible vgtest directives. The easiest way to generate the expected files is to run the test. Create empty files with touch (otherwise the test won't run) then run the test from the -top directory using perl and vg_regtest script (as in the "Running the +top directory using vg_regtest script (as in the "Running the regression tests" section. Then copy "tool/tests/newtest.stderr.out" to "tool/tests/newtest.stderr.exp". It is better to generate the .stdout.exp file directly from the testcase. You can do that by redirecting stdout to @@ -402,16 +402,16 @@ When using self-hosting with an outer Callgrind tool, use '--pop-on-jump' (B) Regression tests in an outer/inner setup: To run all the regression tests with an outer memcheck, do : - perl tests/vg_regtest --outer-valgrind=../outer/.../bin/valgrind \ - --all + tests/vg_regtest --outer-valgrind=../outer/.../bin/valgrind \ + --all To run a specific regression tests with an outer memcheck, do: - perl tests/vg_regtest --outer-valgrind=../outer/.../bin/valgrind \ - none/tests/args.vgtest + tests/vg_regtest --outer-valgrind=../outer/.../bin/valgrind \ + none/tests/args.vgtest To run regression tests with another outer tool: - perl tests/vg_regtest --outer-valgrind=../outer/.../bin/valgrind \ - --outer-tool=helgrind --all + tests/vg_regtest --outer-valgrind=../outer/.../bin/valgrind \ + --outer-tool=helgrind --all --outer-args allows to give specific arguments to the outer tool, replacing the default one provided by vg_regtest. @@ -470,20 +470,20 @@ the guest stacktrace that did the allocation. (C) Performance tests in an outer/inner setup: To run all the performance tests with an outer cachegrind, do : - perl perf/vg_perf --outer-valgrind=../outer/.../bin/valgrind perf + perf/vg_perf --outer-valgrind=../outer/.../bin/valgrind perf To run a specific perf test (e.g. bz2) in this setup, do : - perl perf/vg_perf --outer-valgrind=../outer/.../bin/valgrind perf/bz2 + perf/vg_perf --outer-valgrind=../outer/.../bin/valgrind perf/bz2 To run all the performance tests with an outer callgrind, do : - perl perf/vg_perf --outer-valgrind=../outer/.../bin/valgrind \ - --outer-tool=callgrind perf + perf/vg_perf --outer-valgrind=../outer/.../bin/valgrind \ + --outer-tool=callgrind perf Note: --outer-valgrind must be a "make install"-ed valgrind. Do *not* use vg-in-place. To compare the performance of multiple Valgrind versions, do : - perl perf/vg_perf --outer-valgrind=../outer/.../bin/valgrind \ + perf/vg_perf --outer-valgrind=../outer/.../bin/valgrind \ --outer-tool=callgrind \ --vg=../inner_xxxx --vg=../inner_yyyy perf (where inner_xxxx and inner_yyyy are the toplevel directories of @@ -498,7 +498,7 @@ output files will be created for each test: (where tt is the two letters abbreviation for the inner tool(s) run). For example, the command - perl perf/vg_perf \ + perf/vg_perf \ --outer-valgrind=../outer_trunk/install/bin/valgrind \ --outer-tool=callgrind \ --vg=../inner_tchain --vg=../inner_trunk perf/many-loss-records diff --git a/cachegrind/cg_annotate.in b/cachegrind/cg_annotate.in old mode 100755 new mode 100644 diff --git a/cachegrind/cg_diff.in b/cachegrind/cg_diff.in old mode 100755 new mode 100644 diff --git a/cachegrind/cg_merge.in b/cachegrind/cg_merge.in old mode 100755 new mode 100644 diff --git a/configure.ac b/configure.ac old mode 100755 new mode 100644 index 1e7d506557..1a7ea34d1b --- a/configure.ac +++ b/configure.ac @@ -5752,9 +5752,7 @@ AC_CONFIG_FILES([ docs/Makefile docs/xml/vg-entities.xml tests/Makefile - tests/vg_regtest perf/Makefile - perf/vg_perf gdbserver_tests/Makefile gdbserver_tests/solaris/Makefile include/Makefile @@ -5860,6 +5858,10 @@ AC_CONFIG_FILES([tests/filter_stderr_basic], [chmod +x tests/filter_stderr_basic]) AC_CONFIG_FILES([tests/filter_discards], [chmod +x tests/filter_discards]) +AC_CONFIG_FILES([tests/vg_regtest], + [chmod +x tests/vg_regtest]) +AC_CONFIG_FILES([perf/vg_perf], + [chmod +x perf/vg_perf]) AC_CONFIG_FILES([memcheck/tests/filter_stderr], [chmod +x memcheck/tests/filter_stderr]) AC_CONFIG_FILES([memcheck/tests/filter_dw4], diff --git a/coregrind/link_tool_exe_freebsd.in b/coregrind/link_tool_exe_freebsd.in old mode 100755 new mode 100644 diff --git a/coregrind/vgstack.in b/coregrind/vgstack.in old mode 100755 new mode 100644 diff --git a/drd/scripts/download-and-build-splash2.in b/drd/scripts/download-and-build-splash2.in old mode 100755 new mode 100644 diff --git a/drd/tests/Makefile.am b/drd/tests/Makefile.am old mode 100755 new mode 100644 diff --git a/drd/tests/filter_error_count.in b/drd/tests/filter_error_count.in old mode 100755 new mode 100644 diff --git a/drd/tests/filter_error_summary.in b/drd/tests/filter_error_summary.in old mode 100755 new mode 100644 diff --git a/drd/tests/filter_stderr.in b/drd/tests/filter_stderr.in old mode 100755 new mode 100644 diff --git a/drd/tests/filter_stderr_and_thread_no_and_offset.in b/drd/tests/filter_stderr_and_thread_no_and_offset.in old mode 100755 new mode 100644 diff --git a/drd/tests/filter_thread_no.in b/drd/tests/filter_thread_no.in old mode 100755 new mode 100644 diff --git a/drd/tests/filter_xml_and_thread_no.in b/drd/tests/filter_xml_and_thread_no.in old mode 100755 new mode 100644 diff --git a/gdbserver_tests/Makefile.am b/gdbserver_tests/Makefile.am old mode 100755 new mode 100644 diff --git a/gdbserver_tests/README_DEVELOPERS b/gdbserver_tests/README_DEVELOPERS index c570f3e531..250c14326b 100644 --- a/gdbserver_tests/README_DEVELOPERS +++ b/gdbserver_tests/README_DEVELOPERS @@ -15,7 +15,7 @@ or (to just run the gdbserver tests with another gdb): make check cd .. gdbserver_tests/make_local_links /path/to/another/gdb - perl tests/vg_regtest gdbserver_tests + tests/vg_regtest gdbserver_tests The minimum version to run the tests is gdb >= 6.5. Previous versions do not have the 'target remote |' command. It @@ -45,7 +45,7 @@ You are welcome to fix such bugs by enhancing filter_gdb. Alternatively, to report such problems, the best is to re-run the gdbserver tests the following way: - perl tests/vg_regtest --keep-unfiltered gdbserver_tests + tests/vg_regtest --keep-unfiltered gdbserver_tests Then file a bug in bugzilla, giving the following information: output of diff --git a/gdbserver_tests/filter_gdb.in b/gdbserver_tests/filter_gdb.in old mode 100755 new mode 100644 diff --git a/gdbserver_tests/filter_memcheck_monitor.in b/gdbserver_tests/filter_memcheck_monitor.in old mode 100755 new mode 100644 diff --git a/gdbserver_tests/filter_stderr.in b/gdbserver_tests/filter_stderr.in old mode 100755 new mode 100644 diff --git a/gdbserver_tests/filter_vgdb.in b/gdbserver_tests/filter_vgdb.in old mode 100755 new mode 100644 diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am old mode 100755 new mode 100644 diff --git a/helgrind/tests/filter_stderr.in b/helgrind/tests/filter_stderr.in old mode 100755 new mode 100644 diff --git a/massif/ms_print.in b/massif/ms_print.in old mode 100755 new mode 100644 diff --git a/memcheck/tests/filter_dw4.in b/memcheck/tests/filter_dw4.in old mode 100755 new mode 100644 diff --git a/memcheck/tests/filter_overlaperror.in b/memcheck/tests/filter_overlaperror.in old mode 100755 new mode 100644 diff --git a/memcheck/tests/filter_stderr.in b/memcheck/tests/filter_stderr.in old mode 100755 new mode 100644 diff --git a/memcheck/tests/filter_supp.in b/memcheck/tests/filter_supp.in old mode 100755 new mode 100644 diff --git a/memcheck/tests/x86/filter_pushfpopf.in b/memcheck/tests/x86/filter_pushfpopf.in old mode 100755 new mode 100644 diff --git a/tests/filter_discards.in b/tests/filter_discards.in old mode 100755 new mode 100644 diff --git a/tests/filter_stderr_basic.in b/tests/filter_stderr_basic.in old mode 100755 new mode 100644 diff --git a/tests/platform_test b/tests/platform_test old mode 100644 new mode 100755 diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in old mode 100755 new mode 100644 index 3471322b0f..945b4c1617 --- a/tests/vg_regtest.in +++ b/tests/vg_regtest.in @@ -692,7 +692,7 @@ sub test_one_dir($$) if (256 == system("$tests_dir/tests/arch_test $dir")) { return; } if (256 == system("$tests_dir/tests/os_test $dir")) { return; } if ($dir =~ /(\w+)-(\w+)/ && - 256 == system("sh $tests_dir/tests/platform_test $1 $2")) { return; } + 256 == system("$tests_dir/tests/platform_test $1 $2")) { return; } if ($dir =~ "dSYM") { return; } chdir($dir) or die "Could not change into $dir\n"; |
|
From: Florian K. <fk...@so...> - 2025-09-26 21:51:45
|
https://sourceware.org/cgit/valgrind/commit/?id=1109ef57b23cf84be551cb9d25373a8169bedce4 commit 1109ef57b23cf84be551cb9d25373a8169bedce4 Author: Florian Krohm <fl...@ei...> Date: Fri Sep 26 21:50:39 2025 +0000 s390: Assorted BFP testsuite tweaks Rename rounding-1 to bfp-306054 because that was the corresponding BZ. Rename bfp-3 to bfp-muldiv as it is more expressive. Only compile testcases for 128-bit BFP if the compiler supports -mlong-double-128. Add -mlong-double-128 to the compile flags for the files that need it. This concludes fixing https://bugs.kde.org/show_bug.cgi?id=509572 Diff: --- .gitignore | 4 ++-- NEWS | 1 + none/tests/s390x/Makefile.am | 18 ++++++++++++++++-- none/tests/s390x/bfp-3.vgtest | 1 - none/tests/s390x/{rounding-1.c => bfp-306054.c} | 0 .../s390x/{bfp-3.stderr.exp => bfp-306054.stderr.exp} | 0 .../{rounding-1.stdout.exp => bfp-306054.stdout.exp} | 0 none/tests/s390x/bfp-306054.vgtest | 1 + none/tests/s390x/{bfp-3.c => bfp-muldiv.c} | 0 .../{rounding-1.stderr.exp => bfp-muldiv.stderr.exp} | 0 .../s390x/{bfp-3.stdout.exp => bfp-muldiv.stdout.exp} | 0 none/tests/s390x/bfp-muldiv.vgtest | 1 + none/tests/s390x/rounding-1.vgtest | 1 - 13 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 53e2a0f83d..645f261bcd 100644 --- a/.gitignore +++ b/.gitignore @@ -2184,12 +2184,12 @@ /none/tests/s390x/ecag /none/tests/s390x/fpext_warn /none/tests/s390x/fpext_fail -/none/tests/s390x/rounding-1 +/none/tests/s390x/bfp-306054 /none/tests/s390x/bfp-arith /none/tests/s390x/bfp-load /none/tests/s390x/bfp-fpc /none/tests/s390x/bfp-tdc -/none/tests/s390x/bfp-3 +/none/tests/s390x/bfp-muldiv /none/tests/s390x/bfp-compare /none/tests/s390x/bfp-convert /none/tests/s390x/comp-1 diff --git a/NEWS b/NEWS index d7f0cb3ba2..147f4f56f5 100644 --- a/NEWS +++ b/NEWS @@ -139,6 +139,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 509139 Update BadSize error messages 509258 FreeBSD: add jail_attach_jd and jail_remove_jd syscall wrappers 509517 s390x: Even/odd lane confusion in various vector insns +509572 s390x: Overhaul BFP testsuite 509566 Wrap amd64-linux syscall: 442 (mount_setattr) 509590 Run the LTP tests with LTP_QUIET 509567 unhandled amd64-linux syscall: 443 (quotactl_fd) diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am index abe71570fb..66254c3bbf 100644 --- a/none/tests/s390x/Makefile.am +++ b/none/tests/s390x/Makefile.am @@ -9,8 +9,8 @@ INSN_TESTS = clc clcle cvb cvd icm lpr lam_stam xc mvst add sub mul \ trto trot trtt tr tre cij cgij clij clgij crj cgrj clrj clgrj \ cs csg cds cdsg cu21 cu21_1 cu24 cu24_1 cu42 cu12 cu12_1 \ ex_sig ex_clone cu14 cu14_1 cu41 ecag fpext_warn fpext_fail \ - bfp-tdc bfp-load bfp-fpc bfp-convert rounding-1 bfp-arith \ - bfp-3 bfp-compare comp-1 comp-2 exrl tmll tm stmg \ + bfp-fpc bfp-306054 \ + bfp-muldiv comp-1 comp-2 exrl tmll tm stmg \ ex clst mvc test_fork test_sig rxsbg popcnt \ high-word traps \ spechelper-alr spechelper-algr \ @@ -24,6 +24,10 @@ INSN_TESTS = clc clcle cvb cvd icm lpr lam_stam xc mvst add sub mul \ dfp-1 dfp-2 dfp-3 dfp-4 dfpconv dfpext dfptest pfpo srnmt \ hfp +if HAS_MLONG_DOUBLE_128 +INSN_TESTS += bfp-arith bfp-compare bfp-convert bfp-load bfp-tdc +endif + check_PROGRAMS = $(INSN_TESTS) \ allexec \ op00 @@ -34,6 +38,11 @@ EXTRA_DIST = \ $(addsuffix .stderr.exp,$(INSN_TESTS)) \ $(addsuffix .stdout.exp,$(INSN_TESTS)) \ $(addsuffix .vgtest,$(INSN_TESTS)) \ + bfp-arith.vgtest bfp-arith.stdout.exp bfp-arith.stderr.exp \ + bfp-compare.vgtest bfp-compare.stdout.exp bfp-compare.stderr.exp \ + bfp-convert.vgtest bfp-convert.stdout.exp bfp-convert.stderr.exp \ + bfp-load.vgtest bfp-load.stdout.exp bfp-load.stderr.exp \ + bfp-tdc.vgtest bfp-tdc.stdout.exp bfp-tdc.stderr.exp \ bfp-emit.vgtest bfp-emit.stderr.exp bfp-emit.post.exp \ ecag.stdout.exp-z10ec ecag.stdout.exp-z196 ecag.stdout.exp-zec12 \ ecag.stdout.exp-z13 ecag.stdout.exp-z14 ecag.stdout.exp-z15 \ @@ -69,3 +78,8 @@ vector_integer_CFLAGS = $(AM_CFLAGS) -march=z13 -DS390_TEST_COUNT=4 vector_float_CFLAGS = $(AM_CFLAGS) -march=z13 -DS390_TEST_COUNT=4 vec2_CFLAGS = $(AM_CFLAGS) -march=z13 vec2_float_CFLAGS = $(AM_CFLAGS) -march=z13 +bfp_arith_CFLAGS = $(AM_CFLAGS) -mlong-double-128 +bfp_compare_CFLAGS = $(AM_CFLAGS) -mlong-double-128 +bfp_convert_CFLAGS = $(AM_CFLAGS) -mlong-double-128 +bfp_load_CFLAGS = $(AM_CFLAGS) -mlong-double-128 +bfp_tdc_CFLAGS = $(AM_CFLAGS) -mlong-double-128 diff --git a/none/tests/s390x/bfp-3.vgtest b/none/tests/s390x/bfp-3.vgtest deleted file mode 100644 index 8088d7d646..0000000000 --- a/none/tests/s390x/bfp-3.vgtest +++ /dev/null @@ -1 +0,0 @@ -prog: bfp-3 diff --git a/none/tests/s390x/rounding-1.c b/none/tests/s390x/bfp-306054.c similarity index 100% rename from none/tests/s390x/rounding-1.c rename to none/tests/s390x/bfp-306054.c diff --git a/none/tests/s390x/bfp-3.stderr.exp b/none/tests/s390x/bfp-306054.stderr.exp similarity index 100% rename from none/tests/s390x/bfp-3.stderr.exp rename to none/tests/s390x/bfp-306054.stderr.exp diff --git a/none/tests/s390x/rounding-1.stdout.exp b/none/tests/s390x/bfp-306054.stdout.exp similarity index 100% rename from none/tests/s390x/rounding-1.stdout.exp rename to none/tests/s390x/bfp-306054.stdout.exp diff --git a/none/tests/s390x/bfp-306054.vgtest b/none/tests/s390x/bfp-306054.vgtest new file mode 100644 index 0000000000..3948f34274 --- /dev/null +++ b/none/tests/s390x/bfp-306054.vgtest @@ -0,0 +1 @@ +prog: bfp-306054 diff --git a/none/tests/s390x/bfp-3.c b/none/tests/s390x/bfp-muldiv.c similarity index 100% rename from none/tests/s390x/bfp-3.c rename to none/tests/s390x/bfp-muldiv.c diff --git a/none/tests/s390x/rounding-1.stderr.exp b/none/tests/s390x/bfp-muldiv.stderr.exp similarity index 100% rename from none/tests/s390x/rounding-1.stderr.exp rename to none/tests/s390x/bfp-muldiv.stderr.exp diff --git a/none/tests/s390x/bfp-3.stdout.exp b/none/tests/s390x/bfp-muldiv.stdout.exp similarity index 100% rename from none/tests/s390x/bfp-3.stdout.exp rename to none/tests/s390x/bfp-muldiv.stdout.exp diff --git a/none/tests/s390x/bfp-muldiv.vgtest b/none/tests/s390x/bfp-muldiv.vgtest new file mode 100644 index 0000000000..df1275fa7e --- /dev/null +++ b/none/tests/s390x/bfp-muldiv.vgtest @@ -0,0 +1 @@ +prog: bfp-muldiv diff --git a/none/tests/s390x/rounding-1.vgtest b/none/tests/s390x/rounding-1.vgtest deleted file mode 100644 index 4c1e45b2bc..0000000000 --- a/none/tests/s390x/rounding-1.vgtest +++ /dev/null @@ -1 +0,0 @@ -prog: rounding-1 |
|
From: Mark W. <ma...@so...> - 2025-09-24 22:36:15
|
https://sourceware.org/cgit/valgrind/commit/?id=b2c27072b05777fe8dc6d32791de1e4eff044ebb commit b2c27072b05777fe8dc6d32791de1e4eff044ebb Author: Mark Wielaard <ma...@kl...> Date: Wed Sep 24 23:16:29 2025 +0200 Deal with linux arches that don't have getdents, only getdents64 Not all linux arches have getdents, some newer arches (arm64 and riscv64) only implement getdents64. So only use the function filter_valgrind_fds_from_getdents_with_refill on linux with __NR_getdents. Also move the getdents_filter testcase under none/tests/linux and only use getdents64. Fixes: e8e4066c3a01 ("Filter Valgrind FDs from getdents syscalls") https://bugs.kde.org/show_bug.cgi?id=331311 Diff: --- coregrind/m_syswrap/syswrap-generic.c | 15 +++++++++++++++ none/tests/Makefile.am | 2 -- none/tests/linux/Makefile.am | 2 ++ none/tests/{ => linux}/getdents_filter.c | 15 +++++++++------ none/tests/{ => linux}/getdents_filter.stderr.exp | 0 none/tests/{ => linux}/getdents_filter.stdout.exp | 0 none/tests/{ => linux}/getdents_filter.vgtest | 0 7 files changed, 26 insertions(+), 8 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index 33b58f5a5e..3786e9cd89 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -4045,6 +4045,10 @@ static Bool should_keep_fd_entry(const HChar *name) return True; } +/* Make sure we really need the proc filtering using (32bit) getdents, + which not every linux arch implements. */ +#if defined(VGO_linux) && defined(__NR_getdents) + /* Filter and compact dirent entries */ static SizeT filter_dirent_entries(struct vki_dirent *dirp, SizeT orig_size) { @@ -4067,6 +4071,7 @@ static SizeT filter_dirent_entries(struct vki_dirent *dirp, SizeT orig_size) return new_size; } +#endif /* defined(VGO_linux) && defined(__NR_getdents) */ /* Filter and compact dirent64 entries */ static SizeT filter_dirent64_entries(struct vki_dirent64 *dirp, SizeT orig_size) @@ -4091,6 +4096,10 @@ static SizeT filter_dirent64_entries(struct vki_dirent64 *dirp, SizeT orig_size) return new_size; } +/* Make sure we really need the proc filtering using (32bit) getdents, + which not every linux arch implements. */ +#if defined(VGO_linux) && defined(__NR_getdents) + /* Filter out Valgrind's internal file descriptors from getdents results with refill capability. When entries are filtered out, attempts to read more entries to avoid empty results. Returns filtered size on success, or -1 if retry syscall failed. */ @@ -4119,6 +4128,7 @@ static SizeT filter_valgrind_fds_from_getdents_with_refill(Int fd, struct vki_di return new_size; } +#endif /* defined(VGO_linux) && defined(__NR_getdents) */ /* Filter out Valgrind's internal file descriptors from getdents64 results with refill capability. Same logic as getdents version but for 64-bit dirent structures. @@ -4155,6 +4165,10 @@ POST(sys_getdents) if (RES > 0) { SizeT result_size = RES; + /* Make sure we really need the proc filtering using (32bit) getdents, + which not every linux arch implements. */ +#if defined(VGO_linux) && defined(__NR_getdents) + /* Only filter Valgrind FDs when listing /proc/PID/fd or /proc/PID/fdinfo directories */ if (is_proc_fd_directory(ARG1)) { SizeT filtered_size = filter_valgrind_fds_from_getdents_with_refill(ARG1, (struct vki_dirent *)ARG2, RES, ARG3, status); @@ -4166,6 +4180,7 @@ POST(sys_getdents) if (result_size != RES) SET_STATUS_Success(result_size); } +#endif /* defined(VGO_linux) && defined(__NR_getdents) */ POST_MEM_WRITE( ARG2, result_size ); } diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index ccdd85e53e..716ce000d3 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -172,7 +172,6 @@ EXTRA_DIST = \ floored.stderr.exp floored.stdout.exp floored.vgtest \ fork.stderr.exp fork.stdout.exp fork.vgtest \ fucomip.stderr.exp fucomip.vgtest \ - getdents_filter.stderr.exp getdents_filter.stdout.exp getdents_filter.vgtest \ gxx304.stderr.exp gxx304.vgtest \ ifunc.stderr.exp ifunc.stdout.exp ifunc.vgtest \ ioctl_moans.stderr.exp ioctl_moans.vgtest \ @@ -292,7 +291,6 @@ check_PROGRAMS = \ fdleak_fcntl fdleak_ipv4 fdleak_open fdleak_pipe \ fdleak_socketpair \ floored fork fucomip \ - getdents_filter \ ioctl_moans \ libvex_test \ libvexmultiarch_test \ diff --git a/none/tests/linux/Makefile.am b/none/tests/linux/Makefile.am index 7bfcedc862..55426e2b26 100644 --- a/none/tests/linux/Makefile.am +++ b/none/tests/linux/Makefile.am @@ -10,6 +10,7 @@ EXTRA_DIST = \ bug498317.stderr.exp bug498317.supp bug498317.vgtest \ bug506910.stderr.exp bug506910.vgtest \ clonev.stdout.exp clonev.stderr.exp clonev.vgtest \ + getdents_filter.stderr.exp getdents_filter.stdout.exp getdents_filter.vgtest \ membarrier.stderr.exp membarrier.vgtest \ mremap.stderr.exp mremap.stderr.exp-glibc27 mremap.stdout.exp \ mremap.vgtest \ @@ -28,6 +29,7 @@ check_PROGRAMS = \ brk-overflow2 \ bug498317 \ clonev \ + getdents_filter \ mremap \ mremap2 \ mremap3 \ diff --git a/none/tests/getdents_filter.c b/none/tests/linux/getdents_filter.c similarity index 92% rename from none/tests/getdents_filter.c rename to none/tests/linux/getdents_filter.c index d508cdde0f..361659f51d 100644 --- a/none/tests/getdents_filter.c +++ b/none/tests/linux/getdents_filter.c @@ -13,10 +13,11 @@ #include <sys/syscall.h> #include <sys/types.h> -struct linux_dirent { - unsigned long d_ino; - off_t d_off; +struct linux_dirent64 { + ino64_t d_ino; + off64_t d_off; unsigned short d_reclen; + unsigned char d_type; char d_name[]; }; @@ -67,7 +68,7 @@ static void test_retry_logic_with_small_buffer(void) int fd; char buf[SMALL_BUF_SIZE]; long nread; - struct linux_dirent *d; + struct linux_dirent64 *d; printf("retry_test_start\n"); @@ -83,7 +84,9 @@ static void test_retry_logic_with_small_buffer(void) * may return only Valgrind FDs, which will trigger the retry mechanism. */ for (;;) { - nread = syscall(SYS_getdents, fd, buf, SMALL_BUF_SIZE); + /* Note, using getdents64 since some linux arches don't implement + the 32bit getdents. */ + nread = syscall(SYS_getdents64, fd, buf, SMALL_BUF_SIZE); if (nread == -1) { printf("retry_test_error\n"); @@ -97,7 +100,7 @@ static void test_retry_logic_with_small_buffer(void) /* Print client FD entries found in this buffer (excluding . and ..) */ for (size_t bpos = 0; bpos < nread;) { - d = (struct linux_dirent *)(buf + bpos); + d = (struct linux_dirent64 *)(buf + bpos); if (strcmp(d->d_name, ".") != 0 && strcmp(d->d_name, "..") != 0) { char *endptr; long fd_num = strtol(d->d_name, &endptr, 10); diff --git a/none/tests/getdents_filter.stderr.exp b/none/tests/linux/getdents_filter.stderr.exp similarity index 100% rename from none/tests/getdents_filter.stderr.exp rename to none/tests/linux/getdents_filter.stderr.exp diff --git a/none/tests/getdents_filter.stdout.exp b/none/tests/linux/getdents_filter.stdout.exp similarity index 100% rename from none/tests/getdents_filter.stdout.exp rename to none/tests/linux/getdents_filter.stdout.exp diff --git a/none/tests/getdents_filter.vgtest b/none/tests/linux/getdents_filter.vgtest similarity index 100% rename from none/tests/getdents_filter.vgtest rename to none/tests/linux/getdents_filter.vgtest |
|
From: Florian K. <fk...@so...> - 2025-09-24 20:58:38
|
https://sourceware.org/cgit/valgrind/commit/?id=c574f5eb10d06b491512806354f8d15c3d3e020a commit c574f5eb10d06b491512806354f8d15c3d3e020a Author: Florian Krohm <fl...@ei...> Date: Wed Sep 24 20:54:22 2025 +0000 s390: Remove rounding-6 BFP testcase (convert to int) Should have been part of 18c5454874d. Part of fixing https://bugs.kde.org/show_bug.cgi?id=509572 Diff: --- .gitignore | 1 - none/tests/s390x/Makefile.am | 2 +- none/tests/s390x/rounding-6.c | 159 ------------------------ none/tests/s390x/rounding-6.stderr.exp | 2 - none/tests/s390x/rounding-6.stdout.exp | 216 --------------------------------- none/tests/s390x/rounding-6.vgtest | 1 - 6 files changed, 1 insertion(+), 380 deletions(-) diff --git a/.gitignore b/.gitignore index b059789b86..53e2a0f83d 100644 --- a/.gitignore +++ b/.gitignore @@ -2185,7 +2185,6 @@ /none/tests/s390x/fpext_warn /none/tests/s390x/fpext_fail /none/tests/s390x/rounding-1 -/none/tests/s390x/rounding-6 /none/tests/s390x/bfp-arith /none/tests/s390x/bfp-load /none/tests/s390x/bfp-fpc diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am index afa61c94b8..abe71570fb 100644 --- a/none/tests/s390x/Makefile.am +++ b/none/tests/s390x/Makefile.am @@ -11,7 +11,7 @@ INSN_TESTS = clc clcle cvb cvd icm lpr lam_stam xc mvst add sub mul \ ex_sig ex_clone cu14 cu14_1 cu41 ecag fpext_warn fpext_fail \ bfp-tdc bfp-load bfp-fpc bfp-convert rounding-1 bfp-arith \ bfp-3 bfp-compare comp-1 comp-2 exrl tmll tm stmg \ - ex clst mvc test_fork test_sig rounding-6 rxsbg popcnt \ + ex clst mvc test_fork test_sig rxsbg popcnt \ high-word traps \ spechelper-alr spechelper-algr \ spechelper-slr spechelper-slgr \ diff --git a/none/tests/s390x/rounding-6.c b/none/tests/s390x/rounding-6.c deleted file mode 100644 index e880876829..0000000000 --- a/none/tests/s390x/rounding-6.c +++ /dev/null @@ -1,159 +0,0 @@ -#include <assert.h> -#include <stdlib.h> -#include <stdio.h> -#include <stdint.h> -#include <inttypes.h> -#include "opcodes.h" -#include "rounding.h" - -/* Test "convert to fixed" with rounding mode given in insn (m3 field) - Covers all generally available rounding modes that can be mapped to - IRRoundingMode. As a consequence m3=1 which is "round to nearest with - ties away from 0" is not tested here. -*/ - -const char * -rtext(unsigned m3_round) -{ - switch (m3_round) { - case 0: return "[-> per fpc]"; - case 1: return "[-> nearest away]"; - case 3: return "[-> prepare short]"; // floating point extension fac needed - case 4: return "[-> nearest even]"; - case 5: return "[-> 0]"; - case 6: return "[-> +inf]"; - case 7: return "[-> -inf]"; - } - assert(0); -} - -#define convert_to_int(opcode,src_type,dst_type,dst_fmt,round,value) \ -do { \ - src_type src = value; \ - dst_type dst; \ - unsigned cc; \ - \ - __asm__ volatile (opcode " %[dst]," #round ",%[src]\n\t" \ - "ipm %[cc]\n\t" \ - "srl %[cc],28\n\t" \ - : [dst] "=d"(dst), [cc] "=d"(cc) \ - : [src] "f"(src) \ - : "cc"); \ - \ - printf("%s %f\t-> %"dst_fmt"\tcc = %u %s\n", \ - opcode, src, dst, cc, rtext(round)); \ -} while (0) - -#define round_to_int(opcode,type,round,value) \ -do { \ - type src = value; \ - type dst; \ - \ - __asm__ volatile (opcode " %[dst]," #round ",%[src]\n\t" \ - : [dst] "=f"(dst) \ - : [src] "f"(src)); \ - \ - printf("%s %.5f\t-> %g %s\n", \ - opcode, src, dst, rtext(round)); \ -} while (0) - - -#define cfebr(value, round) \ - convert_to_int("cfebr",float,int32_t,PRId32,round,value) -#define cfdbr(value, round) \ - convert_to_int("cfdbr",double,int32_t,PRId32,round,value) -#define cgebr(value, round) \ - convert_to_int("cgebr",float,int64_t,PRId64,round,value) -#define cgdbr(value, round) \ - convert_to_int("cgdbr",double,int64_t,PRId64,round,value) - -#define fiebr(value, round) \ - round_to_int("fiebr",float,round,value) -#define fidbr(value, round) \ - round_to_int("fidbr",double,round,value) - -void -set_rounding_mode(unsigned mode) -{ - register unsigned r asm("1") = mode; - __asm__ volatile ( SFPC(1) : : "d"(r) ); -} - - -int main(void) -{ - int j; - static const float fval[] = { - 1.25f, 1.5f, 2.5f, 1.75f, -1.25f, -1.5f, -2.5f, -1.75f, 0.0f, - }; - static const double dval[] = { - 1.25, 1.5, 2.5, 1.75, -1.25, -1.5, -2.5, -1.75, 0.0, - }; - - /* Note when testing M3_NEAR need to set the FPC rounding mode - to something else. FPC rounding mode is NEAR by default. - Setting the FPC rounding mode to != NEAR is the only way to make - sure the M3 field is not ignored. */ - - /* f32 -> i32 */ - for (j = 0; j < sizeof fval / sizeof fval[0]; ++j) { - set_rounding_mode(FPC_BFP_ROUND_ZERO); - cfebr(fval[j], M3_BFP_ROUND_NEAREST_EVEN); - set_rounding_mode(FPC_BFP_ROUND_NEAREST_EVEN); - cfebr(fval[j], M3_BFP_ROUND_ZERO); - cfebr(fval[j], M3_BFP_ROUND_POSINF); - cfebr(fval[j], M3_BFP_ROUND_NEGINF); - } - - /* f32 -> i64 */ - for (j = 0; j < sizeof fval / sizeof fval[0]; ++j) { - set_rounding_mode(FPC_BFP_ROUND_ZERO); - cgebr(fval[j], M3_BFP_ROUND_NEAREST_EVEN); - set_rounding_mode(FPC_BFP_ROUND_NEAREST_EVEN); - cgebr(fval[j], M3_BFP_ROUND_ZERO); - cgebr(fval[j], M3_BFP_ROUND_POSINF); - cgebr(fval[j], M3_BFP_ROUND_NEGINF); - } - - /* f64 -> i32 */ - for (j = 0; j < sizeof dval / sizeof dval[0]; ++j) { - set_rounding_mode(FPC_BFP_ROUND_ZERO); - cfdbr(dval[j], M3_BFP_ROUND_NEAREST_EVEN); - set_rounding_mode(FPC_BFP_ROUND_NEAREST_EVEN); - cfdbr(dval[j], M3_BFP_ROUND_ZERO); - cfdbr(dval[j], M3_BFP_ROUND_POSINF); - cfdbr(dval[j], M3_BFP_ROUND_NEGINF); - } - - /* f64 -> i64 */ - for (j = 0; j < sizeof dval / sizeof dval[0]; ++j) { - set_rounding_mode(FPC_BFP_ROUND_ZERO); - cgdbr(dval[j], M3_BFP_ROUND_NEAREST_EVEN); - set_rounding_mode(FPC_BFP_ROUND_NEAREST_EVEN); - cgdbr(dval[j], M3_BFP_ROUND_ZERO); - cgdbr(dval[j], M3_BFP_ROUND_POSINF); - cgdbr(dval[j], M3_BFP_ROUND_NEGINF); - } - - /* f32 -> f32, round to int */ - for (j = 0; j < sizeof dval / sizeof dval[0]; ++j) { - set_rounding_mode(FPC_BFP_ROUND_ZERO); - fiebr(dval[j], M3_BFP_ROUND_NEAREST_EVEN); - set_rounding_mode(FPC_BFP_ROUND_NEAREST_EVEN); - fiebr(dval[j], M3_BFP_ROUND_ZERO); - fiebr(dval[j], M3_BFP_ROUND_POSINF); - fiebr(dval[j], M3_BFP_ROUND_NEGINF); - } - - /* f64 -> f64, round to int */ - for (j = 0; j < sizeof dval / sizeof dval[0]; ++j) { - set_rounding_mode(FPC_BFP_ROUND_ZERO); - fidbr(dval[j], M3_BFP_ROUND_NEAREST_EVEN); - set_rounding_mode(FPC_BFP_ROUND_NEAREST_EVEN); - fidbr(dval[j], M3_BFP_ROUND_ZERO); - fidbr(dval[j], M3_BFP_ROUND_POSINF); - fidbr(dval[j], M3_BFP_ROUND_NEGINF); - } - - return 0; -} diff --git a/none/tests/s390x/rounding-6.stderr.exp b/none/tests/s390x/rounding-6.stderr.exp deleted file mode 100644 index 139597f9cb..0000000000 --- a/none/tests/s390x/rounding-6.stderr.exp +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/none/tests/s390x/rounding-6.stdout.exp b/none/tests/s390x/rounding-6.stdout.exp deleted file mode 100644 index f01a22973c..0000000000 --- a/none/tests/s390x/rounding-6.stdout.exp +++ /dev/null @@ -1,216 +0,0 @@ -cfebr 1.250000 -> 1 cc = 2 [-> nearest even] -cfebr 1.250000 -> 1 cc = 2 [-> 0] -cfebr 1.250000 -> 2 cc = 2 [-> +inf] -cfebr 1.250000 -> 1 cc = 2 [-> -inf] -cfebr 1.500000 -> 2 cc = 2 [-> nearest even] -cfebr 1.500000 -> 1 cc = 2 [-> 0] -cfebr 1.500000 -> 2 cc = 2 [-> +inf] -cfebr 1.500000 -> 1 cc = 2 [-> -inf] -cfebr 2.500000 -> 2 cc = 2 [-> nearest even] -cfebr 2.500000 -> 2 cc = 2 [-> 0] -cfebr 2.500000 -> 3 cc = 2 [-> +inf] -cfebr 2.500000 -> 2 cc = 2 [-> -inf] -cfebr 1.750000 -> 2 cc = 2 [-> nearest even] -cfebr 1.750000 -> 1 cc = 2 [-> 0] -cfebr 1.750000 -> 2 cc = 2 [-> +inf] -cfebr 1.750000 -> 1 cc = 2 [-> -inf] -cfebr -1.250000 -> -1 cc = 1 [-> nearest even] -cfebr -1.250000 -> -1 cc = 1 [-> 0] -cfebr -1.250000 -> -1 cc = 1 [-> +inf] -cfebr -1.250000 -> -2 cc = 1 [-> -inf] -cfebr -1.500000 -> -2 cc = 1 [-> nearest even] -cfebr -1.500000 -> -1 cc = 1 [-> 0] -cfebr -1.500000 -> -1 cc = 1 [-> +inf] -cfebr -1.500000 -> -2 cc = 1 [-> -inf] -cfebr -2.500000 -> -2 cc = 1 [-> nearest even] -cfebr -2.500000 -> -2 cc = 1 [-> 0] -cfebr -2.500000 -> -2 cc = 1 [-> +inf] -cfebr -2.500000 -> -3 cc = 1 [-> -inf] -cfebr -1.750000 -> -2 cc = 1 [-> nearest even] -cfebr -1.750000 -> -1 cc = 1 [-> 0] -cfebr -1.750000 -> -1 cc = 1 [-> +inf] -cfebr -1.750000 -> -2 cc = 1 [-> -inf] -cfebr 0.000000 -> 0 cc = 0 [-> nearest even] -cfebr 0.000000 -> 0 cc = 0 [-> 0] -cfebr 0.000000 -> 0 cc = 0 [-> +inf] -cfebr 0.000000 -> 0 cc = 0 [-> -inf] -cgebr 1.250000 -> 1 cc = 2 [-> nearest even] -cgebr 1.250000 -> 1 cc = 2 [-> 0] -cgebr 1.250000 -> 2 cc = 2 [-> +inf] -cgebr 1.250000 -> 1 cc = 2 [-> -inf] -cgebr 1.500000 -> 2 cc = 2 [-> nearest even] -cgebr 1.500000 -> 1 cc = 2 [-> 0] -cgebr 1.500000 -> 2 cc = 2 [-> +inf] -cgebr 1.500000 -> 1 cc = 2 [-> -inf] -cgebr 2.500000 -> 2 cc = 2 [-> nearest even] -cgebr 2.500000 -> 2 cc = 2 [-> 0] -cgebr 2.500000 -> 3 cc = 2 [-> +inf] -cgebr 2.500000 -> 2 cc = 2 [-> -inf] -cgebr 1.750000 -> 2 cc = 2 [-> nearest even] -cgebr 1.750000 -> 1 cc = 2 [-> 0] -cgebr 1.750000 -> 2 cc = 2 [-> +inf] -cgebr 1.750000 -> 1 cc = 2 [-> -inf] -cgebr -1.250000 -> -1 cc = 1 [-> nearest even] -cgebr -1.250000 -> -1 cc = 1 [-> 0] -cgebr -1.250000 -> -1 cc = 1 [-> +inf] -cgebr -1.250000 -> -2 cc = 1 [-> -inf] -cgebr -1.500000 -> -2 cc = 1 [-> nearest even] -cgebr -1.500000 -> -1 cc = 1 [-> 0] -cgebr -1.500000 -> -1 cc = 1 [-> +inf] -cgebr -1.500000 -> -2 cc = 1 [-> -inf] -cgebr -2.500000 -> -2 cc = 1 [-> nearest even] -cgebr -2.500000 -> -2 cc = 1 [-> 0] -cgebr -2.500000 -> -2 cc = 1 [-> +inf] -cgebr -2.500000 -> -3 cc = 1 [-> -inf] -cgebr -1.750000 -> -2 cc = 1 [-> nearest even] -cgebr -1.750000 -> -1 cc = 1 [-> 0] -cgebr -1.750000 -> -1 cc = 1 [-> +inf] -cgebr -1.750000 -> -2 cc = 1 [-> -inf] -cgebr 0.000000 -> 0 cc = 0 [-> nearest even] -cgebr 0.000000 -> 0 cc = 0 [-> 0] -cgebr 0.000000 -> 0 cc = 0 [-> +inf] -cgebr 0.000000 -> 0 cc = 0 [-> -inf] -cfdbr 1.250000 -> 1 cc = 2 [-> nearest even] -cfdbr 1.250000 -> 1 cc = 2 [-> 0] -cfdbr 1.250000 -> 2 cc = 2 [-> +inf] -cfdbr 1.250000 -> 1 cc = 2 [-> -inf] -cfdbr 1.500000 -> 2 cc = 2 [-> nearest even] -cfdbr 1.500000 -> 1 cc = 2 [-> 0] -cfdbr 1.500000 -> 2 cc = 2 [-> +inf] -cfdbr 1.500000 -> 1 cc = 2 [-> -inf] -cfdbr 2.500000 -> 2 cc = 2 [-> nearest even] -cfdbr 2.500000 -> 2 cc = 2 [-> 0] -cfdbr 2.500000 -> 3 cc = 2 [-> +inf] -cfdbr 2.500000 -> 2 cc = 2 [-> -inf] -cfdbr 1.750000 -> 2 cc = 2 [-> nearest even] -cfdbr 1.750000 -> 1 cc = 2 [-> 0] -cfdbr 1.750000 -> 2 cc = 2 [-> +inf] -cfdbr 1.750000 -> 1 cc = 2 [-> -inf] -cfdbr -1.250000 -> -1 cc = 1 [-> nearest even] -cfdbr -1.250000 -> -1 cc = 1 [-> 0] -cfdbr -1.250000 -> -1 cc = 1 [-> +inf] -cfdbr -1.250000 -> -2 cc = 1 [-> -inf] -cfdbr -1.500000 -> -2 cc = 1 [-> nearest even] -cfdbr -1.500000 -> -1 cc = 1 [-> 0] -cfdbr -1.500000 -> -1 cc = 1 [-> +inf] -cfdbr -1.500000 -> -2 cc = 1 [-> -inf] -cfdbr -2.500000 -> -2 cc = 1 [-> nearest even] -cfdbr -2.500000 -> -2 cc = 1 [-> 0] -cfdbr -2.500000 -> -2 cc = 1 [-> +inf] -cfdbr -2.500000 -> -3 cc = 1 [-> -inf] -cfdbr -1.750000 -> -2 cc = 1 [-> nearest even] -cfdbr -1.750000 -> -1 cc = 1 [-> 0] -cfdbr -1.750000 -> -1 cc = 1 [-> +inf] -cfdbr -1.750000 -> -2 cc = 1 [-> -inf] -cfdbr 0.000000 -> 0 cc = 0 [-> nearest even] -cfdbr 0.000000 -> 0 cc = 0 [-> 0] -cfdbr 0.000000 -> 0 cc = 0 [-> +inf] -cfdbr 0.000000 -> 0 cc = 0 [-> -inf] -cgdbr 1.250000 -> 1 cc = 2 [-> nearest even] -cgdbr 1.250000 -> 1 cc = 2 [-> 0] -cgdbr 1.250000 -> 2 cc = 2 [-> +inf] -cgdbr 1.250000 -> 1 cc = 2 [-> -inf] -cgdbr 1.500000 -> 2 cc = 2 [-> nearest even] -cgdbr 1.500000 -> 1 cc = 2 [-> 0] -cgdbr 1.500000 -> 2 cc = 2 [-> +inf] -cgdbr 1.500000 -> 1 cc = 2 [-> -inf] -cgdbr 2.500000 -> 2 cc = 2 [-> nearest even] -cgdbr 2.500000 -> 2 cc = 2 [-> 0] -cgdbr 2.500000 -> 3 cc = 2 [-> +inf] -cgdbr 2.500000 -> 2 cc = 2 [-> -inf] -cgdbr 1.750000 -> 2 cc = 2 [-> nearest even] -cgdbr 1.750000 -> 1 cc = 2 [-> 0] -cgdbr 1.750000 -> 2 cc = 2 [-> +inf] -cgdbr 1.750000 -> 1 cc = 2 [-> -inf] -cgdbr -1.250000 -> -1 cc = 1 [-> nearest even] -cgdbr -1.250000 -> -1 cc = 1 [-> 0] -cgdbr -1.250000 -> -1 cc = 1 [-> +inf] -cgdbr -1.250000 -> -2 cc = 1 [-> -inf] -cgdbr -1.500000 -> -2 cc = 1 [-> nearest even] -cgdbr -1.500000 -> -1 cc = 1 [-> 0] -cgdbr -1.500000 -> -1 cc = 1 [-> +inf] -cgdbr -1.500000 -> -2 cc = 1 [-> -inf] -cgdbr -2.500000 -> -2 cc = 1 [-> nearest even] -cgdbr -2.500000 -> -2 cc = 1 [-> 0] -cgdbr -2.500000 -> -2 cc = 1 [-> +inf] -cgdbr -2.500000 -> -3 cc = 1 [-> -inf] -cgdbr -1.750000 -> -2 cc = 1 [-> nearest even] -cgdbr -1.750000 -> -1 cc = 1 [-> 0] -cgdbr -1.750000 -> -1 cc = 1 [-> +inf] -cgdbr -1.750000 -> -2 cc = 1 [-> -inf] -cgdbr 0.000000 -> 0 cc = 0 [-> nearest even] -cgdbr 0.000000 -> 0 cc = 0 [-> 0] -cgdbr 0.000000 -> 0 cc = 0 [-> +inf] -cgdbr 0.000000 -> 0 cc = 0 [-> -inf] -fiebr 1.25000 -> 1 [-> nearest even] -fiebr 1.25000 -> 1 [-> 0] -fiebr 1.25000 -> 2 [-> +inf] -fiebr 1.25000 -> 1 [-> -inf] -fiebr 1.50000 -> 2 [-> nearest even] -fiebr 1.50000 -> 1 [-> 0] -fiebr 1.50000 -> 2 [-> +inf] -fiebr 1.50000 -> 1 [-> -inf] -fiebr 2.50000 -> 2 [-> nearest even] -fiebr 2.50000 -> 2 [-> 0] -fiebr 2.50000 -> 3 [-> +inf] -fiebr 2.50000 -> 2 [-> -inf] -fiebr 1.75000 -> 2 [-> nearest even] -fiebr 1.75000 -> 1 [-> 0] -fiebr 1.75000 -> 2 [-> +inf] -fiebr 1.75000 -> 1 [-> -inf] -fiebr -1.25000 -> -1 [-> nearest even] -fiebr -1.25000 -> -1 [-> 0] -fiebr -1.25000 -> -1 [-> +inf] -fiebr -1.25000 -> -2 [-> -inf] -fiebr -1.50000 -> -2 [-> nearest even] -fiebr -1.50000 -> -1 [-> 0] -fiebr -1.50000 -> -1 [-> +inf] -fiebr -1.50000 -> -2 [-> -inf] -fiebr -2.50000 -> -2 [-> nearest even] -fiebr -2.50000 -> -2 [-> 0] -fiebr -2.50000 -> -2 [-> +inf] -fiebr -2.50000 -> -3 [-> -inf] -fiebr -1.75000 -> -2 [-> nearest even] -fiebr -1.75000 -> -1 [-> 0] -fiebr -1.75000 -> -1 [-> +inf] -fiebr -1.75000 -> -2 [-> -inf] -fiebr 0.00000 -> 0 [-> nearest even] -fiebr 0.00000 -> 0 [-> 0] -fiebr 0.00000 -> 0 [-> +inf] -fiebr 0.00000 -> 0 [-> -inf] -fidbr 1.25000 -> 1 [-> nearest even] -fidbr 1.25000 -> 1 [-> 0] -fidbr 1.25000 -> 2 [-> +inf] -fidbr 1.25000 -> 1 [-> -inf] -fidbr 1.50000 -> 2 [-> nearest even] -fidbr 1.50000 -> 1 [-> 0] -fidbr 1.50000 -> 2 [-> +inf] -fidbr 1.50000 -> 1 [-> -inf] -fidbr 2.50000 -> 2 [-> nearest even] -fidbr 2.50000 -> 2 [-> 0] -fidbr 2.50000 -> 3 [-> +inf] -fidbr 2.50000 -> 2 [-> -inf] -fidbr 1.75000 -> 2 [-> nearest even] -fidbr 1.75000 -> 1 [-> 0] -fidbr 1.75000 -> 2 [-> +inf] -fidbr 1.75000 -> 1 [-> -inf] -fidbr -1.25000 -> -1 [-> nearest even] -fidbr -1.25000 -> -1 [-> 0] -fidbr -1.25000 -> -1 [-> +inf] -fidbr -1.25000 -> -2 [-> -inf] -fidbr -1.50000 -> -2 [-> nearest even] -fidbr -1.50000 -> -1 [-> 0] -fidbr -1.50000 -> -1 [-> +inf] -fidbr -1.50000 -> -2 [-> -inf] -fidbr -2.50000 -> -2 [-> nearest even] -fidbr -2.50000 -> -2 [-> 0] -fidbr -2.50000 -> -2 [-> +inf] -fidbr -2.50000 -> -3 [-> -inf] -fidbr -1.75000 -> -2 [-> nearest even] -fidbr -1.75000 -> -1 [-> 0] -fidbr -1.75000 -> -1 [-> +inf] -fidbr -1.75000 -> -2 [-> -inf] -fidbr 0.00000 -> 0 [-> nearest even] -fidbr 0.00000 -> 0 [-> 0] -fidbr 0.00000 -> 0 [-> +inf] -fidbr 0.00000 -> 0 [-> -inf] diff --git a/none/tests/s390x/rounding-6.vgtest b/none/tests/s390x/rounding-6.vgtest deleted file mode 100644 index 13baa314fc..0000000000 --- a/none/tests/s390x/rounding-6.vgtest +++ /dev/null @@ -1 +0,0 @@ -prog: rounding-6 |