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
(99) |
Nov
|
Dec
|
|
From: Florian K. <fk...@so...> - 2025-09-22 15:56:15
|
https://sourceware.org/cgit/valgrind/commit/?id=2c79953bd75b4c9bb36a4ff4ccfa3675e1aa7e36 commit 2c79953bd75b4c9bb36a4ff4ccfa3675e1aa7e36 Author: Florian Krohm <fl...@ei...> Date: Mon Sep 22 15:55:23 2025 +0000 s390: Remove a few BFP testcases Namely: fgx, fixbr, rounding-4, and rounding-5 Those insn tests are covered by bfp-emit.pl Part of fixing https://bugs.kde.org/show_bug.cgi?id=509572 Diff: --- .gitignore | 7 +-- none/tests/s390x/Makefile.am | 7 ++- none/tests/s390x/fgx.c | 33 ------------ none/tests/s390x/fgx.stderr.exp | 2 - none/tests/s390x/fgx.stdout.exp | 15 ------ none/tests/s390x/fgx.vgtest | 1 - none/tests/s390x/fixbr.c | 73 -------------------------- none/tests/s390x/fixbr.stderr.exp | 2 - none/tests/s390x/fixbr.stdout.exp | 36 ------------- none/tests/s390x/fixbr.vgtest | 2 - none/tests/s390x/rounding-4.c | 95 ---------------------------------- none/tests/s390x/rounding-4.stderr.exp | 2 - none/tests/s390x/rounding-4.stdout.exp | 37 ------------- none/tests/s390x/rounding-4.vgtest | 1 - none/tests/s390x/rounding-5.c | 93 --------------------------------- none/tests/s390x/rounding-5.stderr.exp | 2 - none/tests/s390x/rounding-5.stdout.exp | 54 ------------------- none/tests/s390x/rounding-5.vgtest | 1 - 18 files changed, 5 insertions(+), 458 deletions(-) diff --git a/.gitignore b/.gitignore index a5e97008be..6cf083afe2 100644 --- a/.gitignore +++ b/.gitignore @@ -2136,7 +2136,8 @@ /none/tests/s390x/sub /none/tests/s390x/sub-z14 /none/tests/s390x/sub_EI -/none/tests/s390x/tcxb +/none/tests/s390x/bfp-tdc +/none/tests/s390x/hfp /none/tests/s390x/xc /none/tests/s390x/xor /none/tests/s390x/xor_EI @@ -2144,7 +2145,6 @@ /none/tests/s390x/stcke /none/tests/s390x/stckf /none/tests/s390x/op_exception -/none/tests/s390x/fgx /none/tests/s390x/condloadstore /none/tests/s390x/fold_And16 /none/tests/s390x/stfle @@ -2187,8 +2187,6 @@ /none/tests/s390x/rounding-1 /none/tests/s390x/rounding-2 /none/tests/s390x/rounding-3 -/none/tests/s390x/rounding-4 -/none/tests/s390x/rounding-5 /none/tests/s390x/bfp-1 /none/tests/s390x/bfp-2 /none/tests/s390x/bfp-3 @@ -2231,7 +2229,6 @@ /none/tests/s390x/srnmt /none/tests/s390x/pfpo /none/tests/s390x/rxsbg -/none/tests/s390x/fixbr /none/tests/s390x/popcnt /none/tests/s390x/vector /none/tests/s390x/lsc2 diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am index 57dbb55db0..8a373c4c88 100644 --- a/none/tests/s390x/Makefile.am +++ b/none/tests/s390x/Makefile.am @@ -5,11 +5,11 @@ dist_noinst_SCRIPTS = filter_stderr bfp-emit.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 \ and_EI or_EI xor_EI insert_EI mul_GE add_GE condloadstore \ - op_exception fgx stck stckf stcke stfle cksm mvcl clcl troo \ + op_exception stck stckf stcke stfle cksm mvcl clcl troo \ 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 fpconv ecag fpext_warn \ - bfp-tdc rounding-1 rounding-2 rounding-3 rounding-4 rounding-5 bfp-1 \ + bfp-tdc rounding-1 rounding-2 rounding-3 bfp-1 \ bfp-2 bfp-3 bfp-4 srnm srnmb comp-1 comp-2 exrl tmll tm stmg \ ex clst mvc test_fork test_sig rounding-6 rxsbg popcnt \ high-word traps \ @@ -22,7 +22,7 @@ INSN_TESTS = clc clcle cvb cvd icm lpr lam_stam xc mvst add sub mul \ vector_float add-z14 sub-z14 mul-z14 bic \ misc3 vec2 vec2_float \ dfp-1 dfp-2 dfp-3 dfp-4 dfpconv dfpext dfptest pfpo srnmt \ - fpext fixbr hfp + fpext hfp check_PROGRAMS = $(INSN_TESTS) \ allexec \ @@ -39,7 +39,6 @@ EXTRA_DIST = \ ecag.stdout.exp-z13 ecag.stdout.exp-z14 ecag.stdout.exp-z15 \ ecag.stdout.exp-z16 \ op00.stderr.exp op00.vgtest \ - fixbr.vgtest fixbr.stderr.exp fixbr.stdout.exp \ fpext.vgtest fpext.stderr.exp fpext.stdout.exp \ fpext_fail.vgtest fpext_fail.stderr.exp fpext_fail.stdout.exp \ test.h opcodes.h add.h and.h div.h insert.h dfp_utils.h \ diff --git a/none/tests/s390x/fgx.c b/none/tests/s390x/fgx.c deleted file mode 100644 index 6c7905395b..0000000000 --- a/none/tests/s390x/fgx.c +++ /dev/null @@ -1,33 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include "opcodes.h" - -int main() -{ - register long g asm("r7"); - register double f asm("f8"); - double f1; - - memset(&f1, 0x0f, sizeof(double)); - f = f1; - g = 42; - printf("test LGDR\n\n"); - printf("before g = %ld\n", g); - printf("before f = %a\n", f); - printf("copy f to g\n"); - asm volatile ( LGDR(7,8) : "=d"(g) : "f"(f)); - printf("after g = %16.16lx\n", g); /* 0x0x0x0...... */ - printf("after f = %a\n", f); - - printf("\ntest LDGR\n\n"); - f = 3.14; - printf("before g = %16.16lx\n", g); /* 0x0x0x0...... */ - printf("before f = %a\n", f); - printf("copy g to f\n"); - asm volatile ( LDGR(8,7) : "=f"(f) : "d"(g)); - printf("after g = %16.16lx\n", g); /* 0x0x0x0...... */ - printf("after f = %a\n", f); - - return 0; -} - diff --git a/none/tests/s390x/fgx.stderr.exp b/none/tests/s390x/fgx.stderr.exp deleted file mode 100644 index 139597f9cb..0000000000 --- a/none/tests/s390x/fgx.stderr.exp +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/none/tests/s390x/fgx.stdout.exp b/none/tests/s390x/fgx.stdout.exp deleted file mode 100644 index 242ff5ed84..0000000000 --- a/none/tests/s390x/fgx.stdout.exp +++ /dev/null @@ -1,15 +0,0 @@ -test LGDR - -before g = 42 -before f = 0x1.f0f0f0f0f0f0fp-783 -copy f to g -after g = 0f0f0f0f0f0f0f0f -after f = 0x1.f0f0f0f0f0f0fp-783 - -test LDGR - -before g = 0f0f0f0f0f0f0f0f -before f = 0x1.91eb851eb851fp+1 -copy g to f -after g = 0f0f0f0f0f0f0f0f -after f = 0x1.f0f0f0f0f0f0fp-783 diff --git a/none/tests/s390x/fgx.vgtest b/none/tests/s390x/fgx.vgtest deleted file mode 100644 index 7bd7dac43a..0000000000 --- a/none/tests/s390x/fgx.vgtest +++ /dev/null @@ -1 +0,0 @@ -prog: fgx diff --git a/none/tests/s390x/fixbr.c b/none/tests/s390x/fixbr.c deleted file mode 100644 index ba99210b5e..0000000000 --- a/none/tests/s390x/fixbr.c +++ /dev/null @@ -1,73 +0,0 @@ -#include <assert.h> -#include <stdlib.h> -#include <stdio.h> -#include <stdint.h> -#include <inttypes.h> -#include "opcodes.h" -#include "rounding.h" - -/* Test "fixbr" 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 round_to_int(value,round) \ -do { \ - long double src = value; \ - long double dst; \ - \ - __asm__ volatile ("fixbr %[dst]," #round ",%[src]\n\t" \ - : [dst] "=f"(dst) \ - : [src] "f"(src)); \ - \ - printf("fixbr %.5Lf\t-> %Lg %s\n", \ - src, dst, rtext(round)); \ -} while (0) - -#define fixbr(value,round) round_to_int(value,round) - -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 long double dval[] = { - 1.25, 1.5, 2.5, 1.75, -1.25, -1.5, -2.5, -1.75, 0.0, - }; - - assert(sizeof(long double) == 16); - - /* f128 -> f128, round to int */ - for (j = 0; j < sizeof dval / sizeof dval[0]; ++j) { - set_rounding_mode(FPC_BFP_ROUND_ZERO); - fixbr(dval[j], M3_BFP_ROUND_NEAREST_EVEN); - set_rounding_mode(FPC_BFP_ROUND_NEAREST_EVEN); - fixbr(dval[j], M3_BFP_ROUND_ZERO); - fixbr(dval[j], M3_BFP_ROUND_POSINF); - fixbr(dval[j], M3_BFP_ROUND_NEGINF); - } - - return 0; -} diff --git a/none/tests/s390x/fixbr.stderr.exp b/none/tests/s390x/fixbr.stderr.exp deleted file mode 100644 index 139597f9cb..0000000000 --- a/none/tests/s390x/fixbr.stderr.exp +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/none/tests/s390x/fixbr.stdout.exp b/none/tests/s390x/fixbr.stdout.exp deleted file mode 100644 index 787c0d8d27..0000000000 --- a/none/tests/s390x/fixbr.stdout.exp +++ /dev/null @@ -1,36 +0,0 @@ -fixbr 1.25000 -> 1 [-> nearest even] -fixbr 1.25000 -> 1 [-> 0] -fixbr 1.25000 -> 2 [-> +inf] -fixbr 1.25000 -> 1 [-> -inf] -fixbr 1.50000 -> 2 [-> nearest even] -fixbr 1.50000 -> 1 [-> 0] -fixbr 1.50000 -> 2 [-> +inf] -fixbr 1.50000 -> 1 [-> -inf] -fixbr 2.50000 -> 2 [-> nearest even] -fixbr 2.50000 -> 2 [-> 0] -fixbr 2.50000 -> 3 [-> +inf] -fixbr 2.50000 -> 2 [-> -inf] -fixbr 1.75000 -> 2 [-> nearest even] -fixbr 1.75000 -> 1 [-> 0] -fixbr 1.75000 -> 2 [-> +inf] -fixbr 1.75000 -> 1 [-> -inf] -fixbr -1.25000 -> -1 [-> nearest even] -fixbr -1.25000 -> -1 [-> 0] -fixbr -1.25000 -> -1 [-> +inf] -fixbr -1.25000 -> -2 [-> -inf] -fixbr -1.50000 -> -2 [-> nearest even] -fixbr -1.50000 -> -1 [-> 0] -fixbr -1.50000 -> -1 [-> +inf] -fixbr -1.50000 -> -2 [-> -inf] -fixbr -2.50000 -> -2 [-> nearest even] -fixbr -2.50000 -> -2 [-> 0] -fixbr -2.50000 -> -2 [-> +inf] -fixbr -2.50000 -> -3 [-> -inf] -fixbr -1.75000 -> -2 [-> nearest even] -fixbr -1.75000 -> -1 [-> 0] -fixbr -1.75000 -> -1 [-> +inf] -fixbr -1.75000 -> -2 [-> -inf] -fixbr 0.00000 -> 0 [-> nearest even] -fixbr 0.00000 -> 0 [-> 0] -fixbr 0.00000 -> 0 [-> +inf] -fixbr 0.00000 -> 0 [-> -inf] diff --git a/none/tests/s390x/fixbr.vgtest b/none/tests/s390x/fixbr.vgtest deleted file mode 100644 index 22eb7afab4..0000000000 --- a/none/tests/s390x/fixbr.vgtest +++ /dev/null @@ -1,2 +0,0 @@ -prog: fixbr -prereq: test -e fixbr && ../../../tests/s390x_features s390x-fpext diff --git a/none/tests/s390x/rounding-4.c b/none/tests/s390x/rounding-4.c deleted file mode 100644 index a4a0e96039..0000000000 --- a/none/tests/s390x/rounding-4.c +++ /dev/null @@ -1,95 +0,0 @@ -#include <stdio.h> -#include <assert.h> -#include "opcodes.h" - -/* Test "load rounded" with universally available rounding modes. - Rounding mode is provided via FPC. - Also test "load lengthened" (which is independent of rounding modes). */ - -volatile double d; -volatile float f; - -const char * -rtext(unsigned fpc_round) -{ - switch (fpc_round) { - case 0: return "[-> near]"; - case 1: return "[-> zero]"; - case 2: return "[-> +inf]"; - case 3: return "[-> -inf]"; - } - assert(0); -} - -void -set_rounding_mode(unsigned mode) -{ - printf("setting FPC rounding mode to %s\n", rtext(mode)); - register unsigned r asm("1") = mode; - __asm__ volatile ( SFPC(1) : : "d"(r) ); -} - - -void -load_rounded(void) -{ - f = d; - printf("load rounded d = %10.3f f = %10.3f\n", d, f); -} - -void -load_lengthened(void) -{ - d = f; - printf("load lengthened d = %22.20g f = %22.20g\n", d, f); -} - -/* Tests for load rounded and load lengthened */ -int main() -{ - d = 12345678.25; - set_rounding_mode(0); - load_rounded(); - set_rounding_mode(1); - load_rounded(); - set_rounding_mode(2); - load_rounded(); - set_rounding_mode(3); - load_rounded(); - printf("======================================\n"); - d = 12345678.75; - set_rounding_mode(0); - load_rounded(); - set_rounding_mode(1); - load_rounded(); - set_rounding_mode(2); - load_rounded(); - set_rounding_mode(3); - load_rounded(); - printf("======================================\n"); - d = -12345678.25; - set_rounding_mode(0); - load_rounded(); - set_rounding_mode(1); - load_rounded(); - set_rounding_mode(2); - load_rounded(); - set_rounding_mode(3); - load_rounded(); - printf("======================================\n"); - d = -12345678.75; - set_rounding_mode(0); - load_rounded(); - set_rounding_mode(1); - load_rounded(); - set_rounding_mode(2); - load_rounded(); - set_rounding_mode(3); - load_rounded(); - printf("\n"); - - f = 1234.5678f; - load_lengthened(); - - return 0; -} diff --git a/none/tests/s390x/rounding-4.stderr.exp b/none/tests/s390x/rounding-4.stderr.exp deleted file mode 100644 index 139597f9cb..0000000000 --- a/none/tests/s390x/rounding-4.stderr.exp +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/none/tests/s390x/rounding-4.stdout.exp b/none/tests/s390x/rounding-4.stdout.exp deleted file mode 100644 index e0b58fb92d..0000000000 --- a/none/tests/s390x/rounding-4.stdout.exp +++ /dev/null @@ -1,37 +0,0 @@ -setting FPC rounding mode to [-> near] -load rounded d = 12345678.250 f = 12345678.000 -setting FPC rounding mode to [-> zero] -load rounded d = 12345678.250 f = 12345678.000 -setting FPC rounding mode to [-> +inf] -load rounded d = 12345678.250 f = 12345679.000 -setting FPC rounding mode to [-> -inf] -load rounded d = 12345678.250 f = 12345678.000 -====================================== -setting FPC rounding mode to [-> near] -load rounded d = 12345678.750 f = 12345679.000 -setting FPC rounding mode to [-> zero] -load rounded d = 12345678.750 f = 12345678.000 -setting FPC rounding mode to [-> +inf] -load rounded d = 12345678.750 f = 12345679.000 -setting FPC rounding mode to [-> -inf] -load rounded d = 12345678.750 f = 12345678.000 -====================================== -setting FPC rounding mode to [-> near] -load rounded d = -12345678.250 f = -12345678.000 -setting FPC rounding mode to [-> zero] -load rounded d = -12345678.250 f = -12345678.000 -setting FPC rounding mode to [-> +inf] -load rounded d = -12345678.250 f = -12345678.000 -setting FPC rounding mode to [-> -inf] -load rounded d = -12345678.250 f = -12345679.000 -====================================== -setting FPC rounding mode to [-> near] -load rounded d = -12345678.750 f = -12345679.000 -setting FPC rounding mode to [-> zero] -load rounded d = -12345678.750 f = -12345678.000 -setting FPC rounding mode to [-> +inf] -load rounded d = -12345678.750 f = -12345678.000 -setting FPC rounding mode to [-> -inf] -load rounded d = -12345678.750 f = -12345679.000 - -load lengthened d = 1234.5677490234375 f = 1234.5677490234375 diff --git a/none/tests/s390x/rounding-4.vgtest b/none/tests/s390x/rounding-4.vgtest deleted file mode 100644 index e264b57a77..0000000000 --- a/none/tests/s390x/rounding-4.vgtest +++ /dev/null @@ -1 +0,0 @@ -prog: rounding-4 diff --git a/none/tests/s390x/rounding-5.c b/none/tests/s390x/rounding-5.c deleted file mode 100644 index e1eab408e5..0000000000 --- a/none/tests/s390x/rounding-5.c +++ /dev/null @@ -1,93 +0,0 @@ -#include <stdio.h> -#include <assert.h> -#include <stdint.h> -#include <inttypes.h> -#include "opcodes.h" - -/* Test "convert from fixed" with universally available rounding modes. - Rounding mode is provided via FPC. */ - -volatile int32_t i32; -volatile int64_t i64; - -const char * -rtext(unsigned fpc_round) -{ - switch (fpc_round) { - case 0: return "[-> near]"; - case 1: return "[-> zero]"; - case 2: return "[-> +inf]"; - case 3: return "[-> -inf]"; - } - assert(0); -} - -void -set_rounding_mode(unsigned mode) -{ - printf("setting FPC rounding mode to %s\n", rtext(mode)); - register unsigned r asm("1") = mode; - __asm__ volatile ( SFPC(1) : : "d"(r) ); -} - -void cefbr(unsigned mode) -{ - set_rounding_mode(mode); - - float out; - - __asm__ volatile("cefbr %[r1],%[r2]" : [r1] "=f"(out) : [r2] "d"(i32)); - printf("cefbr: %"PRId32" -> %f\n", i32, out); -} - -void cegbr(unsigned mode) -{ - set_rounding_mode(mode); - - float out; - - __asm__ volatile("cegbr %[r1],%[r2]" : [r1] "=f"(out) : [r2] "d"(i64)); - printf("cegbr: %"PRId64" -> %f\n", i64, out); -} - -void cdgbr(unsigned mode) -{ - set_rounding_mode(mode); - - double out; - - __asm__ volatile("cdgbr %[r1],%[r2]" : [r1] "=f"(out) : [r2] "d"(i64)); - printf("cegbr: %"PRId64" -> %f\n", i64, out); -} - - -int main() -{ - int mode; - - /* i32 -> f32 */ - i32 = INT32_MAX; - for (mode = 0; mode <= 3; ++mode) cefbr(mode); - printf("\n"); - i32 = INT32_MIN; - for (mode = 0; mode <= 3; ++mode) cefbr(mode); - printf("\n"); - - /* i64 -> f32 */ - i64 = INT64_MAX; - for (mode = 0; mode <= 3; ++mode) cegbr(mode); - printf("\n"); - i64 = INT64_MIN; - for (mode = 0; mode <= 3; ++mode) cegbr(mode); - printf("\n"); - - /* i64 -> f64 */ - i64 = INT64_MAX; - for (mode = 0; mode <= 3; ++mode) cdgbr(mode); - printf("\n"); - i64 = INT64_MIN; - for (mode = 0; mode <= 3; ++mode) cdgbr(mode); - printf("\n"); - - return 0; -} diff --git a/none/tests/s390x/rounding-5.stderr.exp b/none/tests/s390x/rounding-5.stderr.exp deleted file mode 100644 index 139597f9cb..0000000000 --- a/none/tests/s390x/rounding-5.stderr.exp +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/none/tests/s390x/rounding-5.stdout.exp b/none/tests/s390x/rounding-5.stdout.exp deleted file mode 100644 index 80e55f67da..0000000000 --- a/none/tests/s390x/rounding-5.stdout.exp +++ /dev/null @@ -1,54 +0,0 @@ -setting FPC rounding mode to [-> near] -cefbr: 2147483647 -> 2147483648.000000 -setting FPC rounding mode to [-> zero] -cefbr: 2147483647 -> 2147483520.000000 -setting FPC rounding mode to [-> +inf] -cefbr: 2147483647 -> 2147483648.000000 -setting FPC rounding mode to [-> -inf] -cefbr: 2147483647 -> 2147483520.000000 - -setting FPC rounding mode to [-> near] -cefbr: -2147483648 -> -2147483648.000000 -setting FPC rounding mode to [-> zero] -cefbr: -2147483648 -> -2147483648.000000 -setting FPC rounding mode to [-> +inf] -cefbr: -2147483648 -> -2147483648.000000 -setting FPC rounding mode to [-> -inf] -cefbr: -2147483648 -> -2147483648.000000 - -setting FPC rounding mode to [-> near] -cegbr: 9223372036854775807 -> 9223372036854775808.000000 -setting FPC rounding mode to [-> zero] -cegbr: 9223372036854775807 -> 9223371487098961920.000000 -setting FPC rounding mode to [-> +inf] -cegbr: 9223372036854775807 -> 9223372036854775808.000000 -setting FPC rounding mode to [-> -inf] -cegbr: 9223372036854775807 -> 9223371487098961920.000000 - -setting FPC rounding mode to [-> near] -cegbr: -9223372036854775808 -> -9223372036854775808.000000 -setting FPC rounding mode to [-> zero] -cegbr: -9223372036854775808 -> -9223372036854775808.000000 -setting FPC rounding mode to [-> +inf] -cegbr: -9223372036854775808 -> -9223372036854775808.000000 -setting FPC rounding mode to [-> -inf] -cegbr: -9223372036854775808 -> -9223372036854775808.000000 - -setting FPC rounding mode to [-> near] -cegbr: 9223372036854775807 -> 9223372036854775808.000000 -setting FPC rounding mode to [-> zero] -cegbr: 9223372036854775807 -> 9223372036854774784.000000 -setting FPC rounding mode to [-> +inf] -cegbr: 9223372036854775807 -> 9223372036854775808.000000 -setting FPC rounding mode to [-> -inf] -cegbr: 9223372036854775807 -> 9223372036854774784.000000 - -setting FPC rounding mode to [-> near] -cegbr: -9223372036854775808 -> -9223372036854775808.000000 -setting FPC rounding mode to [-> zero] -cegbr: -9223372036854775808 -> -9223372036854775808.000000 -setting FPC rounding mode to [-> +inf] -cegbr: -9223372036854775808 -> -9223372036854775808.000000 -setting FPC rounding mode to [-> -inf] -cegbr: -9223372036854775808 -> -9223372036854775808.000000 - diff --git a/none/tests/s390x/rounding-5.vgtest b/none/tests/s390x/rounding-5.vgtest deleted file mode 100644 index 51f302173e..0000000000 --- a/none/tests/s390x/rounding-5.vgtest +++ /dev/null @@ -1 +0,0 @@ -prog: rounding-5 |
|
From: Florian K. <fk...@so...> - 2025-09-22 15:32:18
|
https://sourceware.org/cgit/valgrind/commit/?id=b1f875b63d6a07115dfba571c6dcc1f280c0b1f4 commit b1f875b63d6a07115dfba571c6dcc1f280c0b1f4 Author: Florian Krohm <fl...@ei...> Date: Mon Sep 22 15:31:12 2025 +0000 s390: Remove none/tests/s390x/tcxb, add none/tests/s390x/bfp-tdc tcxb was busted. Part of fixing https://bugs.kde.org/show_bug.cgi?id=509572 Diff: --- none/tests/s390x/Makefile.am | 4 +- none/tests/s390x/bfp-tdc.c | 140 +++++++++++++++++++++ .../s390x/{tcxb.stderr.exp => bfp-tdc.stderr.exp} | 0 none/tests/s390x/bfp-tdc.stdout.exp | 39 ++++++ none/tests/s390x/bfp-tdc.vgtest | 1 + none/tests/s390x/tcxb.c | 95 -------------- none/tests/s390x/tcxb.stdout.exp | 64 ---------- none/tests/s390x/tcxb.vgtest | 1 - 8 files changed, 182 insertions(+), 162 deletions(-) diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am index c1909da396..57dbb55db0 100644 --- a/none/tests/s390x/Makefile.am +++ b/none/tests/s390x/Makefile.am @@ -2,14 +2,14 @@ include $(top_srcdir)/Makefile.tool-tests.am dist_noinst_SCRIPTS = filter_stderr bfp-emit.pl -INSN_TESTS = clc clcle cvb cvd icm lpr tcxb lam_stam xc mvst add sub mul \ +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 \ and_EI or_EI xor_EI insert_EI mul_GE add_GE condloadstore \ op_exception fgx stck stckf stcke stfle cksm mvcl clcl troo \ 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 fpconv ecag fpext_warn \ - rounding-1 rounding-2 rounding-3 rounding-4 rounding-5 bfp-1 \ + bfp-tdc rounding-1 rounding-2 rounding-3 rounding-4 rounding-5 bfp-1 \ bfp-2 bfp-3 bfp-4 srnm srnmb comp-1 comp-2 exrl tmll tm stmg \ ex clst mvc test_fork test_sig rounding-6 rxsbg popcnt \ high-word traps \ diff --git a/none/tests/s390x/bfp-tdc.c b/none/tests/s390x/bfp-tdc.c new file mode 100644 index 0000000000..a8b6769efc --- /dev/null +++ b/none/tests/s390x/bfp-tdc.c @@ -0,0 +1,140 @@ +/* TEST DATA CLASS + + Test for subnormal numbers is missing. I do not know how */ +#include <stdio.h> +#include <math.h> // NAN +#include <float.h> // DBL_MIN +#include <assert.h> + +#define ZERO_P (1 << 11) +#define ZERO_N (1 << 10) +#define NORM_P (1 << 9) +#define NORM_N (1 << 8) +#define SUBNORM_P (1 << 7) +#define SUBNORM_N (1 << 6) +#define INF_P (1 << 5) +#define INF_N (1 << 4) +#define QNAN_P (1 << 3) +#define QNAN_N (1 << 2) +#define SNAN_P (1 << 1) +#define SNAN_N (1 << 0) + +static struct what { + unsigned bitno; + unsigned mask; + const char *str; +} whatsit[] = { + { 63, SNAN_N, "Signaling Nan with sign bit negative" }, + { 62, SNAN_P, "Signaling Nan with sign bit posative" }, + { 61, QNAN_N, "Quiet Nan with sign bit negative" }, + { 60, QNAN_P, "Quiet Nan with sign bit posative" }, + { 59, INF_N, "Infinity with sign bit negative" }, + { 58, INF_P, "Infinity with sign bit positive" }, + { 57, SUBNORM_N, "Subnormal number with sign bit negative" }, + { 56, SUBNORM_N, "Subnormal number with sign bit positive" }, + { 55, NORM_N, "Normal number with sign bit negative" }, + { 54, NORM_P, "Normal number with sign bit positive" }, + { 53, ZERO_N, "Zero with sign bit negative" }, + { 52, ZERO_P, "Zero with sign bit positive" } +}; + +#define TDC(insn, type, value, m) \ + ({ \ + int cc; \ + type r1 = value; \ + \ + __asm__ volatile(#insn " %[r1],0(%[mask])\n\t" \ + "ipm %[psw]\n\t" \ + "srl %[psw],28\n\t" \ + : [psw]"+d"(cc) \ + : [r1]"f"(r1), [mask]"a"(m) \ + : "cc"); \ + cc; \ + }) + +static void +do_tceb(float value) +{ + for (int i = 0; i < sizeof(whatsit) / sizeof(*whatsit); ++i) { + int ccv = TDC(tceb, float, value, whatsit[i].mask); + if (ccv == 1) + printf("value = %f\t\tcc = %d %s\n", value, ccv, + whatsit[i].str); + } +} + +static void +do_tcdb(double value) +{ + for (int i = 0; i < sizeof(whatsit) / sizeof(*whatsit); ++i) { + int ccv = TDC(tcdb, double, value, whatsit[i].mask); + if (ccv == 1) + printf("value = %f\t\tcc = %d %s\n", value, ccv, + whatsit[i].str); + } +} + +static void +do_tcxb(long double value) +{ + for (int i = 0; i < sizeof(whatsit) / sizeof(*whatsit); ++i) { + int ccv = TDC(tcxb, long double, value, whatsit[i].mask); + if (ccv == 1) + printf("value = %Lf\t\tcc = %d %s\n", value, ccv, + whatsit[i].str); + } +} + +int +main(void) +{ + assert(sizeof(long double) == 16); + + printf("32-bit tests\n"); + do_tceb(0.0f); + do_tceb(-0.0f); + do_tceb(3.0f); + do_tceb(-3.0f); + do_tceb(NAN); + do_tceb(-NAN); + do_tceb(INFINITY); + do_tceb(-INFINITY); + do_tceb(__builtin_nansf("")); + do_tceb(-__builtin_nansf("")); + do_tceb(FLT_MIN / 2); + do_tceb(-FLT_MIN / 2); + + printf("\n64-bit tests\n"); + do_tcdb(0.0); + do_tcdb(-0.0); + do_tcdb(3.0); + do_tcdb(-3.0); + do_tcdb(NAN); + do_tcdb(-NAN); + do_tcdb(INFINITY); + do_tcdb(-INFINITY); + do_tcdb(__builtin_nans("")); + do_tcdb(-__builtin_nans("")); + do_tcdb(DBL_MIN / 2); + do_tcdb(-DBL_MIN / 2); + + printf("\n128-bit tests\n"); + do_tcxb(0.0L); + do_tcxb(-0.0L); + do_tcxb(3.0L); + do_tcxb(-3.0L); + do_tcxb(NAN); + do_tcxb(-NAN); + do_tcxb(INFINITY); + do_tcxb(-INFINITY); + do_tcxb(__builtin_nansl("")); + do_tcxb(-__builtin_nansl("")); +#if 0 + /* Figuring out subnormal numbers for 128-bit BFP is left as + an exercise.. */ + do_tcdb(LDBL_MIN / 2); + do_tcdb(-LDBL_MIN / 2); +#endif + + return 0; +} diff --git a/none/tests/s390x/tcxb.stderr.exp b/none/tests/s390x/bfp-tdc.stderr.exp similarity index 100% rename from none/tests/s390x/tcxb.stderr.exp rename to none/tests/s390x/bfp-tdc.stderr.exp diff --git a/none/tests/s390x/bfp-tdc.stdout.exp b/none/tests/s390x/bfp-tdc.stdout.exp new file mode 100644 index 0000000000..032287b590 --- /dev/null +++ b/none/tests/s390x/bfp-tdc.stdout.exp @@ -0,0 +1,39 @@ +32-bit tests +value = 0.000000 cc = 1 Zero with sign bit positive +value = -0.000000 cc = 1 Zero with sign bit negative +value = 3.000000 cc = 1 Normal number with sign bit positive +value = -3.000000 cc = 1 Normal number with sign bit negative +value = nan cc = 1 Quiet Nan with sign bit posative +value = -nan cc = 1 Quiet Nan with sign bit negative +value = inf cc = 1 Infinity with sign bit positive +value = -inf cc = 1 Infinity with sign bit negative +value = nan cc = 1 Signaling Nan with sign bit posative +value = -nan cc = 1 Signaling Nan with sign bit negative +value = -0.000000 cc = 1 Subnormal number with sign bit negative +value = -0.000000 cc = 1 Subnormal number with sign bit positive + +64-bit tests +value = 0.000000 cc = 1 Zero with sign bit positive +value = -0.000000 cc = 1 Zero with sign bit negative +value = 3.000000 cc = 1 Normal number with sign bit positive +value = -3.000000 cc = 1 Normal number with sign bit negative +value = nan cc = 1 Quiet Nan with sign bit posative +value = -nan cc = 1 Quiet Nan with sign bit negative +value = inf cc = 1 Infinity with sign bit positive +value = -inf cc = 1 Infinity with sign bit negative +value = nan cc = 1 Signaling Nan with sign bit posative +value = -nan cc = 1 Signaling Nan with sign bit negative +value = -0.000000 cc = 1 Subnormal number with sign bit negative +value = -0.000000 cc = 1 Subnormal number with sign bit positive + +128-bit tests +value = 0.000000 cc = 1 Zero with sign bit positive +value = -0.000000 cc = 1 Zero with sign bit negative +value = 3.000000 cc = 1 Normal number with sign bit positive +value = -3.000000 cc = 1 Normal number with sign bit negative +value = nan cc = 1 Quiet Nan with sign bit posative +value = -nan cc = 1 Quiet Nan with sign bit negative +value = inf cc = 1 Infinity with sign bit positive +value = -inf cc = 1 Infinity with sign bit negative +value = nan cc = 1 Signaling Nan with sign bit posative +value = -nan cc = 1 Signaling Nan with sign bit negative diff --git a/none/tests/s390x/bfp-tdc.vgtest b/none/tests/s390x/bfp-tdc.vgtest new file mode 100644 index 0000000000..306de25ab1 --- /dev/null +++ b/none/tests/s390x/bfp-tdc.vgtest @@ -0,0 +1 @@ +prog: bfp-tdc diff --git a/none/tests/s390x/tcxb.c b/none/tests/s390x/tcxb.c deleted file mode 100644 index 4ff031f865..0000000000 --- a/none/tests/s390x/tcxb.c +++ /dev/null @@ -1,95 +0,0 @@ -/* test data class tests for float, double, long double: TCEB, TCDB, TCXB */ -#include <math.h> -#include <stdio.h> - -static int tcxb(long double f, long long num) -{ - int match; - - asm volatile(" tcxb %1,0(%2)\n" - "ipm %0\n" - "srl %0,28\n" - : "=d" (match) - : "f" (f), "a" (num) - : "cc"); - return match; -} - -static int tcdb(double f, long long num) -{ - int match; - - asm volatile(" tcdb %1,0(%2)\n" - "ipm %0\n" - "srl %0,28\n" - : "=d" (match) - : "f" (f), "a" (num) - : "cc"); - return match; -} - -static int tceb(float f, long long num) -{ - int match; - - asm volatile(" tceb %1,0(%2)\n" - "ipm %0\n" - "srl %0,28\n" - : "=d" (match) - : "f" (f), "a" (num) - : "cc"); - return match; -} - -int main() -{ - int i; - - for (i = 0; i < 64; i++) { - if (sizeof (long double) == 16) { - /* long double 128 bit */ - printf("%d", tcxb(+0.0l, 1UL<<i)); - printf("%d", tcxb(-0.0l, 1UL<<i)); - printf("%d", tcxb(+2.2l, 1UL<<i)); - printf("%d", tcxb(-2.2l, 1UL<<i)); - printf("%d", tcxb(+INFINITY, 1UL<<i)); - printf("%d", tcxb(-INFINITY, 1UL<<i)); - printf("%d", tcxb(+NAN, 1UL<<i)); - printf("%d", tcxb(-NAN, 1UL<<i)); - } else { - /* long double 64 bit */ - printf("%d", tcdb(+0.0l, 1UL<<i)); - printf("%d", tcdb(-0.0l, 1UL<<i)); - printf("%d", tcdb(+2.2l, 1UL<<i)); - printf("%d", tcdb(-2.2l, 1UL<<i)); - printf("%d", tcdb(+INFINITY, 1UL<<i)); - printf("%d", tcdb(-INFINITY, 1UL<<i)); - printf("%d", tcdb(+NAN, 1UL<<i)); - printf("%d", tcdb(-NAN, 1UL<<i)); - } - /* double 64 bit */ - printf("%d", tcdb(+0.0, 1UL<<i)); - printf("%d", tcdb(-0.0, 1UL<<i)); - printf("%d", tcdb(+2.2, 1UL<<i)); - printf("%d", tcdb(-2.2, 1UL<<i)); - printf("%d", tcdb(+INFINITY, 1UL<<i)); - printf("%d", tcdb(-INFINITY, 1UL<<i)); - printf("%d", tcdb(+NAN, 1UL<<i)); - printf("%d", tcdb(-NAN, 1UL<<i)); - - - /* float 32 bit */ - printf("%d", tceb(+0.0f, 1UL<<i)); - printf("%d", tceb(-0.0f, 1UL<<i)); - printf("%d", tceb(+2.2f, 1UL<<i)); - printf("%d", tceb(-2.2f, 1UL<<i)); - printf("%d", tceb(+INFINITY, 1UL<<i)); - printf("%d", tceb(-INFINITY, 1UL<<i)); - printf("%d", tceb(+NAN, 1UL<<i)); - printf("%d", tceb(-NAN, 1UL<<i)); - - printf("\n"); - - } - return 0; -} diff --git a/none/tests/s390x/tcxb.stdout.exp b/none/tests/s390x/tcxb.stdout.exp deleted file mode 100644 index f5bc67c50c..0000000000 --- a/none/tests/s390x/tcxb.stdout.exp +++ /dev/null @@ -1,64 +0,0 @@ -000000000000000000000000 -000000000000000000000000 -000000010000000100000001 -000000100000001000000010 -000001000000010000000100 -000010000000100000001000 -000000000000000000000000 -000000000000000000000000 -000100000001000000010000 -001000000010000000100000 -010000000100000001000000 -100000001000000010000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 -000000000000000000000000 diff --git a/none/tests/s390x/tcxb.vgtest b/none/tests/s390x/tcxb.vgtest deleted file mode 100644 index fe7e9ea8bc..0000000000 --- a/none/tests/s390x/tcxb.vgtest +++ /dev/null @@ -1 +0,0 @@ -prog: tcxb |
|
From: Martin C. <mc...@re...> - 2025-09-22 11:06:27
|
Hi Cyril,
I'm attaching updated patch. Hope it does address your comments.
Please check.
Cheers,
Martin
On Mon 2025-09-22 10:01 , Cyril Hrubis wrote:
> Hi!
> > some time back, LTP_REPRODUCIBLE_OUTPUT was introduced in LTP.
> > I'd like to propose a new, related LTP knob for our Valgrind
> > test automation purposes: LTP_QUIET. See attached patch.
> >
> > LTP_QUIET is supposed to suppress certain types of test output
> > messages, such as: TCONF, TWARN, TINFO, and TDEBUG. This would
> > help us keep our test logs briefer, while still keeping the
> > information we need in the logs.
> >
> > Please, consider merging upstream.
>
> Generally looks good, a few minor points below.
>
> > From fb13e461ac76f6843f0fd9cc37ff42b971e8057c Mon Sep 17 00:00:00 2001
> > From: Martin Cermak <mc...@re...>
> > Date: Tue, 16 Sep 2025 16:15:22 +0200
> > Subject: [PATCH] Introduce and use LTP_QUIET
> >
> > Introduce LTP_QUIET env variable. When set to 1 or y, it will
> > suppress printing TCONF, TWARN, TINFO, and TDEBUG messages, making
> > valgrind ltp test logs cleaner. In some cases such as eventfd2_03,
> > shmctl05, mlock03, poll02, prctl09, setsockopt10, and select02 this
> > update avoids false positives.
> > ---
> > .../0002-Introduce-LTP_QUIET-env-var.patch | 73 +++++++++++++++++++
> > auxprogs/ltp-tester.sh | 7 ++
> > 2 files changed, 80 insertions(+)
> > create mode 100644 auxprogs/ltp-patches/0002-Introduce-LTP_QUIET-env-var.patch
> >
> > diff --git a/auxprogs/ltp-patches/0002-Introduce-LTP_QUIET-env-var.patch b/auxprogs/ltp-patches/0002-Introduce-LTP_QUIET-env-var.patch
> > new file mode 100644
> > index 000000000..a77162bfc
> > --- /dev/null
> > +++ b/auxprogs/ltp-patches/0002-Introduce-LTP_QUIET-env-var.patch
> > @@ -0,0 +1,73 @@
> > +From 183df3240f8e7ca38fbe2fd472c31c9417ae7eb2 Mon Sep 17 00:00:00 2001
> > +From: Martin Cermak <mc...@re...>
> > +Date: Tue, 16 Sep 2025 15:46:40 +0200
> > +Subject: [PATCH] Introduce LTP_QUIET env var
> > +
> > +Introduce LTP_QUIET env variable. When set to 1 or y, it will
> > +suppress printing TCONF, TWARN, TINFO, and TDEBUG messages.
>
> Can you please send a diff and not diff of a diff so that we don't have
> to hand edit it before applying?
>
> > +---
> > + lib/tst_test.c | 11 +++++++++++
> > + 1 file changed, 11 insertions(+)
> > +
> > +diff --git a/lib/tst_test.c b/lib/tst_test.c
> > +index 92872cc89..609a7b075 100644
> > +--- a/lib/tst_test.c
> > ++++ b/lib/tst_test.c
> > +@@ -68,6 +68,7 @@ static int iterations = 1;
> > + static float duration = -1;
> > + static float timeout_mul = -1;
> > + static int reproducible_output;
> > ++static int quiet_output;
> > +
> > + struct context {
> > + int32_t lib_pid;
> > +@@ -307,15 +308,19 @@ static void print_result(const char *file, const int lineno, int ttype,
> > + res = "TBROK";
> > + break;
> > + case TCONF:
> > ++ if (quiet_output) return;
> > + res = "TCONF";
> > + break;
> > + case TWARN:
> > ++ if (quiet_output) return;
> > + res = "TWARN";
> > + break;
> > + case TINFO:
> > ++ if (quiet_output) return;
> > + res = "TINFO";
> > + break;
> > + case TDEBUG:
> > ++ if (quiet_output) return;
>
> The LKML coding style requires the return to be on a separate line.
>
> > + res = "TDEBUG";
> > + break;
> > + default:
> > +@@ -670,6 +675,7 @@ static void print_help(void)
> > + fprintf(stderr, "LTP_DEV_FS_TYPE Filesystem used for testing (default: %s)\n", DEFAULT_FS_TYPE);
> > + fprintf(stderr, "LTP_ENABLE_DEBUG Print debug messages (set 1 or y)\n");
> > + fprintf(stderr, "LTP_REPRODUCIBLE_OUTPUT Values 1 or y discard the actual content of the messages printed by the test\n");
> > ++ fprintf(stderr, "LTP_QUIET Values 1 or y will suppress printing TCONF, TWARN, TINFO, and TDEBUG messages\n");
> > + fprintf(stderr, "LTP_SINGLE_FS_TYPE Specifies filesystem instead all supported (for .all_filesystems)\n");
> > + fprintf(stderr, "LTP_FORCE_SINGLE_FS_TYPE Testing only. The same as LTP_SINGLE_FS_TYPE but ignores test skiplist.\n");
> > + fprintf(stderr, "LTP_TIMEOUT_MUL Timeout multiplier (must be a number >=1)\n");
> > +@@ -1361,6 +1367,7 @@ static void do_setup(int argc, char *argv[])
> > + {
> > + char *tdebug_env = getenv("LTP_ENABLE_DEBUG");
> > + char *reproducible_env = getenv("LTP_REPRODUCIBLE_OUTPUT");
> > ++ char *quiet_env = getenv("LTP_QUIET");
> > +
> > + if (!tst_test)
> > + tst_brk(TBROK, "No tests to run");
> > +@@ -1391,6 +1398,10 @@ static void do_setup(int argc, char *argv[])
> > + (!strcmp(reproducible_env, "1") || !strcmp(reproducible_env, "y")))
> > + reproducible_output = 1;
> > +
> > ++ if (quiet_env &&
> > ++ (!strcmp(quiet_env, "1") || !strcmp(quiet_env, "y")))
> > ++ quiet_output = 1;
> > ++
> > + assert_test_fn();
> > +
> > + TCID = tcid = get_tcid(argv);
> > +--
> > +2.48.1
> > +
> > diff --git a/auxprogs/ltp-tester.sh b/auxprogs/ltp-tester.sh
> > index ba8fd8be4..a95c603c5 100755
> > --- a/auxprogs/ltp-tester.sh
> > +++ b/auxprogs/ltp-tester.sh
> > @@ -21,6 +21,7 @@ PARALLEL_JOBS=${PARALLEL_JOBS:-$(nproc)}
> > # https://lore.kernel.org/ltp/20250505195003.GB137650@pevik/T/#t
> > export LTP_COLORIZE_OUTPUT=0
> > export LTP_REPRODUCIBLE_OUTPUT=1
> > +export LTP_QUIET=1
> >
> > # Initialize LOGDIR for bunsen upload (https://sourceware.org/bunsen/)
> > mkdir -p $LOGDIR; rm -rf ${LOGDIR:?}/*
> > @@ -110,4 +111,10 @@ done
> >
> > wait
> >
> > +echo -e "\nBrief LTP test results summary"
> > +echo "-----------------------------------------"
> > +find $LOGDIR -type f -name '*.trs' -exec grep -F ':test-result:' '{}' ';' |\
> > + sort -r | uniq -c | awk '{print $NF": "$1}'
> > +echo -e "-----------------------------------------\n"
> > +
> > echo "TESTING FINISHED, logs in $LOGDIR"
>
> This is a part of valgrind, not applicable to LTP...
>
> --
> Cyril Hrubis
> ch...@su...
>
|
|
From: Paul F. <pa...@so...> - 2025-09-22 11:02:28
|
https://sourceware.org/cgit/valgrind/commit/?id=6bfecf09ec169e41afcf925f00ee8db7ae8a9b5f commit 6bfecf09ec169e41afcf925f00ee8db7ae8a9b5f Author: Paul Floyd <pj...@wa...> Date: Mon Sep 22 14:59:17 2025 +0200 gdbserver regtest: add return value to sleepers select error message This is failing on FreeBSD 15 (looks like an OS or libc regression). Improve the error message to make the problem clearer. errno is 0 but select is returning 93 (from a set of 0 fds!). Diff: --- gdbserver_tests/sleepers.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gdbserver_tests/sleepers.c b/gdbserver_tests/sleepers.c index b433c19847..51d197a8e7 100644 --- a/gdbserver_tests/sleepers.c +++ b/gdbserver_tests/sleepers.c @@ -84,8 +84,11 @@ static void *sleeper_or_burner(void *v) t[s->t].tv_usec = (sleepms % 1000) * 1000; ret = select (0, NULL, NULL, NULL, &t[s->t]); /* We only expect a timeout result or EINTR from the above. */ - if (ret != 0 && errno != EINTR) - perror("unexpected result from select"); + if (ret != 0 && errno != EINTR) { + char buf[64]; + snprintf(buf, 64, "unexpected result (%d) from select", ret); + perror(buf); + } } if (burn > 0 && s->burn) do_burn(); |
|
From: Cyril H. <ch...@su...> - 2025-09-22 08:01:33
|
Hi!
> some time back, LTP_REPRODUCIBLE_OUTPUT was introduced in LTP.
> I'd like to propose a new, related LTP knob for our Valgrind
> test automation purposes: LTP_QUIET. See attached patch.
>
> LTP_QUIET is supposed to suppress certain types of test output
> messages, such as: TCONF, TWARN, TINFO, and TDEBUG. This would
> help us keep our test logs briefer, while still keeping the
> information we need in the logs.
>
> Please, consider merging upstream.
Generally looks good, a few minor points below.
> From fb13e461ac76f6843f0fd9cc37ff42b971e8057c Mon Sep 17 00:00:00 2001
> From: Martin Cermak <mc...@re...>
> Date: Tue, 16 Sep 2025 16:15:22 +0200
> Subject: [PATCH] Introduce and use LTP_QUIET
>
> Introduce LTP_QUIET env variable. When set to 1 or y, it will
> suppress printing TCONF, TWARN, TINFO, and TDEBUG messages, making
> valgrind ltp test logs cleaner. In some cases such as eventfd2_03,
> shmctl05, mlock03, poll02, prctl09, setsockopt10, and select02 this
> update avoids false positives.
> ---
> .../0002-Introduce-LTP_QUIET-env-var.patch | 73 +++++++++++++++++++
> auxprogs/ltp-tester.sh | 7 ++
> 2 files changed, 80 insertions(+)
> create mode 100644 auxprogs/ltp-patches/0002-Introduce-LTP_QUIET-env-var.patch
>
> diff --git a/auxprogs/ltp-patches/0002-Introduce-LTP_QUIET-env-var.patch b/auxprogs/ltp-patches/0002-Introduce-LTP_QUIET-env-var.patch
> new file mode 100644
> index 000000000..a77162bfc
> --- /dev/null
> +++ b/auxprogs/ltp-patches/0002-Introduce-LTP_QUIET-env-var.patch
> @@ -0,0 +1,73 @@
> +From 183df3240f8e7ca38fbe2fd472c31c9417ae7eb2 Mon Sep 17 00:00:00 2001
> +From: Martin Cermak <mc...@re...>
> +Date: Tue, 16 Sep 2025 15:46:40 +0200
> +Subject: [PATCH] Introduce LTP_QUIET env var
> +
> +Introduce LTP_QUIET env variable. When set to 1 or y, it will
> +suppress printing TCONF, TWARN, TINFO, and TDEBUG messages.
Can you please send a diff and not diff of a diff so that we don't have
to hand edit it before applying?
> +---
> + lib/tst_test.c | 11 +++++++++++
> + 1 file changed, 11 insertions(+)
> +
> +diff --git a/lib/tst_test.c b/lib/tst_test.c
> +index 92872cc89..609a7b075 100644
> +--- a/lib/tst_test.c
> ++++ b/lib/tst_test.c
> +@@ -68,6 +68,7 @@ static int iterations = 1;
> + static float duration = -1;
> + static float timeout_mul = -1;
> + static int reproducible_output;
> ++static int quiet_output;
> +
> + struct context {
> + int32_t lib_pid;
> +@@ -307,15 +308,19 @@ static void print_result(const char *file, const int lineno, int ttype,
> + res = "TBROK";
> + break;
> + case TCONF:
> ++ if (quiet_output) return;
> + res = "TCONF";
> + break;
> + case TWARN:
> ++ if (quiet_output) return;
> + res = "TWARN";
> + break;
> + case TINFO:
> ++ if (quiet_output) return;
> + res = "TINFO";
> + break;
> + case TDEBUG:
> ++ if (quiet_output) return;
The LKML coding style requires the return to be on a separate line.
> + res = "TDEBUG";
> + break;
> + default:
> +@@ -670,6 +675,7 @@ static void print_help(void)
> + fprintf(stderr, "LTP_DEV_FS_TYPE Filesystem used for testing (default: %s)\n", DEFAULT_FS_TYPE);
> + fprintf(stderr, "LTP_ENABLE_DEBUG Print debug messages (set 1 or y)\n");
> + fprintf(stderr, "LTP_REPRODUCIBLE_OUTPUT Values 1 or y discard the actual content of the messages printed by the test\n");
> ++ fprintf(stderr, "LTP_QUIET Values 1 or y will suppress printing TCONF, TWARN, TINFO, and TDEBUG messages\n");
> + fprintf(stderr, "LTP_SINGLE_FS_TYPE Specifies filesystem instead all supported (for .all_filesystems)\n");
> + fprintf(stderr, "LTP_FORCE_SINGLE_FS_TYPE Testing only. The same as LTP_SINGLE_FS_TYPE but ignores test skiplist.\n");
> + fprintf(stderr, "LTP_TIMEOUT_MUL Timeout multiplier (must be a number >=1)\n");
> +@@ -1361,6 +1367,7 @@ static void do_setup(int argc, char *argv[])
> + {
> + char *tdebug_env = getenv("LTP_ENABLE_DEBUG");
> + char *reproducible_env = getenv("LTP_REPRODUCIBLE_OUTPUT");
> ++ char *quiet_env = getenv("LTP_QUIET");
> +
> + if (!tst_test)
> + tst_brk(TBROK, "No tests to run");
> +@@ -1391,6 +1398,10 @@ static void do_setup(int argc, char *argv[])
> + (!strcmp(reproducible_env, "1") || !strcmp(reproducible_env, "y")))
> + reproducible_output = 1;
> +
> ++ if (quiet_env &&
> ++ (!strcmp(quiet_env, "1") || !strcmp(quiet_env, "y")))
> ++ quiet_output = 1;
> ++
> + assert_test_fn();
> +
> + TCID = tcid = get_tcid(argv);
> +--
> +2.48.1
> +
> diff --git a/auxprogs/ltp-tester.sh b/auxprogs/ltp-tester.sh
> index ba8fd8be4..a95c603c5 100755
> --- a/auxprogs/ltp-tester.sh
> +++ b/auxprogs/ltp-tester.sh
> @@ -21,6 +21,7 @@ PARALLEL_JOBS=${PARALLEL_JOBS:-$(nproc)}
> # https://lore.kernel.org/ltp/20250505195003.GB137650@pevik/T/#t
> export LTP_COLORIZE_OUTPUT=0
> export LTP_REPRODUCIBLE_OUTPUT=1
> +export LTP_QUIET=1
>
> # Initialize LOGDIR for bunsen upload (https://sourceware.org/bunsen/)
> mkdir -p $LOGDIR; rm -rf ${LOGDIR:?}/*
> @@ -110,4 +111,10 @@ done
>
> wait
>
> +echo -e "\nBrief LTP test results summary"
> +echo "-----------------------------------------"
> +find $LOGDIR -type f -name '*.trs' -exec grep -F ':test-result:' '{}' ';' |\
> + sort -r | uniq -c | awk '{print $NF": "$1}'
> +echo -e "-----------------------------------------\n"
> +
> echo "TESTING FINISHED, logs in $LOGDIR"
This is a part of valgrind, not applicable to LTP...
--
Cyril Hrubis
ch...@su...
|
|
From: Florian K. <fk...@so...> - 2025-09-21 21:04:40
|
https://sourceware.org/cgit/valgrind/commit/?id=78f1569e2235796256742d7c75763034677065af commit 78f1569e2235796256742d7c75763034677065af Author: Florian Krohm <fl...@ei...> Date: Sun Sep 21 21:03:55 2025 +0000 s390: New testcase none/tests/s390x/hfp Containing the very few needed hexadecimal floating point insns. Carved out of none/tests/s390x/bfp-2 Part of fixing https://bugs.kde.org/show_bug.cgi?id=509572 Diff: --- none/tests/s390x/Makefile.am | 2 +- none/tests/s390x/bfp-2.c | 26 -------------------------- none/tests/s390x/bfp-2.stdout.exp | 4 ---- none/tests/s390x/hfp.c | 39 +++++++++++++++++++++++++++++++++++++++ none/tests/s390x/hfp.stderr.exp | 2 ++ none/tests/s390x/hfp.stdout.exp | 4 ++++ none/tests/s390x/hfp.vgtest | 1 + 7 files changed, 47 insertions(+), 31 deletions(-) diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am index 98ef178e7a..c1909da396 100644 --- a/none/tests/s390x/Makefile.am +++ b/none/tests/s390x/Makefile.am @@ -22,7 +22,7 @@ INSN_TESTS = clc clcle cvb cvd icm lpr tcxb lam_stam xc mvst add sub mul \ vector_float add-z14 sub-z14 mul-z14 bic \ misc3 vec2 vec2_float \ dfp-1 dfp-2 dfp-3 dfp-4 dfpconv dfpext dfptest pfpo srnmt \ - fpext fixbr + fpext fixbr hfp check_PROGRAMS = $(INSN_TESTS) \ allexec \ diff --git a/none/tests/s390x/bfp-2.c b/none/tests/s390x/bfp-2.c index 73349eddd2..b8109ba889 100644 --- a/none/tests/s390x/bfp-2.c +++ b/none/tests/s390x/bfp-2.c @@ -71,26 +71,6 @@ void lcdbr(double in) printf("lcdbr %f -> %f\n", in, out); } -void lder(double prev, float in) -{ - unsigned long out; - - __asm__ volatile("lder %[prev],%[in]\n\t" - "std %[prev],%[out]" : - [out]"=R"(out) : [prev]"f"(prev), [in]"f"(in)); - printf("lder %f -> %lx\n", in, out); -} - -void lde(double prev, float in) -{ - unsigned long out; - - __asm__ volatile("lde %[prev],%[in]\n\t" - "std %[prev],%[out]" : - [out]"=R"(out) : [prev]"f"(prev), [in]"R"(in)); - printf("lde %f -> %lx\n", in, out); -} - int main(void) { // square root @@ -118,11 +98,5 @@ int main(void) lcdbr(-17.5); // 8 byte values lcdbr(234.5); // 8 byte values - // load lengthened - lder(0.2, 321.5f); - lder(0.9, -8388607.f); - lde(0.2, -321.5f); - lde(0.9, 8388607.f); - return 0; } diff --git a/none/tests/s390x/bfp-2.stdout.exp b/none/tests/s390x/bfp-2.stdout.exp index b1bc484c5d..074180a279 100644 --- a/none/tests/s390x/bfp-2.stdout.exp +++ b/none/tests/s390x/bfp-2.stdout.exp @@ -12,7 +12,3 @@ lcebr -23.500000 -> 23.500000 lcebr 123.500000 -> -123.500000 lcdbr -17.500000 -> 17.500000 lcdbr 234.500000 -> -234.500000 -lder 321.500000 -> 43a0c00000000000 -lder -8388607.000000 -> cafffffe00000000 -lde -321.500000 -> c3a0c00000000000 -lde 8388607.000000 -> 4afffffe00000000 diff --git a/none/tests/s390x/hfp.c b/none/tests/s390x/hfp.c new file mode 100644 index 0000000000..73f70c37c7 --- /dev/null +++ b/none/tests/s390x/hfp.c @@ -0,0 +1,39 @@ +/* Hexadecimal Floating Point insns + + HFP is generally not supported with very few exceptions. + + Carved out of bfp-2.c with no modifications. */ + +#include <stdio.h> + +void lder(double prev, float in) +{ + unsigned long out; + + __asm__ volatile("lder %[prev],%[in]\n\t" + "std %[prev],%[out]" : + [out]"=R"(out) : [prev]"f"(prev), [in]"f"(in)); + printf("lder %f -> %lx\n", in, out); +} + +void lde(double prev, float in) +{ + unsigned long out; + + __asm__ volatile("lde %[prev],%[in]\n\t" + "std %[prev],%[out]" : + [out]"=R"(out) : [prev]"f"(prev), [in]"R"(in)); + printf("lde %f -> %lx\n", in, out); +} + +int main(void) +{ + // load lengthened + lder(0.2, 321.5f); + lder(0.9, -8388607.f); + lde(0.2, -321.5f); + lde(0.9, 8388607.f); + + return 0; +} + diff --git a/none/tests/s390x/hfp.stderr.exp b/none/tests/s390x/hfp.stderr.exp new file mode 100644 index 0000000000..139597f9cb --- /dev/null +++ b/none/tests/s390x/hfp.stderr.exp @@ -0,0 +1,2 @@ + + diff --git a/none/tests/s390x/hfp.stdout.exp b/none/tests/s390x/hfp.stdout.exp new file mode 100644 index 0000000000..2e3e77bb7b --- /dev/null +++ b/none/tests/s390x/hfp.stdout.exp @@ -0,0 +1,4 @@ +lder 321.500000 -> 43a0c00000000000 +lder -8388607.000000 -> cafffffe00000000 +lde -321.500000 -> c3a0c00000000000 +lde 8388607.000000 -> 4afffffe00000000 diff --git a/none/tests/s390x/hfp.vgtest b/none/tests/s390x/hfp.vgtest new file mode 100644 index 0000000000..296bd099a9 --- /dev/null +++ b/none/tests/s390x/hfp.vgtest @@ -0,0 +1 @@ +prog: hfp |
|
From: Mark W. <ma...@so...> - 2025-09-21 19:39:57
|
https://sourceware.org/cgit/valgrind/commit/?id=da81ebf0c53e9d3afd126416d4714cbe5f20120a commit da81ebf0c53e9d3afd126416d4714cbe5f20120a Author: Mark Wielaard <ma...@kl...> Date: Sun Sep 21 21:38:15 2025 +0200 docs/xml/FAQ.xml: listitems contain paras, not raw CDATA Fixes: b5c89ee9839a ("Doc: add item on tcmalloc >= 2.16 hangs to FAQ") Diff: --- docs/xml/FAQ.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/xml/FAQ.xml b/docs/xml/FAQ.xml index bb84f3ee79..5d458a01be 100644 --- a/docs/xml/FAQ.xml +++ b/docs/xml/FAQ.xml @@ -552,9 +552,9 @@ int main(void) <para>Your options are: <itemizedlist> - <listitem>Do not use tcmalloc in the builds that you test with Valgrind.</listitem> - <listitem>Use an older version of tcmalloc. This problem started on 2024-03-24. - If you use gperftools 2.15 or older you should not have this problem.</listitem> + <listitem><para>Do not use tcmalloc in the builds that you test with Valgrind.</para></listitem> + <listitem><para>Use an older version of tcmalloc. This problem started on 2024-03-24. + If you use gperftools 2.15 or older you should not have this problem.</para></listitem> </itemizedlist> </para> |
|
From: Paul F. <pa...@so...> - 2025-09-21 19:37:46
|
https://sourceware.org/cgit/valgrind/commit/?id=86242303aa58560c070f45d25f8db7084803ead7 commit 86242303aa58560c070f45d25f8db7084803ead7 Author: Paul Floyd <pj...@wa...> Date: Sun Sep 21 20:57:04 2025 +0200 doc: missed closing itemizedlist Diff: --- docs/xml/FAQ.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/xml/FAQ.xml b/docs/xml/FAQ.xml index f246fa6c99..bb84f3ee79 100644 --- a/docs/xml/FAQ.xml +++ b/docs/xml/FAQ.xml @@ -555,7 +555,8 @@ int main(void) <listitem>Do not use tcmalloc in the builds that you test with Valgrind.</listitem> <listitem>Use an older version of tcmalloc. This problem started on 2024-03-24. If you use gperftools 2.15 or older you should not have this problem.</listitem> - </para> + </itemizedlist> + </para> </answer> </qandaentry> |
|
From: Paul F. <pa...@so...> - 2025-09-21 19:28:32
|
https://sourceware.org/cgit/valgrind/commit/?id=b5c89ee9839a356248e7fc8f406d7ef888d76076 commit b5c89ee9839a356248e7fc8f406d7ef888d76076 Author: Paul Floyd <pj...@wa...> Date: Sun Sep 21 20:53:33 2025 +0200 Doc: add item on tcmalloc >= 2.16 hangs to FAQ Diff: --- docs/xml/FAQ.xml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/xml/FAQ.xml b/docs/xml/FAQ.xml index 201b365021..f246fa6c99 100644 --- a/docs/xml/FAQ.xml +++ b/docs/xml/FAQ.xml @@ -541,6 +541,26 @@ int main(void) </answer> </qandaentry> +<qandaentry id="faq.hangs"> + <question id="q-hangs"> + <para>Why does Valgrind hang when using tcmalloc?</para> + </question> + <answer id="a-hangss"> + <para>This is because tcmalloc makes a recursive call in its initialisation code. + Under Valgrind that becomes either an infinite loop with optimised builds of tcmalloc + or a stack overflow crash with debug builds of it.</para> + + <para>Your options are: + <itemizedlist> + <listitem>Do not use tcmalloc in the builds that you test with Valgrind.</listitem> + <listitem>Use an older version of tcmalloc. This problem started on 2024-03-24. + If you use gperftools 2.15 or older you should not have this problem.</listitem> + </para> + + </answer> +</qandaentry> + + </qandadiv> <!-- Miscellaneous --> |
|
From: Paul F. <pa...@so...> - 2025-09-21 15:16:10
|
https://sourceware.org/cgit/valgrind/commit/?id=c1f6e5e64aedc82b415bea515d731061d0d6e76f commit c1f6e5e64aedc82b415bea515d731061d0d6e76f Author: Paul Floyd <pj...@wa...> Date: Sun Sep 21 17:08:35 2025 +0200 Refactor: make try_get_interp extern and multi-plaftorm Previously it was static and defined for Darwin, FreeBSD and Linux. Now it is global VG_(args_the_exename) and has a length check. Also fixed a nasty bug related to VG_(args_the_exename). Initially this is set to point to the name of the client command in Valgrinds own arguments. Later when checking for scripts or binaries VG_(load_script) may get called recursively. If it gets called more than once it sets VG_(args_the_exename) to point to the new name. But that is on the stack. Later, if the stack grows too much the name will get overwritten. I was seeing that with my first versions of this code in the recursive tests in none/tests/scripts. Now I'm allocating VG_(args_the_exename) on the heap. Diff: --- coregrind/m_commandline.c | 2 +- coregrind/m_initimg/initimg-darwin.c | 54 +---------------------------------- coregrind/m_initimg/initimg-freebsd.c | 48 +------------------------------ coregrind/m_initimg/initimg-linux.c | 52 +-------------------------------- coregrind/m_pathscan.c | 40 ++++++++++++++++++++++++++ coregrind/m_ume/script.c | 10 ++++++- coregrind/pub_core_pathscan.h | 4 ++- 7 files changed, 56 insertions(+), 154 deletions(-) diff --git a/coregrind/m_commandline.c b/coregrind/m_commandline.c index e9fdb9bb4c..da57d6c8c1 100644 --- a/coregrind/m_commandline.c +++ b/coregrind/m_commandline.c @@ -213,7 +213,7 @@ void VG_(split_up_argv)( Int argc, HChar** argv ) /* Should now be looking at the exe name. */ if (i < argc) { vg_assert(argv[i]); - VG_(args_the_exename) = argv[i]; + VG_(args_the_exename) = VG_(strdup)("commandline.sua.4", argv[i]); i++; } diff --git a/coregrind/m_initimg/initimg-darwin.c b/coregrind/m_initimg/initimg-darwin.c index ca71295f2d..69685ef672 100644 --- a/coregrind/m_initimg/initimg-darwin.c +++ b/coregrind/m_initimg/initimg-darwin.c @@ -259,58 +259,6 @@ static HChar *copy_str(HChar **tab, const HChar *str) return orig; } -/* - * @todo PJF Make this multi-platform - */ -static Bool try_get_interp(const HChar* args_exe, HChar* interp_out) -{ - HChar hdr[4096]; - Int len = sizeof hdr; - SysRes res; - Int fd; - HChar* end; - HChar* cp; - HChar* interp; - - res = VG_(open)(args_exe, VKI_O_RDONLY, 0); - if (sr_isError(res)) { - return False; - } else { - fd = sr_Res(res); - } - - res = VG_(pread)(fd, hdr, len, 0); - - if (sr_isError(res)) { - VG_(close)(fd); - return False; - } else { - len = sr_Res(res); - } - - if (0 != VG_(memcmp)(hdr, "#!", 2)) { - VG_(close)(fd); - return False; - } - - end = hdr + len; - interp = hdr + 2; - while (interp < end && (*interp == ' ' || *interp == '\t')) - interp++; - - for (cp = interp; cp < end && !VG_(isspace)(*cp); cp++) - ; - - *cp = '\0'; - - VG_(sprintf)(interp_out, "%s", interp); - - VG_(close)(fd); - return True; -} - - - /* ---------------------------------------------------------------- This sets up the client's initial stack, containing the args, @@ -503,7 +451,7 @@ Addr setup_client_stack( void* init_sp, if (VG_(resolved_exename) == NULL) { const HChar *exe_name = VG_(find_executable)(VG_(args_the_exename)); HChar interp_name[VKI_PATH_MAX]; - if (try_get_interp(exe_name, interp_name)) { + if (VG_(try_get_interp)(exe_name, interp_name, VKI_PATH_MAX)) { exe_name = interp_name; } HChar resolved_name[VKI_PATH_MAX]; diff --git a/coregrind/m_initimg/initimg-freebsd.c b/coregrind/m_initimg/initimg-freebsd.c index 3e0d07544d..2f8ac82ebb 100644 --- a/coregrind/m_initimg/initimg-freebsd.c +++ b/coregrind/m_initimg/initimg-freebsd.c @@ -337,52 +337,6 @@ static const struct auxv *find_auxv(const UWord* sp) /* * @todo PJF Make this multi-platform */ -static Bool try_get_interp(const HChar* args_exe, HChar* interp_out) -{ - HChar hdr[4096]; - Int len = sizeof hdr; - SysRes res; - Int fd; - HChar* end; - HChar* cp; - HChar* interp; - - res = VG_(open)(args_exe, VKI_O_RDONLY, 0); - if (sr_isError(res)) { - return False; - } else { - fd = sr_Res(res); - } - - res = VG_(pread)(fd, hdr, len, 0); - - if (sr_isError(res)) { - VG_(close)(fd); - return False; - } else { - len = sr_Res(res); - } - - if (0 != VG_(memcmp)(hdr, "#!", 2)) { - VG_(close)(fd); - return False; - } - - end = hdr + len; - interp = hdr + 2; - while (interp < end && (*interp == ' ' || *interp == '\t')) - interp++; - - for (cp = interp; cp < end && !VG_(isspace)(*cp); cp++) - ; - - *cp = '\0'; - - VG_(sprintf)(interp_out, "%s", interp); - - VG_(close)(fd); - return True; -} /* ---------------------------------------------------------------- @@ -468,7 +422,7 @@ static Addr setup_client_stack(const void* init_sp, const HChar *exe_name = VG_(find_executable)(VG_(args_the_exename)); HChar interp_name[VKI_PATH_MAX]; - if (try_get_interp(exe_name, interp_name)) { + if (VG_(try_get_interp)(exe_name, interp_name, VKI_PATH_MAX)) { exe_name = interp_name; } HChar resolved_name[VKI_PATH_MAX]; diff --git a/coregrind/m_initimg/initimg-linux.c b/coregrind/m_initimg/initimg-linux.c index bcca59da74..935f032a40 100644 --- a/coregrind/m_initimg/initimg-linux.c +++ b/coregrind/m_initimg/initimg-linux.c @@ -385,56 +385,6 @@ struct auxv *find_auxv(UWord* sp) return (struct auxv *)sp; } -/* - * @todo PJF Make this multi-platform - */ -static Bool try_get_interp(const HChar* args_exe, HChar* interp_out) -{ - HChar hdr[4096]; - Int len = sizeof hdr; - SysRes res; - Int fd; - HChar* end; - HChar* cp; - HChar* interp; - - res = VG_(open)(args_exe, VKI_O_RDONLY, 0); - if (sr_isError(res)) { - return False; - } else { - fd = sr_Res(res); - } - - res = VG_(pread)(fd, hdr, len, 0); - - if (sr_isError(res)) { - VG_(close)(fd); - return False; - } else { - len = sr_Res(res); - } - - if (0 != VG_(memcmp)(hdr, "#!", 2)) { - VG_(close)(fd); - return False; - } - - end = hdr + len; - interp = hdr + 2; - while (interp < end && (*interp == ' ' || *interp == '\t')) - interp++; - - for (cp = interp; cp < end && !VG_(isspace)(*cp); cp++) - ; - - *cp = '\0'; - - VG_(sprintf)(interp_out, "%s", interp); - - VG_(close)(fd); - return True; -} - static Addr setup_client_stack( void* init_sp, HChar** orig_envp, @@ -1006,7 +956,7 @@ Addr setup_client_stack( void* init_sp, if (VG_(resolved_exename) == NULL) { const HChar *exe_name = VG_(find_executable)(VG_(args_the_exename)); HChar interp_name[VKI_PATH_MAX]; - if (try_get_interp(exe_name, interp_name)) { + if (VG_(try_get_interp)(exe_name, interp_name, VKI_PATH_MAX)) { exe_name = interp_name; } HChar resolved_name[VKI_PATH_MAX]; diff --git a/coregrind/m_pathscan.c b/coregrind/m_pathscan.c index 02b371486e..f667746546 100644 --- a/coregrind/m_pathscan.c +++ b/coregrind/m_pathscan.c @@ -139,6 +139,46 @@ const HChar* VG_(find_executable) ( const HChar* exec ) return executable_name_out; } +Bool VG_(try_get_interp)(const HChar* args_exe, HChar* interp_out, SizeT max_interp_len) +{ + HChar hdr[4096]; + SysRes res; + Int fd; + HChar* end; + HChar* cp; + HChar* interp; + + res = VG_(open)(args_exe, VKI_O_RDONLY, 0); + if (sr_isError(res)) + return False; + fd = sr_Res(res); + + res = VG_(pread)(fd, hdr, sizeof(hdr), 0); + VG_(close)(fd); + if (sr_isError(res)) + return False; + + Int len = sr_Res(res); + if (len < 2 || VG_(memcmp)(hdr, "#!", 2) != 0) + return False; + + end = hdr + len; + interp = hdr + 2; + while (interp < end && (*interp == ' ' || *interp == '\t')) + interp++; + for (cp = interp; cp < end && !VG_(isspace)(*cp); cp++) + ; + + SizeT interp_len = cp - interp; + if (interp_len >= max_interp_len) + return False; + + VG_(memcpy)(interp_out, interp, interp_len); + interp_out[interp_len] = '\0'; + + return True; +} + /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/ diff --git a/coregrind/m_ume/script.c b/coregrind/m_ume/script.c index 82d2477d3f..aadc2de075 100644 --- a/coregrind/m_ume/script.c +++ b/coregrind/m_ume/script.c @@ -124,7 +124,15 @@ Int VG_(load_script)(Int fd, const HChar* name, ExeInfo* info) if (info->argv && info->argv[0] != NULL) info->argv[0] = name; - VG_(args_the_exename) = name; + vg_assert(VG_(args_the_exename)); + if (name) { + if (name != VG_(args_the_exename)) { + VG_(free)((void*)VG_(args_the_exename)); + VG_(args_the_exename) = VG_(strdup)("ume.ls.3", name); + } + } else { + VG_(args_the_exename) = name; + } if (0) VG_(printf)("#! script: interp_name=\"%s\" interp_args=\"%s\"\n", diff --git a/coregrind/pub_core_pathscan.h b/coregrind/pub_core_pathscan.h index d84953ab21..8c89fe37fc 100644 --- a/coregrind/pub_core_pathscan.h +++ b/coregrind/pub_core_pathscan.h @@ -34,4 +34,6 @@ extern const HChar* VG_(find_executable) ( const HChar* exec ); -#endif // ndef __PUB_CORE_PATHSCAN_H +extern Bool VG_(try_get_interp)(const HChar* args_exe, HChar* interp_out, SizeT max_interp_len); + +#endif // __PUB_CORE_PATHSCAN_H |
|
From: Paul F. <pa...@so...> - 2025-09-21 06:08:51
|
https://sourceware.org/cgit/valgrind/commit/?id=1039274db9695bd41a119fe32c465d0845700820 commit 1039274db9695bd41a119fe32c465d0845700820 Author: Paul Floyd <pj...@wa...> Date: Sun Sep 21 08:07:11 2025 +0200 regtest: add arm64-freebsd to tests/platform_test Not explicitly listing the platform was causing the one test to run on other platforms Diff: --- tests/platform_test | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/platform_test b/tests/platform_test index 9762d0c09b..ac452502d0 100644 --- a/tests/platform_test +++ b/tests/platform_test @@ -18,6 +18,7 @@ all_platforms="$all_platforms riscv64-linux" all_platforms="$all_platforms x86-darwin amd64-darwin" all_platforms="$all_platforms x86-solaris amd64-solaris" all_platforms="$all_platforms x86-freebsd amd64-freebsd" +all_platforms="$all_platforms arm64-freebsd" if [ $# -ne 2 ] ; then echo "usage: platform_test <arch-type> <OS-type>" |
|
From: Mark W. <ma...@so...> - 2025-09-20 20:34:28
|
https://sourceware.org/cgit/valgrind/commit/?id=717265383c8af6f99836a42ebe54c49e98065ccb commit 717265383c8af6f99836a42ebe54c49e98065ccb Author: Mark Wielaard <ma...@kl...> Date: Sat Sep 20 22:31:48 2025 +0200 memcheck/tests/Makefile.am: Add arm64-freebsd to DIST_SUBDIRS Fixes: 0a9e19a5947a ("FreeBSD regtest: add scalar_arg_check for arm64") Diff: --- memcheck/tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index c9a617c486..0b192de104 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -75,7 +75,7 @@ endif DIST_SUBDIRS = x86 amd64 arm64 ppc32 ppc64 s390x linux \ darwin solaris x86-linux amd64-linux arm64-linux riscv64-linux \ x86-solaris amd64-solaris mips32 mips64 \ - freebsd amd64-freebsd x86-freebsd \ + freebsd amd64-freebsd arm64-freebsd x86-freebsd \ common . dist_noinst_SCRIPTS = \ |
|
From: Paul F. <pa...@so...> - 2025-09-20 20:07:23
|
https://sourceware.org/cgit/valgrind/commit/?id=7933a6fcb56b5e4de5d56b48e25e869633666185 commit 7933a6fcb56b5e4de5d56b48e25e869633666185 Author: Paul Floyd <pj...@wa...> Date: Sat Sep 20 22:06:08 2025 +0200 FreeBSD arm64: arm64 syscalls also only ever need max 7 args Diff: --- coregrind/m_syscall.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/coregrind/m_syscall.c b/coregrind/m_syscall.c index 18a5920593..52a35a6954 100644 --- a/coregrind/m_syscall.c +++ b/coregrind/m_syscall.c @@ -805,32 +805,31 @@ asm( #elif defined(VGP_arm64_freebsd) /* - * Arguments a1 to a8 are in registers x0 to x7. + * Arguments a1 to a7 are in registers x0 to x6. * Which is just what we want for a syscall. * - * The syscall number is on the top of the stack - * pointed to by sp. The flags are at sp+8 and - * second return value at sp+16. + * The syscall number is in x9 + * The flags are at the top of the stack, sp and + * second return value at sp+8. */ extern UWord do_syscall_WRK ( UWord a1, UWord a2, UWord a3, UWord a4, UWord a5, UWord a6, - UWord a7, UWord a8, - UWord syscall_no, + UWord a7, UWord syscall_no, UInt *flags, UWord *rv2 ); asm( ".text\n" ".globl do_syscall_WRK\n" "do_syscall_WRK:\n" - " ldr x8, [sp]\n" // retrieve syscall_no, put it in x8 + " mov x8, x9\n" // get the syscall number from x9 " svc 0x0\n" // do the syscall " mov x9, 1\n" // flags for error will be 1 or 0 " csel x9, x9, xzr, cs\n" // conditionally select 1 or 0 into x9 - " ldr x10, [sp, #8]\n" // load the address of flags + " ldr x10, [sp]\n" // load the address of flags " str w9, [x10]\n" // store flags result - " ldr x10, [sp, #16]\n" // load the addres of rv2 + " ldr x10, [sp, #8]\n" // load the addres of rv2 " str x1, [x10]\n" // store rv2 result " ret\n" ".previous\n" @@ -1236,7 +1235,7 @@ SysRes VG_(do_syscall) ( UWord sysno, RegWord a1, RegWord a2, RegWord a3, UWord val2 = 0; UInt err = 0; val = do_syscall_WRK(a1, a2, a3, a4, a5, - a6, a7, a8, sysno, &err, &val2); + a6, a7, sysno, &err, &val2); return VG_(mk_SysRes_arm64_freebsd)( val, val2, (err & 1) != 0 ? True : False); # elif defined(VGP_ppc32_linux) |
|
From: Paul F. <pa...@so...> - 2025-09-20 19:04:55
|
https://sourceware.org/cgit/valgrind/commit/?id=0a9e19a5947a2d57f5a40ebd4095a9320978b66b commit 0a9e19a5947a2d57f5a40ebd4095a9320978b66b Author: Paul Floyd <pj...@wa...> Date: Sat Sep 20 21:01:22 2025 +0200 FreeBSD regtest: add scalar_arg_check for arm64 Much the same as arm64. x86 otoh is the only FreeBSD platform to use PRE_REG_READ8 (again for sendfile). Diff: --- .gitignore | 10 ++++++++++ configure.ac | 1 + memcheck/tests/Makefile.am | 3 +++ memcheck/tests/arm64-freebsd/Makefile.am | 16 ++++++++++++++++ memcheck/tests/arm64-freebsd/filter_arg_check | 22 ++++++++++++++++++++++ memcheck/tests/arm64-freebsd/filter_stderr | 3 +++ memcheck/tests/arm64-freebsd/scalar_arg_check.c | 1 + .../arm64-freebsd/scalar_arg_check.stderr.exp | 1 + .../tests/arm64-freebsd/scalar_arg_check.vgtest | 1 + 9 files changed, 58 insertions(+) diff --git a/.gitignore b/.gitignore index 75675b1310..a5e97008be 100644 --- a/.gitignore +++ b/.gitignore @@ -1506,6 +1506,16 @@ /memcheck/tests/x86-freebsd/posix_fallocate /memcheck/tests/x86-freebsd/reallocarray +# /memcheck/tests/arm64-freebsd +/memcheck/tests/arm64-freebsd/*.stderr.diff +/memcheck/tests/arm64-freebsd/*.stderr.out +/memcheck/tests/arm64-freebsd/*.stdout.diff +/memcheck/tests/arm64-freebsd/*.stdout.out +/memcheck/tests/arm64-freebsd/.deps +/memcheck/tests/arm64-freebsd/Makefile +/memcheck/tests/arm64-freebsd/Makefile.in +/memcheck/tests/arm64-freebsd/scalar_arg_check + # /mpi/ /mpi/*.dSYM /mpi/*.so diff --git a/configure.ac b/configure.ac index 1740008a61..1e7d506557 100755 --- a/configure.ac +++ b/configure.ac @@ -5779,6 +5779,7 @@ AC_CONFIG_FILES([ memcheck/tests/amd64-solaris/Makefile memcheck/tests/x86-solaris/Makefile memcheck/tests/amd64-freebsd/Makefile + memcheck/tests/arm64-freebsd/Makefile memcheck/tests/x86-freebsd/Makefile memcheck/tests/ppc32/Makefile memcheck/tests/ppc64/Makefile diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index c1779a7bb3..c9a617c486 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -68,6 +68,9 @@ endif if VGCONF_PLATFORMS_INCLUDE_AMD64_FREEBSD SUBDIRS += amd64-freebsd endif +if VGCONF_PLATFORMS_INCLUDE_ARM64_FREEBSD +SUBDIRS += arm64-freebsd +endif DIST_SUBDIRS = x86 amd64 arm64 ppc32 ppc64 s390x linux \ darwin solaris x86-linux amd64-linux arm64-linux riscv64-linux \ diff --git a/memcheck/tests/arm64-freebsd/Makefile.am b/memcheck/tests/arm64-freebsd/Makefile.am new file mode 100644 index 0000000000..66523227ac --- /dev/null +++ b/memcheck/tests/arm64-freebsd/Makefile.am @@ -0,0 +1,16 @@ + +include $(top_srcdir)/Makefile.tool-tests.am + +dist_noinst_SCRIPTS = filter_stderr filter_arg_check + +EXTRA_DIST = \ + scalar_arg_check.vgtest \ + scalar_arg_check.stderr.exp + +check_PROGRAMS = \ + scalar_arg_check + +AM_CFLAGS += @FLAG_M64@ +AM_CXXFLAGS += @FLAG_M64@ +AM_CCASFLAGS += @FLAG_M64@ + diff --git a/memcheck/tests/arm64-freebsd/filter_arg_check b/memcheck/tests/arm64-freebsd/filter_arg_check new file mode 100755 index 0000000000..334a326694 --- /dev/null +++ b/memcheck/tests/arm64-freebsd/filter_arg_check @@ -0,0 +1,22 @@ +#! /bin/sh + +# Only one test uses this which calls syscall(SYS_sendfile) +# which is the only amd64 syscall that uses 7 arguments +# The output includes --trace-syscalls=yes which is very verbose +# but we only want to see the sendfile line + +# the libc signature for sendfile is +# int sendfile(int fd, int s, off_t offset, size_t nbytes, +# struct sf_hdtr *hdtr, off_t *sbytes, int flags); +# The testcase uses values from 101 to 107 for the arguments +# (to make it easy to match the testcase to the log output) +# Some of the arguments are printed as hex, not too bad. +# Argument 6 is an offset which seems to get added to some +# variable length base address before being sent to the syscall. +# I've checked with truss and ktrace, this doesn't come from Valgrind + +grep "SYSCALL.*sendfile" | +sed 's/==.*//' | +awk '{l=length($9);$9="0x"substr($9, l-2, l);print}' | +sed -E 's/\[[0-9]{5}/[xxxxx/' + diff --git a/memcheck/tests/arm64-freebsd/filter_stderr b/memcheck/tests/arm64-freebsd/filter_stderr new file mode 100755 index 0000000000..a778e971fc --- /dev/null +++ b/memcheck/tests/arm64-freebsd/filter_stderr @@ -0,0 +1,3 @@ +#! /bin/sh + +../filter_stderr "$@" diff --git a/memcheck/tests/arm64-freebsd/scalar_arg_check.c b/memcheck/tests/arm64-freebsd/scalar_arg_check.c new file mode 120000 index 0000000000..629936bea6 --- /dev/null +++ b/memcheck/tests/arm64-freebsd/scalar_arg_check.c @@ -0,0 +1 @@ +../amd64-freebsd/scalar_arg_check.c \ No newline at end of file diff --git a/memcheck/tests/arm64-freebsd/scalar_arg_check.stderr.exp b/memcheck/tests/arm64-freebsd/scalar_arg_check.stderr.exp new file mode 100644 index 0000000000..7b9fc63632 --- /dev/null +++ b/memcheck/tests/arm64-freebsd/scalar_arg_check.stderr.exp @@ -0,0 +1 @@ +SYSCALL[xxxxx,1](393) sys_sendfile ( 101, 102, 103, 104, 0x69, 0x6a, 107 ) diff --git a/memcheck/tests/arm64-freebsd/scalar_arg_check.vgtest b/memcheck/tests/arm64-freebsd/scalar_arg_check.vgtest new file mode 120000 index 0000000000..5b2d7ffafc --- /dev/null +++ b/memcheck/tests/arm64-freebsd/scalar_arg_check.vgtest @@ -0,0 +1 @@ +../amd64-freebsd/scalar_arg_check.vgtest \ No newline at end of file |
|
From: Paul F. <pa...@so...> - 2025-09-20 17:22:50
|
https://sourceware.org/cgit/valgrind/commit/?id=0700c69d4f0fd9982c7fb31d84e35a2f91780898 commit 0700c69d4f0fd9982c7fb31d84e35a2f91780898 Author: Paul Floyd <pj...@wa...> Date: Sat Sep 20 19:20:50 2025 +0200 FreeBSD amd64: amd64 syscalls only ever need max 7 args The only possible exception would be a syscall0 of SYS_sendfile done by the host. Since we're never going to do that reduce the number of arguments to 7. Diff: --- coregrind/m_syscall.c | 11 ++++------- coregrind/m_syswrap/syscall-amd64-freebsd.S | 12 ++---------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/coregrind/m_syscall.c b/coregrind/m_syscall.c index c76f1df81b..18a5920593 100644 --- a/coregrind/m_syscall.c +++ b/coregrind/m_syscall.c @@ -768,7 +768,6 @@ extern UWord do_syscall_WRK ( UWord a5, /* %r9 */ UWord a6, /* 8(%rsp) */ UWord a7, /* 16(%rsp) */ - UWord a8, /* 24(%rsp) */ UInt *flags, /* 32(%rsp) */ UWord *rv2 /* 40(%rsp) */ ); @@ -784,20 +783,18 @@ asm( " movq %r8, %r10\n" /* a4 */ " movq %r9, %r8\n" /* a5 */ " movq 16(%rbp), %r9\n" /* a6 last register arg from stack, account for %rbp */ -" movq 32(%rbp), %r11\n" /* a8 from stack */ -" pushq %r11\n" " movq 24(%rbp), %r11\n" /* a7 from stack */ -" pushq %r11\n" +" pushq %r11\n" " subq $8,%rsp\n" /* fake return addr */ " syscall\n" " jb 1f\n" -" movq 48(%rbp),%rsi\n" /* success */ +" movq 40(%rbp),%rsi\n" /* success */ " movq %rdx, (%rsi)\n" /* second return value */ " movq %rbp, %rsp\n" " popq %rbp\n" " ret\n" "1:\n" /* error path */ -" movq 40(%rbp), %rsi\n" /* flags */ +" movq 32(%rbp), %rsi\n" /* flags */ " movl $1,(%rsi)\n" " movq %rbp, %rsp\n" " popq %rbp\n" @@ -1231,7 +1228,7 @@ SysRes VG_(do_syscall) ( UWord sysno, RegWord a1, RegWord a2, RegWord a3, UWord val2 = 0; UInt err = 0; val = do_syscall_WRK(sysno, a1, a2, a3, a4, a5, - a6, a7, a8, &err, &val2); + a6, a7, &err, &val2); return VG_(mk_SysRes_amd64_freebsd)( val, val2, (err & 1) != 0 ? True : False); # elif defined(VGP_arm64_freebsd) diff --git a/coregrind/m_syswrap/syscall-amd64-freebsd.S b/coregrind/m_syswrap/syscall-amd64-freebsd.S index d1516b1065..14cd4ee90b 100644 --- a/coregrind/m_syswrap/syscall-amd64-freebsd.S +++ b/coregrind/m_syswrap/syscall-amd64-freebsd.S @@ -112,17 +112,9 @@ ML_(do_syscall_for_client_WRK): movq OFFSET_amd64_R10(%r11), %r10 movq OFFSET_amd64_R8(%r11), %r8 movq OFFSET_amd64_R9(%r11), %r9 - /* 2 stack parameters plus return address (ignored by syscall) */ - /* @todo PJF there is a potential bug here - * syscall can take up to 8 arguments - * but when syscall0 or syscall198 is being used - * one argument is used for the syscall0/198 id - * and one for the actual id and in this case - * there could be 3 stack parameters. - * However, only mmap takes 8 arguments - * and only on x86. It would be an unlikely combination, - * but this might break one day. */ + /* get RSP */ movq OFFSET_amd64_RSP(%r11), %r11 /* r11 = simulated RSP */ + /* 2 stack parameters */ movq 16(%r11), %rax pushq %rax movq 8(%r11), %rax |
|
From: Paul F. <pa...@so...> - 2025-09-20 17:20:42
|
https://sourceware.org/cgit/valgrind/commit/?id=6a191834d53f44af3d83cb53c2955c195550961a commit 6a191834d53f44af3d83cb53c2955c195550961a Author: Paul Floyd <pj...@wa...> Date: Sat Sep 20 19:19:46 2025 +0200 FreeBSD regtest: forgot the makefile changes for amd64 scalar_arg_check Diff: --- memcheck/tests/amd64-freebsd/Makefile.am | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/memcheck/tests/amd64-freebsd/Makefile.am b/memcheck/tests/amd64-freebsd/Makefile.am index 9f1cefea21..378446d4cf 100644 --- a/memcheck/tests/amd64-freebsd/Makefile.am +++ b/memcheck/tests/amd64-freebsd/Makefile.am @@ -1,7 +1,7 @@ include $(top_srcdir)/Makefile.tool-tests.am -dist_noinst_SCRIPTS = filter_stderr +dist_noinst_SCRIPTS = filter_stderr filter_arg_check EXTRA_DIST = \ posix_fadvise.vgtest \ @@ -11,10 +11,12 @@ EXTRA_DIST = \ reallocarray.vgtest \ reallocarray.stderr.exp \ reallocf.vgtest \ - reallocf.stderr.exp + reallocf.stderr.exp \ + scalar_arg_check.vgtest \ + scalar_arg_check.stderr.exp check_PROGRAMS = \ - posix_fadvise posix_fallocate reallocarray reallocf + posix_fadvise posix_fallocate reallocarray reallocf scalar_arg_check AM_CFLAGS += @FLAG_M64@ AM_CXXFLAGS += @FLAG_M64@ |
|
From: Paul F. <pa...@so...> - 2025-09-20 17:18:26
|
https://sourceware.org/cgit/valgrind/commit/?id=ba04b3177e8fdcbb71686585850877fe6ab48ffa commit ba04b3177e8fdcbb71686585850877fe6ab48ffa Author: Paul Floyd <pj...@wa...> Date: Sat Sep 20 19:16:38 2025 +0200 FreeBSD regtest: add an amd64 test that max nb args to a syscall get passed correctly Diff: --- .gitignore | 1 + memcheck/tests/amd64-freebsd/filter_arg_check | 22 ++++++++++++++++++++++ memcheck/tests/amd64-freebsd/scalar_arg_check.c | 8 ++++++++ .../amd64-freebsd/scalar_arg_check.stderr.exp | 1 + .../tests/amd64-freebsd/scalar_arg_check.vgtest | 3 +++ 5 files changed, 35 insertions(+) diff --git a/.gitignore b/.gitignore index d548fb7bab..75675b1310 100644 --- a/.gitignore +++ b/.gitignore @@ -1492,6 +1492,7 @@ /memcheck/tests/amd64-freebsd/posix_fallocate /memcheck/tests/amd64-freebsd/reallocarray /memcheck/tests/amd64-freebsd/reallocf +/memcheck/tests/amd64-freebsd/scalar_arg_check # /memcheck/tests/x86-freebsd /memcheck/tests/x86-freebsd/*.stderr.diff diff --git a/memcheck/tests/amd64-freebsd/filter_arg_check b/memcheck/tests/amd64-freebsd/filter_arg_check new file mode 100755 index 0000000000..334a326694 --- /dev/null +++ b/memcheck/tests/amd64-freebsd/filter_arg_check @@ -0,0 +1,22 @@ +#! /bin/sh + +# Only one test uses this which calls syscall(SYS_sendfile) +# which is the only amd64 syscall that uses 7 arguments +# The output includes --trace-syscalls=yes which is very verbose +# but we only want to see the sendfile line + +# the libc signature for sendfile is +# int sendfile(int fd, int s, off_t offset, size_t nbytes, +# struct sf_hdtr *hdtr, off_t *sbytes, int flags); +# The testcase uses values from 101 to 107 for the arguments +# (to make it easy to match the testcase to the log output) +# Some of the arguments are printed as hex, not too bad. +# Argument 6 is an offset which seems to get added to some +# variable length base address before being sent to the syscall. +# I've checked with truss and ktrace, this doesn't come from Valgrind + +grep "SYSCALL.*sendfile" | +sed 's/==.*//' | +awk '{l=length($9);$9="0x"substr($9, l-2, l);print}' | +sed -E 's/\[[0-9]{5}/[xxxxx/' + diff --git a/memcheck/tests/amd64-freebsd/scalar_arg_check.c b/memcheck/tests/amd64-freebsd/scalar_arg_check.c new file mode 100644 index 0000000000..cfa6d4ea08 --- /dev/null +++ b/memcheck/tests/amd64-freebsd/scalar_arg_check.c @@ -0,0 +1,8 @@ +#include "../freebsd/scalar.h" + +int main(void) +{ + /* sendfile uses 7 args */ + SY(SYS_sendfile, 101, 102, 103, 104, 105, 106, 107); +} + diff --git a/memcheck/tests/amd64-freebsd/scalar_arg_check.stderr.exp b/memcheck/tests/amd64-freebsd/scalar_arg_check.stderr.exp new file mode 100644 index 0000000000..7b9fc63632 --- /dev/null +++ b/memcheck/tests/amd64-freebsd/scalar_arg_check.stderr.exp @@ -0,0 +1 @@ +SYSCALL[xxxxx,1](393) sys_sendfile ( 101, 102, 103, 104, 0x69, 0x6a, 107 ) diff --git a/memcheck/tests/amd64-freebsd/scalar_arg_check.vgtest b/memcheck/tests/amd64-freebsd/scalar_arg_check.vgtest new file mode 100644 index 0000000000..b5c15205e0 --- /dev/null +++ b/memcheck/tests/amd64-freebsd/scalar_arg_check.vgtest @@ -0,0 +1,3 @@ +prog: scalar_arg_check +vgopts: -q --trace-syscalls=yes +stderr_filter: filter_arg_check |
|
From: Florian K. <fk...@so...> - 2025-09-19 22:08:39
|
https://sourceware.org/cgit/valgrind/commit/?id=9a1dbff3812a71ea556b9d80056a11ca8ff88023 commit 9a1dbff3812a71ea556b9d80056a11ca8ff88023 Author: Florian Krohm <fl...@ei...> Date: Fri Sep 19 22:06:27 2025 +0000 s390: Add bfp-emit.pl (BZ 509572) For a BFP insn X in the guest code the same insn will be emitted in the jitted code. This does not hold universally but for most BFP insns it does. bfp-emit.pl contains a complete list of all BFP insns as of Principles of Operations SA22-7832-14. It tests all insns for which the above observation is true and ensures the emitted insn matches the insn in the guest code. Part of fixing https://bugs.kde.org/show_bug.cgi?id=509572 Diff: --- none/tests/s390x/Makefile.am | 3 +- none/tests/s390x/bfp-emit.pl | 483 ++++++++++++++++ none/tests/s390x/bfp-emit.post.exp | 1050 ++++++++++++++++++++++++++++++++++ none/tests/s390x/bfp-emit.stderr.exp | 2 + none/tests/s390x/bfp-emit.vgtest | 3 + 5 files changed, 1540 insertions(+), 1 deletion(-) diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am index 88ee52e7a1..98ef178e7a 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 +dist_noinst_SCRIPTS = filter_stderr bfp-emit.pl INSN_TESTS = clc clcle cvb cvd icm lpr tcxb lam_stam xc mvst add sub mul \ and or xor insert div srst fold_And16 flogr sub_EI add_EI \ @@ -34,6 +34,7 @@ EXTRA_DIST = \ $(addsuffix .stderr.exp,$(INSN_TESTS)) \ $(addsuffix .stdout.exp,$(INSN_TESTS)) \ $(addsuffix .vgtest,$(INSN_TESTS)) \ + 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 \ ecag.stdout.exp-z16 \ diff --git a/none/tests/s390x/bfp-emit.pl b/none/tests/s390x/bfp-emit.pl new file mode 100755 index 0000000000..4128a5d023 --- /dev/null +++ b/none/tests/s390x/bfp-emit.pl @@ -0,0 +1,483 @@ +#!/usr/bin/env perl + +#-------------------------------------------------------------------- +# For a subset of the available BFP insns the following is true: +# +# For a BFP insn X in the guest code the very same insn will be +# emitted in the jitted code. +# +# This is because IR optimisers do not touch floating point IROps. +# Meaning: if we can show that for insn X the same insn X is emitted +# we do not need to proof read results of floating point computations. +# Exceptions are: checking order of operands for non-commutative +# operators and condition code computation. This is done elsewhere. +# +# Here we do the following: +# Craft a tiny program using insns X. Run valgrind on it, trace IR +# generation and assembly. Check the output making sure that insn X +# appears once in the "Frontend" section and once in the "Assembly" +# section. +# +# Below is a complete list of all BFP insns as of SA22-7832-14. +#-------------------------------------------------------------------- + +use strict; +use warnings; +use Cwd 'abs_path'; + +my $rootdir = get_rootdir(); +my $runone = "$rootdir/auxprogs/s390-runone"; +my $valgrind = "$rootdir/coregrind/valgrind"; +my $valargs = "-q --tool=none --trace-notbelow=0 --trace-flags=10000001"; + + +# Instructions that are always mapped independent of any rounding mode +# or whatever. +my %insn_map = ( + # l[cnp]dfr cannot be disinguished from l[cnp]dbr because they + # use the same IROp. + "lcdfr" => "lcdbr", + "lndfr" => "lndbr", + "lpdfr" => "lpdbr", + + # The "and signal" part is currently ignored + "kebr" => "cebr", + "kdbr" => "cdbr", + "kxbr" => "cxbr", + + # c[fg][edx]br and c[fg][edx]bra differ only in the presence of an m4 + # field. That field cannot be represented in VEX IR and is therefore + # ignored and assumed to be zero. + "cfebra" => "cfebr", + "cfdbra" => "cfdbr", + "cfxbra" => "cfxbr", + "cgebra" => "cgebr", + "cgdbra" => "cgdbr", + "cgxbra" => "cgxbr", + + # cdfbra 32-bit int --> 64-bit BFP Iop_I32StoF64 has no rounding + # cxfbra 32-bit int --> 128-bit BFP Iop_I32StoF128 has no rounding mode + # cxgbra 64-bit int --> 128-bit BFP Iop_I64StoF128 has no rounding mode + "cdfbra" => "cdfbr", + "cxfbra" => "cxfbr", + "cxgbra" => "cxgbr", + + # fi[edx]br and fi[edx]bra differ only in the presence of an m4 field. + # That field cannot be represented in VEX IR and is therefore ignored + # and assumed to be zero. + "fiebra" => "fiebr", + "fidbra" => "fidbr", + "fixbra" => "fixbr", +); + +&main; + +sub main +{ + if ($#ARGV == 0 && $ARGV[0] eq "--check-prereq") { + my $stdout = `as --version`; + # GNU assembler (GNU Binutils for Ubuntu) 2.38 + $stdout = (split /\n/, $stdout)[0]; + $stdout =~ s/^[^0-9]+//; + my @v = split /\./, $stdout; + exit 0 if ($v[0] > 2 || ($v[0] == 2 && $v[1] >= 44)); + exit 1; + } + + #----------------------------------------------------------------------- + # POP Chapter 9: Floating-Point Overview and Support Instructions + #----------------------------------------------------------------------- + + # CONVERT BFP TO HFP not implemented + # CONVERT HFP TO BFP not implemented + # COPY SIGN insn not mapped one-to-one + # EXTRACT FPC just guest state access + # LOAD just guest state access + + header("LOAD COMPLEMENT"); + test_insn("lcdfr %f0,%f1", \&mapper); + + # LOAD FPC just guest state access + # LOAD FPC AND SIGNAL not implemented + + header("LOAD FPR FROM GR"); + test_insn("ldgr %f0,%r1"); + + header("LOAD GR FROM FPR"); + test_insn("lgdr %r0,%f1"); + + header("LOAD NEGATIVE"); + test_insn("lndfr %f0,%f1", \&mapper); + + header("LOAD POSITIVE"); + test_insn("lpdfr %f0,%f1", \&mapper); + + header("LOAD ZERO"); + test_insn("lzer %f0"); + test_insn("lzdr %f0"); + # test_insn("lzxr %f0") insn not mapped one-to-one + + # PFPO insn not mapped one-to-one + # SET BFP ROUNDING MODE insn not mapped one-to-one + # SET DFP ROUNDING MODE insn not mapped one-to-one + # SET FPC just guest state access + # SET FPC AND SIGNAL not implemented + # STORE insn not mapped one-to-one + # STORE FPC just store + guest state access + + #---------------------------------------------------------------------- + # POP Chapter 19: Binary-Floating-Point Instructions + #---------------------------------------------------------------------- + + header("ADD"); + test_insn("aebr %f0,%f1"); + test_insn("adbr %f0,%f1"); + test_insn("axbr %f0,%f1"); + + header("COMPARE"); + test_insn("cebr %f0,%f1"); + test_insn("cdbr %f0,%f1"); + test_insn("cxbr %f0,%f1"); + + header("COMPARE AND SIGNAL"); + test_insn("kebr %f0,%f1", \&mapper); + test_insn("kdbr %f0,%f1", \&mapper); + test_insn("kxbr %f0,%f1", \&mapper); + + header("CONVERT FROM FIXED"); + test_insn("cefbr %f0,%r1"); + test_insn("cdfbr %f0,%r1"); + test_insn("cxfbr %f0,%r1"); + test_insn("cegbr %f0,%r1"); + test_insn("cdgbr %f0,%r1"); + test_insn("cxgbr %f0,%r1"); + foreach my $mode (0, 1, 3, 4, 5, 6, 7) + { + test_insn("cefbra %f0,$mode,%r1,0", \&mapper); + test_insn("cdfbra %f0,$mode,%r1,0", \&mapper); + test_insn("cxfbra %f0,$mode,%r1,0", \&mapper); + test_insn("cegbra %f0,$mode,%r1,0", \&mapper); + test_insn("cdgbra %f0,$mode,%r1,0", \&mapper); + test_insn("cxgbra %f0,$mode,%r1,0", \&mapper); + } + + header("CONVERT FROM LOGICAL"); + # cdlfbr 32-bit uint --> 64-bit BFP Iop_I32UtoF64 has no rounding mode + # cxlfbr 32-bit uint --> 128-bit BFP Iop_I32UtoF128 has no rounding mode + # cxlgbr 64-bit uint --> 128-bit BFP Iop_I64UtoF128 has no rounding mode + # For those rounding mode 4 is chosen when emitting. + foreach my $mode (0, 1, 3, 4, 5, 6, 7) + { + test_insn("celfbr %f0,$mode,%r1,0", \&mapper); + test_insn("cdlfbr %f0,$mode,%r1,0", \&mapper); + test_insn("cxlfbr %f0,$mode,%r1,0", \&mapper); + test_insn("celgbr %f0,$mode,%r1,0", \&mapper); + test_insn("cdlgbr %f0,$mode,%r1,0", \&mapper); + test_insn("cxlgbr %f0,$mode,%r1,0", \&mapper); + } + + header("CONVERT TO FIXED"); + foreach my $mode (0, 1, 3, 4, 5, 6, 7) + { + test_insn("cfebr %r0,$mode,%f1"); + test_insn("cfdbr %r0,$mode,%f1"); + test_insn("cfxbr %r0,$mode,%f1"); + test_insn("cgebr %r0,$mode,%f1"); + test_insn("cgdbr %r0,$mode,%f1"); + test_insn("cgxbr %r0,$mode,%f1"); + } + foreach my $mode (0, 1, 3, 4, 5, 6, 7) + { + test_insn("cfebra %r0,$mode,%f1,0", \&mapper); + test_insn("cfdbra %r0,$mode,%f1,0", \&mapper); + test_insn("cfxbra %r0,$mode,%f1,0", \&mapper); + test_insn("cgebra %r0,$mode,%f1,0", \&mapper); + test_insn("cgdbra %r0,$mode,%f1,0", \&mapper); + test_insn("cgxbra %r0,$mode,%f1,0", \&mapper); + } + + header("CONVERT TO LOGICAL"); + foreach my $mode (0, 1, 3, 4, 5, 6, 7) + { + test_insn("clfebr %r0,$mode,%f1,0"); + test_insn("clfdbr %r0,$mode,%f1,0"); + test_insn("clfxbr %r0,$mode,%f1,0"); + test_insn("clgebr %r0,$mode,%f1,0"); + test_insn("clgdbr %r0,$mode,%f1,0"); + test_insn("clgxbr %r0,$mode,%f1,0"); + } + + header("DIVIDE"); + test_insn("debr %f0,%f1"); + test_insn("ddbr %f0,%f1"); + test_insn("dxbr %f0,%f1"); + + # echo "DIVIDE TO INTEGER" not implemented + # echo "LOAD AND TEST" insn not mapped one-to-one + + header("LOAD COMPLEMENT"); + test_insn("lcebr %f0,%f1"); + test_insn("lcdbr %f0,%f1"); + test_insn("lcxbr %f0,%f1"); + + header("LOAD FP INTEGER"); + foreach my $mode (0, 1, 3, 4, 5, 6, 7) + { + test_insn("fiebr %f0,$mode,%f1"); + test_insn("fidbr %f0,$mode,%f1"); + test_insn("fixbr %f0,$mode,%f1"); + } + foreach my $mode (0, 1, 3, 4, 5, 6, 7) + { + test_insn("fiebra %f0,$mode,%f1,0", \&mapper); + test_insn("fidbra %f0,$mode,%f1,0", \&mapper); + test_insn("fixbra %f0,$mode,%f1,0", \&mapper); + } + + header("LOAD LENGTHENED"); + test_insn("ldebr %f0,%f1"); + test_insn("lxdbr %f0,%f1"); + test_insn("lxebr %f0,%f1"); + + header("LOAD NEGATIVE"); + test_insn("lnebr %f0,%f1"); + test_insn("lndbr %f0,%f1"); + #test_insn("lnxbr %f0,%f1"); insn not mapped one-to-one + + header("LOAD POSITIVE"); + test_insn("lpebr %f0,%f1"); + test_insn("lpdbr %f0,%f1"); + test_insn("lpxbr %f0,%f1"); + + header("LOAD ROUNDED"); + test_insn("ledbr %f0,%f1"); + test_insn("ldxbr %f0,%f1"); + test_insn("lexbr %f0,%f1"); + foreach my $mode (0, 1, 3, 4, 5, 6, 7) + { + test_insn("ledbra %f0,$mode,%f1,0", \&mapper); + test_insn("ldxbra %f0,$mode,%f1,0", \&mapper); + test_insn("lexbra %f0,$mode,%f1,0", \&mapper); + } + + header("MULTIPLY"); + test_insn("meebr %f0,%f1"); + test_insn("mdbr %f0,%f1"); + test_insn("mxbr %f0,%f1"); + # mdebr not implemented + # mxdbr not implemented + + header("MULTIPLY AND ADD"); + test_insn("maebr %f0,%f1,%f2"); + test_insn("madbr %f0,%f1,%f2"); + + header("MULTIPLY AND SUBTRACT"); + test_insn("msebr %f0,%f1,%f2"); + test_insn("msdbr %f0,%f1,%f2"); + + header("SQUARE ROOT"); + test_insn("sqebr %f0,%f1"); + test_insn("sqdbr %f0,%f1"); + test_insn("sqxbr %f0,%f1"); + + header("SUBTRACT"); + test_insn("sebr %f0,%f1"); + test_insn("sdbr %f0,%f1"); + test_insn("sxbr %f0,%f1"); + + # TEST DATA CLASS insn not mapped one-to-one + exit 0; +} + +sub mapper +{ + my ($mnm, @opnds) = @_; + + my $mapped = $insn_map{$mnm}; + if ($mapped) { + return $mapped; + } + + $mapped = $mnm; + if ($opnds[1] eq "0") { + if ($mnm eq "cefbra" || + $mnm eq "cegbra" || $mnm eq "cdgbra" || + $mnm eq "ledbra" || $mnm eq "ldxbra" || $mnm eq "lexbra") { + $mapped =~ s/a//; + } + } + return $mapped; +} + +sub test_insn +{ + my ($insn) = @_; + my ($mnm, @opnds) = disect_insn($insn); + print "Testing: $insn\n"; + + my $exe = "xxbfp-$mnm"; + my $cfile = "$exe.c"; + + # Create template + `$runone --template --insn=\"$insn\" > $cfile`; + + # Compile + my $stderr = `$runone --build $cfile 2>&1`; + if ($? != 0) { + error("runone failed\n$stderr"); + return; + } + + # Run valgrind + my $stdout = `$valgrind $valargs ./$exe 2>&1`; + + # Parse the output from valgrind + # Need to find the "interesting" insns in the stream. There isexactly + # one such insn in the "frontend" part and in the "assembly" part. + # + # Let + # - U be the unmodified mnemonic + # - M be the mapped mnemonic + # - F be the mnemonic in the "frontend" section + # - A be the mnemonic in the "frontend" section + # + # There are 4 cases to distinguish: + # 1) F == U and A == U e.g aebr + # 2) F == U and A == M e.g. kebr (F == kebr , A == cebr) + # 3) F == M and A == U does not occur + # 4) F == M and A == M e.g. cefbra with rounding mode == 0 --> cefbr + # + my $mapped = $mnm; + if (scalar @_ == 2) { + my $mapfunc = $_[1]; + $mapped = $mapfunc->($mnm, @opnds); + } + + my $U = $mnm; + my $M = $mapped; + + my $output = ""; + my $in_frontend = 0; + my $in_assembly = 0; + my $frontend_insn = ""; + my $assembly_insn = ""; + my @lines = split /\n/,$stdout; + for my $line (@lines) { + if ($line =~ /Front end/) { + $in_frontend = 1; +# $output .= "$line\n"; + next; + } elsif ($line =~ /Assembly/) { + $in_frontend = 0; + $in_assembly = 1; +# $output .= "$line\n"; + next; + } + if ($in_frontend) { + # insns begin in column #1 and are in lower case + if ($line =~ /^[a-z]/) { + my $F = $line; + $F =~ s/\s.*//; + if ($F eq $U || $F eq $M) { + $output .= "Frontend: $line\n"; + } + } + next; + } + if ($in_assembly) { + # Skip v-insns + next if ($line =~ /^v-/); + # insns begin in column #1 and are in lower case + if ($line =~ /^[a-z]/) { + my $A = $line; + $A =~ s/\s.*//; + if ($A eq $U || $A eq $M) { + $output .= "Assembly: $line\n"; + } + } + next; + } + } + print "$output"; + + # Check result + my $rc = check_valgrind_output($mnm, $output); + + # Remove files + if ($rc == 0) { + unlink ($exe, $cfile, "$exe.s", "$exe.s.orig"); + } +} + +sub check_valgrind_output +{ + return 0; + my ($mnm, $stdout) = @_; + + my @lines = split /\n/,$stdout; + my $num_lines = scalar @lines; + + if ($num_lines != 4) { + error("$mnm: Expected 4 lines; found $num_lines"); + for my $line (@lines) { + print "LINE |$line|\n"; + } + return 1; + } + if ($lines[0] !~ "Front end") { + error("$mnm: Unrecognised line |$lines[0]|"); + return 1; + } + if ($lines[2] !~ "Assembly") { + error("$mnm: Unrecognised line |$lines[2]|"); + return 1; + } + return 0; +} + +sub disect_insn +{ + my ($insn) = @_; + my ($mnm, $opnd_string) = ($insn, ""); + + if ($insn =~ /^([a-zA-Z][a-zA-A0-9]*)\s+(.*)$/) { + $mnm = $1; + $opnd_string = $2; + } + + my @opnds = split /\s*,\s*/, $opnd_string; + + return ($mnm, @opnds); +} + +sub get_rootdir +{ + my $dir = "."; + while (abs_path($dir) ne "/") { + if (-e "$dir/AUTHORS") { + return abs_path($dir); + } + $dir = "$dir/.."; + } + fatal("Coud not determine root directory. \"AUTHORS\" file not found\n"); +} + +sub header +{ + my ($txt) = @_; + + print "============================================================\n"; + print "$txt\n"; + print "============================================================\n"; +} + +sub error +{ + print STDERR "*** $_[0]\n"; +} + +sub fatal +{ + error($_[0]); + exit 1; +} diff --git a/none/tests/s390x/bfp-emit.post.exp b/none/tests/s390x/bfp-emit.post.exp new file mode 100644 index 0000000000..b0a9ab36f0 --- /dev/null +++ b/none/tests/s390x/bfp-emit.post.exp @@ -0,0 +1,1050 @@ +============================================================ +LOAD COMPLEMENT +============================================================ +Testing: lcdfr %f0,%f1 +Frontend: lcdfr %f0,%f1 +Assembly: lcdbr %f6,%f7 +============================================================ +LOAD FPR FROM GR +============================================================ +Testing: ldgr %f0,%r1 +Frontend: ldgr %f0,%r1 +Assembly: ldgr %f7,%r5 +============================================================ +LOAD GR FROM FPR +============================================================ +Testing: lgdr %r0,%f1 +Frontend: lgdr %r0,%f1 +Assembly: lgdr %r5,%f7 +============================================================ +LOAD NEGATIVE +============================================================ +Testing: lndfr %f0,%f1 +Frontend: lndfr %f0,%f1 +Assembly: lndbr %f6,%f7 +============================================================ +LOAD POSITIVE +============================================================ +Testing: lpdfr %f0,%f1 +Frontend: lpdfr %f0,%f1 +Assembly: lpdbr %f6,%f7 +============================================================ +LOAD ZERO +============================================================ +Testing: lzer %f0 +Frontend: lzer %f0 +Assembly: lzer %f7 +Testing: lzdr %f0 +Frontend: lzdr %f0 +Assembly: lzdr %f7 +============================================================ +ADD +============================================================ +Testing: aebr %f0,%f1 +Frontend: aebr %f0,%f1 +Assembly: aebr %f7,%f6 +Testing: adbr %f0,%f1 +Frontend: adbr %f0,%f1 +Assembly: adbr %f7,%f6 +Testing: axbr %f0,%f1 +Frontend: axbr %f0,%f1 +Assembly: axbr %f12,%f13 +============================================================ +COMPARE +============================================================ +Testing: cebr %f0,%f1 +Frontend: cebr %f0,%f1 +Assembly: cebr %f7,%f6 +Testing: cdbr %f0,%f1 +Frontend: cdbr %f0,%f1 +Assembly: cdbr %f7,%f6 +Testing: cxbr %f0,%f1 +Frontend: cxbr %f0,%f1 +Assembly: cxbr %f12,%f13 +============================================================ +COMPARE AND SIGNAL +============================================================ +Testing: kebr %f0,%f1 +Frontend: kebr %f0,%f1 +Assembly: cebr %f7,%f6 +Testing: kdbr %f0,%f1 +Frontend: kdbr %f0,%f1 +Assembly: cdbr %f7,%f6 +Testing: kxbr %f0,%f1 +Frontend: kxbr %f0,%f1 +Assembly: cxbr %f12,%f13 +============================================================ +CONVERT FROM FIXED +============================================================ +Testing: cefbr %f0,%r1 +Frontend: cefbr %f0,%r1 +Assembly: cefbr %f7,%r4 +Testing: cdfbr %f0,%r1 +Frontend: cdfbr %f0,%r1 +Assembly: cdfbr %f7,%r5 +Testing: cxfbr %f0,%r1 +Frontend: cxfbr %f0,%r1 +Assembly: cxfbr %f12,%r5 +Testing: cegbr %f0,%r1 +Frontend: cegbr %f0,%r1 +Assembly: cegbr %f7,%r4 +Testing: cdgbr %f0,%r1 +Frontend: cdgbr %f0,%r1 +Assembly: cdgbr %f7,%r4 +Testing: cxgbr %f0,%r1 +Frontend: cxgbr %f0,%r1 +Assembly: cxgbr %f12,%r5 +Testing: cefbra %f0,0,%r1,0 +Frontend: cefbr %f0,%r1 +Assembly: cefbr %f7,%r4 +Testing: cdfbra %f0,0,%r1,0 +Frontend: cdfbr %f0,%r1 +Assembly: cdfbr %f7,%r5 +Testing: cxfbra %f0,0,%r1,0 +Frontend: cxfbr %f0,%r1 +Assembly: cxfbr %f12,%r5 +Testing: cegbra %f0,0,%r1,0 +Frontend: cegbr %f0,%r1 +Assembly: cegbr %f7,%r4 +Testing: cdgbra %f0,0,%r1,0 +Frontend: cdgbr %f0,%r1 +Assembly: cdgbr %f7,%r4 +Testing: cxgbra %f0,0,%r1,0 +Frontend: cxgbr %f0,%r1 +Assembly: cxgbr %f12,%r5 +Testing: cefbra %f0,1,%r1,0 +Frontend: cefbra %f0,1,%r1,0 +Assembly: cefbra %f7,1,%r5,0 +Testing: cdfbra %f0,1,%r1,0 +Frontend: cdfbra %f0,1,%r1,0 +Assembly: cdfbr %f7,%r5 +Testing: cxfbra %f0,1,%r1,0 +Frontend: cxfbra %f0,1,%r1,0 +Assembly: cxfbr %f12,%r5 +Testing: cegbra %f0,1,%r1,0 +Frontend: cegbra %f0,1,%r1,0 +Assembly: cegbra %f7,1,%r5,0 +Testing: cdgbra %f0,1,%r1,0 +Frontend: cdgbra %f0,1,%r1,0 +Assembly: cdgbra %f7,1,%r5,0 +Testing: cxgbra %f0,1,%r1,0 +Frontend: cxgbra %f0,1,%r1,0 +Assembly: cxgbr %f12,%r5 +Testing: cefbra %f0,3,%r1,0 +Frontend: cefbra %f0,3,%r1,0 +Assembly: cefbra %f7,3,%r5,0 +Testing: cdfbra %f0,3,%r1,0 +Frontend: cdfbra %f0,3,%r1,0 +Assembly: cdfbr %f7,%r5 +Testing: cxfbra %f0,3,%r1,0 +Frontend: cxfbra %f0,3,%r1,0 +Assembly: cxfbr %f12,%r5 +Testing: cegbra %f0,3,%r1,0 +Frontend: cegbra %f0,3,%r1,0 +Assembly: cegbra %f7,3,%r5,0 +Testing: cdgbra %f0,3,%r1,0 +Frontend: cdgbra %f0,3,%r1,0 +Assembly: cdgbra %f7,3,%r5,0 +Testing: cxgbra %f0,3,%r1,0 +Frontend: cxgbra %f0,3,%r1,0 +Assembly: cxgbr %f12,%r5 +Testing: cefbra %f0,4,%r1,0 +Frontend: cefbra %f0,4,%r1,0 +Assembly: cefbra %f7,4,%r5,0 +Testing: cdfbra %f0,4,%r1,0 +Frontend: cdfbra %f0,4,%r1,0 +Assembly: cdfbr %f7,%r5 +Testing: cxfbra %f0,4,%r1,0 +Frontend: cxfbra %f0,4,%r1,0 +Assembly: cxfbr %f12,%r5 +Testing: cegbra %f0,4,%r1,0 +Frontend: cegbra %f0,4,%r1,0 +Assembly: cegbra %f7,4,%r5,0 +Testing: cdgbra %f0,4,%r1,0 +Frontend: cdgbra %f0,4,%r1,0 +Assembly: cdgbra %f7,4,%r5,0 +Testing: cxgbra %f0,4,%r1,0 +Frontend: cxgbra %f0,4,%r1,0 +Assembly: cxgbr %f12,%r5 +Testing: cefbra %f0,5,%r1,0 +Frontend: cefbra %f0,5,%r1,0 +Assembly: cefbra %f7,5,%r5,0 +Testing: cdfbra %f0,5,%r1,0 +Frontend: cdfbra %f0,5,%r1,0 +Assembly: cdfbr %f7,%r5 +Testing: cxfbra %f0,5,%r1,0 +Frontend: cxfbra %f0,5,%r1,0 +Assembly: cxfbr %f12,%r5 +Testing: cegbra %f0,5,%r1,0 +Frontend: cegbra %f0,5,%r1,0 +Assembly: cegbra %f7,5,%r5,0 +Testing: cdgbra %f0,5,%r1,0 +Frontend: cdgbra %f0,5,%r1,0 +Assembly: cdgbra %f7,5,%r5,0 +Testing: cxgbra %f0,5,%r1,0 +Frontend: cxgbra %f0,5,%r1,0 +Assembly: cxgbr %f12,%r5 +Testing: cefbra %f0,6,%r1,0 +Frontend: cefbra %f0,6,%r1,0 +Assembly: cefbra %f7,6,%r5,0 +Testing: cdfbra %f0,6,%r1,0 +Frontend: cdfbra %f0,6,%r1,0 +Assembly: cdfbr %f7,%r5 +Testing: cxfbra %f0,6,%r1,0 +Frontend: cxfbra %f0,6,%r1,0 +Assembly: cxfbr %f12,%r5 +Testing: cegbra %f0,6,%r1,0 +Frontend: cegbra %f0,6,%r1,0 +Assembly: cegbra %f7,6,%r5,0 +Testing: cdgbra %f0,6,%r1,0 +Frontend: cdgbra %f0,6,%r1,0 +Assembly: cdgbra %f7,6,%r5,0 +Testing: cxgbra %f0,6,%r1,0 +Frontend: cxgbra %f0,6,%r1,0 +Assembly: cxgbr %f12,%r5 +Testing: cefbra %f0,7,%r1,0 +Frontend: cefbra %f0,7,%r1,0 +Assembly: cefbra %f7,7,%r5,0 +Testing: cdfbra %f0,7,%r1,0 +Frontend: cdfbra %f0,7,%r1,0 +Assembly: cdfbr %f7,%r5 +Testing: cxfbra %f0,7,%r1,0 +Frontend: cxfbra %f0,7,%r1,0 +Assembly: cxfbr %f12,%r5 +Testing: cegbra %f0,7,%r1,0 +Frontend: cegbra %f0,7,%r1,0 +Assembly: cegbra %f7,7,%r5,0 +Testing: cdgbra %f0,7,%r1,0 +Frontend: cdgbra %f0,7,%r1,0 +Assembly: cdgbra %f7,7,%r5,0 +Testing: cxgbra %f0,7,%r1,0 +Frontend: cxgbra %f0,7,%r1,0 +Assembly: cxgbr %f12,%r5 +============================================================ +CONVERT FROM LOGICAL +============================================================ +Testing: celfbr %f0,0,%r1,0 +Frontend: celfbr %f0,0,%r1,0 +Assembly: celfbr %f7,0,%r4,0 +Testing: cdlfbr %f0,0,%r1,0 +Frontend: cdlfbr %f0,0,%r1,0 +Assembly: cdlfbr %f7,4,%r5,0 +Testing: cxlfbr %f0,0,%r1,0 +Frontend: cxlfbr %f0,0,%r1,0 +Assembly: cxlfbr %f12,4,%r5,0 +Testing: celgbr %f0,0,%r1,0 +Frontend: celgbr %f0,0,%r1,0 +Assembly: celgbr %f7,0,%r4,0 +Testing: cdlgbr %f0,0,%r1,0 +Frontend: cdlgbr %f0,0,%r1,0 +Assembly: cdlgbr %f7,0,%r4,0 +Testing: cxlgbr %f0,0,%r1,0 +Frontend: cxlgbr %f0,0,%r1,0 +Assembly: cxlgbr %f12,4,%r5,0 +Testing: celfbr %f0,1,%r1,0 +Frontend: celfbr %f0,1,%r1,0 +Assembly: celfbr %f7,1,%r5,0 +Testing: cdlfbr %f0,1,%r1,0 +Frontend: cdlfbr %f0,1,%r1,0 +Assembly: cdlfbr %f7,4,%r5,0 +Testing: cxlfbr %f0,1,%r1,0 +Frontend: cxlfbr %f0,1,%r1,0 +Assembly: cxlfbr %f12,4,%r5,0 +Testing: celgbr %f0,1,%r1,0 +Frontend: celgbr %f0,1,%r1,0 +Assembly: celgbr %f7,1,%r5,0 +Testing: cdlgbr %f0,1,%r1,0 +Frontend: cdlgbr %f0,1,%r1,0 +Assembly: cdlgbr %f7,1,%r5,0 +Testing: cxlgbr %f0,1,%r1,0 +Frontend: cxlgbr %f0,1,%r1,0 +Assembly: cxlgbr %f12,4,%r5,0 +Testing: celfbr %f0,3,%r1,0 +Frontend: celfbr %f0,3,%r1,0 +Assembly: celfbr %f7,3,%r5,0 +Testing: cdlfbr %f0,3,%r1,0 +Frontend: cdlfbr %f0,3,%r1,0 +Assembly: cdlfbr %f7,4,%r5,0 +Testing: cxlfbr %f0,3,%r1,0 +Frontend: cxlfbr %f0,3,%r1,0 +Assembly: cxlfbr %f12,4,%r5,0 +Testing: celgbr %f0,3,%r1,0 +Frontend: celgbr %f0,3,%r1,0 +Assembly: celgbr %f7,3,%r5,0 +Testing: cdlgbr %f0,3,%r1,0 +Frontend: cdlgbr %f0,3,%r1,0 +Assembly: cdlgbr %f7,3,%r5,0 +Testing: cxlgbr %f0,3,%r1,0 +Frontend: cxlgbr %f0,3,%r1,0 +Assembly: cxlgbr %f12,4,%r5,0 +Testing: celfbr %f0,4,%r1,0 +Frontend: celfbr %f0,4,%r1,0 +Assembly: celfbr %f7,4,%r5,0 +Testing: cdlfbr %f0,4,%r1,0 +Frontend: cdlfbr %f0,4,%r1,0 +Assembly: cdlfbr %f7,4,%r5,0 +Testing: cxlfbr %f0,4,%r1,0 +Frontend: cxlfbr %f0,4,%r1,0 +Assembly: cxlfbr %f12,4,%r5,0 +Testing: celgbr %f0,4,%r1,0 +Frontend: celgbr %f0,4,%r1,0 +Assembly: celgbr %f7,4,%r5,0 +Testing: cdlgbr %f0,4,%r1,0 +Frontend: cdlgbr %f0,4,%r1,0 +Assembly: cdlgbr %f7,4,%r5,0 +Testing: cxlgbr %f0,4,%r1,0 +Frontend: cxlgbr %f0,4,%r1,0 +Assembly: cxlgbr %f12,4,%r5,0 +Testing: celfbr %f0,5,%r1,0 +Frontend: celfbr %f0,5,%r1,0 +Assembly: celfbr %f7,5,%r5,0 +Testing: cdlfbr %f0,5,%r1,0 +Frontend: cdlfbr %f0,5,%r1,0 +Assembly: cdlfbr %f7,4,%r5,0 +Testing: cxlfbr %f0,5,%r1,0 +Frontend: cxlfbr %f0,5,%r1,0 +Assembly: cxlfbr %f12,4,%r5,0 +Testing: celgbr %f0,5,%r1,0 +Frontend: celgbr %f0,5,%r1,0 +Assembly: celgbr %f7,5,%r5,0 +Testing: cdlgbr %f0,5,%r1,0 +Frontend: cdlgbr %f0,5,%r1,0 +Assembly: cdlgbr %f7,5,%r5,0 +Testing: cxlgbr %f0,5,%r1,0 +Frontend: cxlgbr %f0,5,%r1,0 +Assembly: cxlgbr %f12,4,%r5,0 +Testing: celfbr %f0,6,%r1,0 +Frontend: celfbr %f0,6,%r1,0 +Assembly: celfbr %f7,6,%r5,0 +Testing: cdlfbr %f0,6,%r1,0 +Frontend: cdlfbr %f0,6,%r1,0 +Assembly: cdlfbr %f7,4,%r5,0 +Testing: cxlfbr %f0,6,%r1,0 +Frontend: cxlfbr %f0,6,%r1,0 +Assembly: cxlfbr %f12,4,%r5,0 +Testing: celgbr %f0,6,%r1,0 +Frontend: celgbr %f0,6,%r1,0 +Assembly: celgbr %f7,6,%r5,0 +Testing: cdlgbr %f0,6,%r1,0 +Frontend: cdlgbr %f0,6,%r1,0 +Assembly: cdlgbr %f7,6,%r5,0 +Testing: cxlgbr %f0,6,%r1,0 +Frontend: cxlgbr %f0,6,%r1,0 +Assembly: cxlgbr %f12,4,%r5,0 +Testing: celfbr %f0,7,%r1,0 +Frontend: celfbr %f0,7,%r1,0 +Assembly: celfbr %f7,7,%r5,0 +Testing: cdlfbr %f0,7,%r1,0 +Frontend: cdlfbr %f0,7,%r1,0 +Assembly: cdlfbr %f7,4,%r5,0 +Testing: cxlfbr %f0,7,%r1,0 +Frontend: cxlfbr %f0,7,%r1,0 +Assembly: cxlfbr %f12,4,%r5,0 +Testing: celgbr %f0,7,%r1,0 +Frontend: celgbr %f0,7,%r1,0 +Assembly: celgbr %f7,7,%r5,0 +Testing: cdlgbr %f0,7,%r1,0 +Frontend: cdlgbr %f0,7,%r1,0 +Assembly: cdlgbr %f7,7,%r5,0 +Testing: cxlgbr %f0,7,%r1,0 +Frontend: cxlgbr %f0,7,%r1,0 +Assembly: cxlgbr %f12,4,%r5,0 +============================================================ +CONVERT TO FIXED +============================================================ +Testing: cfebr %r0,0,%f1 +Frontend: cfebr %r0,0,%f1 +Assembly: cfebr %r5,0,%f7 +Testing: cfdbr %r0,0,%f1 +Frontend: cfdbr %r0,0,%f1 +Assembly: cfdbr %r5,0,%f7 +Testing: cfxbr %r0,0,%f1 +Frontend: cfxbr %r0,0,%f1 +Assembly: cfxbr %r5,0,%f13 +Testing: cgebr %r0,0,%f1 +Frontend: cgebr %r0,0,%f1 +Assembly: cgebr %r5,0,%f7 +Testing: cgdbr %r0,0,%f1 +Frontend: cgdbr %r0,0,%f1 +Assembly: cgdbr %r5,0,%f7 +Testing: cgxbr %r0,0,%f1 +Frontend: cgxbr %r0,0,%f1 +Assembly: cgxbr %r5,0,%f13 +Testing: cfebr %r0,1,%f1 +Frontend: cfebr %r0,1,%f1 +Assembly: cfebr %r5,1,%f7 +Testing: cfdbr %r0,1,%f1 +Frontend: cfdbr %r0,1,%f1 +Assembly: cfdbr %r5,1,%f7 +Testing: cfxbr %r0,1,%f1 +Frontend: cfxbr %r0,1,%f1 +Assembly: cfxbr %r5,1,%f13 +Testing: cgebr %r0,1,%f1 +Frontend: cgebr %r0,1,%f1 +Assembly: cgebr %r5,1,%f7 +Testing: cgdbr %r0,1,%f1 +Frontend: cgdbr %r0,1,%f1 +Assembly: cgdbr %r5,1,%f7 +Testing: cgxbr %r0,1,%f1 +Frontend: cgxbr %r0,1,%f1 +Assembly: cgxbr %r5,1,%f13 +Testing: cfebr %r0,3,%f1 +Frontend: cfebr %r0,3,%f1 +Assembly: cfebr %r5,3,%f7 +Testing: cfdbr %r0,3,%f1 +Frontend: cfdbr %r0,3,%f1 +Assembly: cfdbr %r5,3,%f7 +Testing: cfxbr %r0,3,%f1 +Frontend: cfxbr %r0,3,%f1 +Assembly: cfxbr %r5,3,%f13 +Testing: cgebr %r0,3,%f1 +Frontend: cgebr %r0,3,%f1 +Assembly: cgebr %r5,3,%f7 +Testing: cgdbr %r0,3,%f1 +Frontend: cgdbr %r0,3,%f1 +Assembly: cgdbr %r5,3,%f7 +Testing: cgxbr %r0,3,%f1 +Frontend: cgxbr %r0,3,%f1 +Assembly: cgxbr %r5,3,%f13 +Testing: cfebr %r0,4,%f1 +Frontend: cfebr %r0,4,%f1 +Assembly: cfebr %r5,4,%f7 +Testing: cfdbr %r0,4,%f1 +Frontend: cfdbr %r0,4,%f1 +Assembly: cfdbr %r5,4,%f7 +Testing: cfxbr %r0,4,%f1 +Frontend: cfxbr %r0,4,%f1 +Assembly: cfxbr %r5,4,%f13 +Testing: cgebr %r0,4,%f1 +Frontend: cgebr %r0,4,%f1 +Assembly: cgebr %r5,4,%f7 +Testing: cgdbr %r0,4,%f1 +Frontend: cgdbr %r0,4,%f1 +Assembly: cgdbr %r5,4,%f7 +Testing: cgxbr %r0,4,%f1 +Frontend: cgxbr %r0,4,%f1 +Assembly: cgxbr %r5,4,%f13 +Testing: cfebr %r0,5,%f1 +Frontend: cfebr %r0,5,%f1 +Assembly: cfebr %r5,5,%f7 +Testing: cfdbr %r0,5,%f1 +Frontend: cfdbr %r0,5,%f1 +Assembly: cfdbr %r5,5,%f7 +Testing: cfxbr %r0,5,%f1 +Frontend: cfxbr %r0,5,%f1 +Assembly: cfxbr %r5,5,%f13 +Testing: cgebr %r0,5,%f1 +Frontend: cgebr %r0,5,%f1 +Assembly: cgebr %r5,5,%f7 +Testing: cgdbr %r0,5,%f1 +Frontend: cgdbr %r0,5,%f1 +Assembly: cgdbr %r5,5,%f7 +Testing: cgxbr %r0,5,%f1 +Frontend: cgxbr %r0,5,%f1 +Assembly: cgxbr %r5,5,%f13 +Testing: cfebr %r0,6,%f1 +Frontend: cfebr %r0,6,%f1 +Assembly: cfebr %r5,6,%f7 +Testing: cfdbr %r0,6,%f1 +Frontend: cfdbr %r0,6,%f1 +Assembly: cfdbr %r5,6,%f7 +Testing: cfxbr %r0,6,%f1 +Frontend: cfxbr %r0,6,%f1 +Assembly: cfxbr %r5,6,%f13 +Testing: cgebr %r0,6,%f1 +Frontend: cgebr %r0,6,%f1 +Assembly: cgebr %r5,6,%f7 +Testing: cgdbr %r0,6,%f1 +Frontend: cgdbr %r0,6,%f1 +Assembly: cgdbr %r5,6,%f7 +Testing: cgxbr %r0,6,%f1 +Frontend: cgxbr %r0,6,%f1 +Assembly: cgxbr %r5,6,%f13 +Testing: cfebr %r0,7,%f1 +Frontend: cfebr %r0,7,%f1 +Assembly: cfebr %r5,7,%f7 +Testing: cfdbr %r0,7,%f1 +Frontend: cfdbr %r0,7,%f1 +Assembly: cfdbr %r5,7,%f7 +Testing: cfxbr %r0,7,%f1 +Frontend: cfxbr %r0,7,%f1 +Assembly: cfxbr %r5,7,%f13 +Testing: cgebr %r0,7,%f1 +Frontend: cgebr %r0,7,%f1 +Assembly: cgebr %r5,7,%f7 +Testing: cgdbr %r0,7,%f1 +Frontend: cgdbr %r0,7,%f1 +Assembly: cgdbr %r5,7,%f7 +Testing: cgxbr %r0,7,%f1 +Frontend: cgxbr %r0,7,%f1 +Assembly: cgxbr %r5,7,%f13 +Testing: cfebra %r0,0,%f1,0 +Frontend: cfebr %r0,0,%f1 +Assembly: cfebr %r5,0,%f7 +Testing: cfdbra %r0,0,%f1,0 +Frontend: cfdbr %r0,0,%f1 +Assembly: cfdbr %r5,0,%f7 +Testing: cfxbra %r0,0,%f1,0 +Frontend: cfxbr %r0,0,%f1 +Assembly: cfxbr %r5,0,%f13 +Testing: cgebra %r0,0,%f1,0 +Frontend: cgebr %r0,0,%f1 +Assembly: cgebr %r5,0,%f7 +Testing: cgdbra %r0,0,%f1,0 +Frontend: cgdbr %r0,0,%f1 +Assembly: cgdbr %r5,0,%f7 +Testing: cgxbra %r0,0,%f1,0 +Frontend: cgxbr %r0,0,%f1 +Assembly: cgxbr %r5,0,%f13 +Testing: cfebra %r0,1,%f1,0 +Frontend: cfebr %r0,1,%f1 +Assembly: cfebr %r5,1,%f7 +Testing: cfdbra %r0,1,%f1,0 +Frontend: cfdbr %r0,1,%f1 +Assembly: cfdbr %r5,1,%f7 +Testing: cfxbra %r0,1,%f1,0 +Frontend: cfxbr %r0,1,%f1 +Assembly: cfxbr %r5,1,%f13 +Testing: cgebra %r0,1,%f1,0 +Frontend: cgebr %r0,1,%f1 +Assembly: cgebr %r5,1,%f7 +Testing: cgdbra %r0,1,%f1,0 +Frontend: cgdbr %r0,1,%f1 +Assembly: cgdbr %r5,1,%f7 +Testing: cgxbra %r0,1,%f1,0 +Frontend: cgxbr %r0,1,%f1 +Assembly: cgxbr %r5,1,%f13 +Testing: cfebra %r0,3,%f1,0 +Frontend: cfebr %r0,3,%f1 +Assembly: cfebr %r5,3,%f7 +Testing: cfdbra %r0,3,%f1,0 +Frontend: cfdbr %r0,3,%f1 +Assembly: cfdbr %r5,3,%f7 +Testing: cfxbra %r0,3,%f1,0 +Frontend: cfxbr %r0,3,%f1 +Assembly: cfxbr %r5,3,%f13 +Testing: cgebra %r0,3,%f1,0 +Frontend: cgebr %r0,3,%f1 +Assembly: cgebr %r5,3,%f7 +Testing: cgdbra %r0,3,%f1,0 +Frontend: cgdbr %r0,3,%f1 +Assembly: cgdbr %r5,3,%f7 +Testing: cgxbra %r0,3,%f1,0 +Frontend: cgxbr %r0,3,%f1 +Assembly: cgxbr %r5,3,%f13 +Testing: cfebra %r0,4,%f1,0 +Frontend: cfebr %r0,4,%f1 +Assembly: cfebr %r5,4,%f7 +Testing: cfdbra %r0,4,%f1,0 +Frontend: cfdbr %r0,4,%f1 +Assembly: cfdbr %r5,4,%f7 +Testing: cfxbra %r0,4,%f1,0 +Frontend: cfxbr %r0,4,%f1 +Assembly: cfxbr %r5,4,%f13 +Testing: cgebra %r0,4,%f1,0 +Frontend: cgebr %r0,4,%f1 +Assembly: cgebr %r5,4,%f7 +Testing: cgdbra %r0,4,%f1,0 +Frontend: cgdbr %r0,4,%f1 +Assembly: cgdbr %r5,4,%f7 +Testing: cgxbra %r0,4,%f1,0 +Frontend: cgxbr %r0,4,%f1 +Assembly: cgxbr %r5,4,%f13 +Testing: cfebra %r0,5,%f1,0 +Frontend: cfebr %r0,5,%f1 +Assembly: cfebr %r5,5,%f7 +Testing: cfdbra %r0,5,%f1,0 +Frontend: cfdbr %r0,5,%f1 +Assembly: cfdbr %r5,5,%f7 +Testing: cfxbra %r0,5,%f1,0 +Frontend: cfxbr %r0,5,%f1 +Assembly: cfxbr %r5,5,%f13 +Testing: cgebra %r0,5,%f1,0 +Frontend: cgebr %r0,5,%f1 +Assembly: cgebr %r5,5,%f7 +Testing: cgdbra %r0,5,%f1,0 +Frontend: cgdbr %r0,5,%f1 +Assembly: cgdbr %r5,5,%f7 +Testing: cgxbra %r0,5,%f1,0 +Frontend: cgxbr %r0,5,%f1 +Assembly: cgxbr %r5,5,%f13 +Testing: cfebra %r0,6,%f1,0 +Frontend: cfebr %r0,6,%f1 +Assembly: cfebr %r5,6,%f7 +Testing: cfdbra %r0,6,%f1,0 +Frontend: cfdbr %r0,6,%f1 +Assembly: cfdbr %r5,6,%f7 +Testing: cfxbra %r0,6,%f1,0 +Frontend: cfxbr %r0,6,%f1 +Assembly: cfxbr %r5,6,%f13 +Testing: cgebra %r0,6,%f1,0 +Frontend: cgebr %r0,6,%f1 +Assembly: cgebr %r5,6,%f7 +Testing: cgdbra %r0,6,%f1,0 +Frontend: cgdbr %r0,6,%f1 +Assembly: cgdbr %r5,6,%f7 +Testing: cgxbra %r0,6,%f1,0 +Frontend: cgxbr %r0,6,%f1 +Assembly: cgxbr %r5,6,%f13 +Testing: cfebra %r0,7,%f1,0 +Frontend: cfebr %r0,7,%f1 +Assembly: cfebr %r5,7,%f7 +Testing: cfdbra %r0,7,%f1,0 +Frontend: cfdbr %r0,7,%f1 +Assembly: cfdbr %r5,7,%f7 +Testing: cfxbra %r0,7,%f1,0 +Frontend: cfxbr %r0,7,%f1 +Assembly: cfxbr %r5,7,%f13 +Testing: cgebra %r0,7,%f1,0 +Frontend: cgebr %r0,7,%f1 +Assembly: cgebr %r5,7,%f7 +Testing: cgdbra %r0,7,%f1,0 +Frontend: cgdbr %r0,7,%f1 +Assembly: cgdbr %r5,7,%f7 +Testing: cgxbra %r0,7,%f1,0 +Frontend: cgxbr %r0,7,%f1 +Assembly: cgxbr %r5,7,%f13 +============================================================ +CONVERT TO LOGICAL +============================================================ +Testing: clfebr %r0,0,%f1,0 +Frontend: clfebr %r0,0,%f1,0 +Assembly: clfebr %r5,0,%f7,0 +Testing: clfdbr %r0,0,%f1,0 +Frontend: clfdbr %r0,0,%f1,0 +Assembly: clfdbr %r5,0,%f7,0 +Testing: clfxbr %r0,0,%f1,0 +Frontend: clfxbr %r0,0,%f1,0 +Assembly: clfxbr %r5,0,%f13,0 +Testing: clgebr %r0,0,%f1,0 +Frontend: clgebr %r0,0,%f1,0 +Assembly: clgebr %r5,0,%f7,0 +Testing: clgdbr %r0,0,%f1,0 +Frontend: clgdbr %r0,0,%f1,0 +Assembly: clgdbr %r5,0,%f7,0 +Testing: clgxbr %r0,0,%f1,0 +Frontend: clgxbr %r0,0,%f1,0 +Assembly: clgxbr %r5,0,%f13,0 +Testing: clfebr %r0,1,%f1,0 +Frontend: clfebr %r0,1,%f1,0 +Assembly: clfebr %r5,1,%f7,0 +Testing: clfdbr %r0,1,%f1,0 +Frontend: clfdbr %r0,1,%f1,0 +Assembly: clfdbr %r5,1,%f7,0 +Testing: clfxbr %r0,1,%f1,0 +Frontend: clfxbr %r0,1,%f1,0 +Assembly: clfxbr %r5,1,%f13,0 +Testing: clgebr %r0,1,%f1,0 +Frontend: clgebr %r0,1,%f1,0 +Assembly: clgebr %r5,1,%f7,0 +Testing: clgdbr %r0,1,%f1,0 +Frontend: clgdbr %r0,1,%f1,0 +Assembly: clgdbr %r5,1,%f7,0 +Testing: clgxbr %r0,1,%f1,0 +Frontend: clgxbr %r0,1,%f1,0 +Assembly: clgxbr %r5,1,%f13,0 +Testing: clfebr %r0,3,%f1,0 +Frontend: clfebr %r0,3,%f1,0 +Assembly: clfebr %r5,3,%f7,0 +Testing: clfdbr %r0,3,%f1,0 +Frontend: clfdbr %r0,3,%f1,0 +Assembly: clfdbr %r5,3,%f7,0 +Testing: clfxbr %r0,3,%f1,0 +Frontend: clfxbr %r0,3,%f1,0 +Assembly: clfxbr %r5,3,%f13,0 +Testing: clgebr %r0,3,%f1,0 +Frontend: clgebr %r0,3,%f1,0 +Assembly: clgebr %r5,3,%f7,0 +Testing: clgdbr %r0,3,%f1,0 +Frontend: clgdbr %r0,3,%f1,0 +Assembly: clgdbr %r5,3,%f7,0 +Testing: clgxbr %r0,3,%f1,0 +Frontend: clgxbr %r0,3,%f1,0 +Assembly: clgxbr %r5,3,%f13,0 +Testing: clfebr %r0,4,%f1,0 +Frontend: clfebr %r0,4,%f1,0 +Assembly: clfebr %r5,4,%f7,0 +Testing: clfdbr %r0,4,%f1,0 +Frontend: clfdbr %r0,4,%f1,0 +Assembly: clfdbr %r5,4,%f7,0 +Testing: clfxbr %r0,4,%f1,0 +Frontend: clfxbr %r0,4,%f1,0 +Assembly: clfxbr %r5,4,%f13,0 +Testing: clgebr %r0,4,%f1,0 +Frontend: clgebr %r0,4,%f1,0 +Assembly: clgebr %r5,4,%f7,0 +Testing: clgdbr %r0,4,%f1,0 +Frontend: clgdbr %r0,4,%f1,0 +Assembly: clgdbr %r5,4,%f7,0 +Testing: clgxbr %r0,4,%f1,0 +Frontend: clgxbr %r0,4,%f1,0 +Assembly: clgxbr %r5,4,%f13,0 +Testing: clfebr %r0,5,%f1,0 +Frontend: clfebr %r0,5,%f1,0 +Assembly: clfebr %r5,5,%f7,0 +Testing: clfdbr %r0,5,%f1,0 +Frontend: clfdbr %r0,5,%f1,0 +Assembly: clfdbr %r5,5,%f7,0 +Testing: clfxbr %r0,5,%f1,0 +Frontend: clfxbr %r0,5,%f1,0 +Assembly: clfxbr %r5,5,%f13,0 +Testing: clgebr %r0,5,%f1,0 +Frontend: clgebr %r0,5,%f1,0 +Assembly: clgebr %r5,5,%f7,0 +Testing: clgdbr %r0,5,%f1,0 +Frontend: clgdbr %r0,5,%f1,0 +Assembly: clgdbr %r5,5,%f7,0 +Testing: clgxbr %r0,5,%f1,0 +Frontend: clgxbr %r0,5,%f1,0 +Assembly: clgxbr %r5,5,%f13,0 +Testing: clfebr %r0,6,%f1,0 +Frontend: clfebr %r0,6,%f1,0 +Assembly: clfebr %r5,6,%f7,0 +Testing: clfdbr %r0,6,%f1,0 +Frontend: clfdbr %r0,6,%f1,0 +Assembly: clfdbr %r5,6,%f7,0 +Testing: clfxbr %r0,6,%f1,0 +Frontend: clfxbr %r0,6,%f1,0 +Assembly: clfxbr %r5,6,%f13,0 +Testing: clgebr %r0,6,%f1,0 +Frontend: clgebr %r0,6,%f1,0 +Assembly: clgebr %r5,6,%f7,0 +Testing: clgdbr %r0,6,%f1,0 +Frontend: clgdbr %r0,6,%f1,0 +Assembly: clgdbr %r5,6,%f7,0 +Testing: clgxbr %r0,6,%f1,0 +Frontend: clgxbr %r0,6,%f1,0 +Assembly: clgxbr %r5,6,%f13,0 +Testing: clfebr %r0,7,%f1,0 +Frontend: clfebr %r0,7,%f1,0 +Assembly: clfebr %r5,7,%f7,0 +Testing: clfdbr %r0,7,%f1,0 +Frontend: clfdbr %r0,7,%f1,0 +Assembly: clfdbr %r5,7,%f7,0 +Testing: clfxbr %r0,7,%f1,0 +Frontend: clfxbr %r0,7,%f1,0 +Assembly: clfxbr %r5,7,%f13,0 +Testing: clgebr %r0,7,%f1,0 +Frontend: clgebr %r0,7,%f1,0 +Assembly: clgebr %r5,7,%f7,0 +Testing: clgdbr %r0,7,%f1,0 +Frontend: clgdbr %r0,7,%f1,0 +Assembly: clgdbr %r5,7,%f7,0 +Testing: clgxbr %r0,7,%f1,0 +Frontend: clgxbr %r0,7,%f1,0 +Assembly: clgxbr %r5,7,%f13,0 +============================================================ +DIVIDE +============================================================ +Testing: debr %f0,%f1 +Frontend: debr %f0,%f1 +Assembly: debr %f7,%f6 +Testing: ddbr %f0,%f1 +Frontend: ddbr %f0,%f1 +Assembly: ddbr %f7,%f6 +Testing: dxbr %f0,%f1 +Frontend: dxbr %f0,%f1 +Assembly: dxbr %f12,%f13 +============================================================ +LOAD COMPLEMENT +============================================================ +Testing: lcebr %f0,%f1 +Frontend: lcebr %f0,%f1 +Assembly: lcebr %f6,%f7 +Testing: lcdbr %f0,%f1 +Frontend: lcdbr %f0,%f1 +Assembly: lcdbr %f6,%f7 +Testing: lcxbr %f0,%f1 +Frontend: lcxbr %f0,%f1 +Assembly: lcxbr %f12,%f13 +============================================================ +LOAD FP INTEGER +============================================================ +Testing: fiebr %f0,0,%f1 +Frontend: fiebr %f0,0,%f1 +Assembly: fiebr %f6,0,%f7 +Testing: fidbr %f0,0,%f1 +Frontend: fidbr %f0,0,%f1 +Assembly: fidbr %f6,0,%f7 +Testing: fixbr %f0,0,%f1 +Frontend: fixbr %f0,0,%f1 +Assembly: fixbr %f0,0,%f4 +Testing: fiebr %f0,1,%f1 +Frontend: fiebr %f0,1,%f1 +Assembly: fiebr %f6,1,%f7 +Testing: fidbr %f0,1,%f1 +Frontend: fidbr %f0,1,%f1 +Assembly: fidbr %f6,1,%f7 +Testing: fixbr %f0,1,%f1 +Frontend: fixbr %f0,1,%f1 +Assembly: fixbr %f0,1,%f4 +Testing: fiebr %f0,3,%f1 +Frontend: fiebr %f0,3,%f1 +Assembly: fiebr %f6,3,%f7 +Testing: fidbr %f0,3,%f1 +Frontend: fidbr %f0,3,%f1 +Assembly: fidbr %f6,3,%f7 +Testing: fixbr %f0,3,%f1 +Frontend: fixbr %f0,3,%f1 +Assembly: fixbr %f0,3,%f4 +Testing: fiebr %f0,4,%f1 +Frontend: fiebr %f0,4,%f1 +Assembly: fiebr %f6,4,%f7 +Testing: fidbr %f0,4,%f1 +Frontend: fidbr %f0,4,%f1 +Assembly: fidbr %f6,4,%f7 +Testing: fixbr %f0,4,%f1 +Frontend: fixbr %f0,4,%f1 +Assembly: fixbr %f0,4,%f4 +Testing: fiebr %f0,5,%f1 +Frontend: fiebr %f0,5,%f1 +Assembly: fiebr %f6,5,%f7 +Testing: fidbr %f0,5,%f1 +Frontend: fidbr %f0,5,%f1 +Assembly: fidbr %f6,5,%f7 +Testing: fixbr %f0,5,%f1 +Frontend: fixbr %f0,5,%f1 +Assembly: fixbr %f0,5,%f4 +Testing: fiebr %f0,6,%f1 +Frontend: fiebr %f0,6,%f1 +Assembly: fiebr %f6,6,%f7 +Testing: fidbr %f0,6,%f1 +Frontend: fidbr %f0,6,%f1 +Assembly: fidbr %f6,6,%f7 +Testing: fixbr %f0,6,%f1 +Frontend: fixbr %f0,6,%f1 +Assembly: fixbr %f0,6,%f4 +Testing: fiebr %f0,7,%f1 +Frontend: fiebr %f0,7,%f1 +Assembly: fiebr %f6,7,%f7 +Testing: fidbr %f0,7,%f1 +Frontend: fidbr %f0,7,%f1 +Assembly: fidbr %f6,7,%f7 +Testing: fixbr %f0,7,%f1 +Frontend: fixbr %f0,7,%f1 +Assembly: fixbr %f0,7,%f4 +Testing: fiebra %f0,0,%f1,0 +Frontend: fiebr %f0,0,%f1 +Assembly: fiebr %f6,0,%f7 +Testing: fidbra %f0,0,%f1,0 +Frontend: fidbr %f0,0,%f1 +Assembly: fidbr %f6,0,%f7 +Testing: fixbra %f0,0,%f1,0 +Frontend: fixbr %f0,0,%f1 +Assembly: fixbr %f0,0,%f4 +Testing: fiebra %f0,1,%f1,0 +Frontend: fiebr %f0,1,%f1 +Assembly: fiebr %f6,1,%f7 +Testing: fidbra %f0,1,%f1,0 +Frontend: fidbr %f0,1,%f1 +Assembly: fidbr %f6,1,%f7 +Testing: fixbra %f0,1,%f1,0 +Frontend: fixbr %f0,1,%f1 +Assembly: fixbr %f0,1,%f4 +Testing: fiebra %f0,3,%f1,0 +Frontend: fiebr %f0,3,%f1 +Assembly: fiebr %f6,3,%f7 +Testing: fidbra %f0,3,%f1,0 +Frontend: fidbr %f0,3,%f1 +Assembly: fidbr %f6,3,%f7 +Testing: fixbra %f0,3,%f1,0 +Frontend: fixbr %f0,3,%f1 +Assembly: fixbr %f0,3,%f4 +Testing: fiebra %f0,4,%f1,0 +Frontend: fiebr %f0,4,%f1 +Assembly: fiebr %f6,4,%f7 +Testing: fidbra %f0,4,%f1,0 +Frontend: fidbr %f0,4,%f1 +Assembly: fidbr %f6,4,%f7 +Testing: fixbra %f0,4,%f1,0 +Frontend: fixbr %f0,4,%f1 +Assembly: fixbr %f0,4,%f4 +Testing: fiebra %f0,5,%f1,0 +Frontend: fiebr %f0,5,%f1 +Assembly: fiebr %f6,5,%f7 +Testing: fidbra %f0,5,%f1,0 +Frontend: fidbr %f0,5,%f1 +Assembly: fidbr %f6,5,%f7 +Testing: fixbra %f0,5,%f1,0 +Frontend: fixbr %f0,5,%f1 +Assembly: fixbr %f0,5,%f4 +Testing: fiebra %f0,6,%f1,0 +Frontend: fiebr %f0,6,%f1 +Assembly: fiebr %f6,6,%f7 +Testing: fidbra %f0,6,%f1,0 +Frontend: fidbr %f0,6,%f1 +Assembly: fidbr %f6,6,%f7 +Testing: fixbra %f0,6,%f1,0 +Frontend: fixbr %f0,6,%f1 +Assembly: fixbr %f0,6,%f4 +Testing: fiebra %f0,7,%f1,0 +Frontend: fiebr %f0,7,%f1 +Assembly: fiebr %f6,7,%f7 +Testing: fidbra %f0,7,%f1,0 +Frontend: fidbr %f0,7,%f1 +Assembly: fidbr %f6,7,%f7 +Testing: fixbra %f0,7,%f1,0 +Frontend: fixbr %f0,7,%f1 +Assembly: fixbr %f0,7,%f4 +============================================================ +LOAD LENGTHENED +============================================================ +Testing: ldebr %f0,%f1 +Frontend: ldebr %f0,%f1 +Assembly: ldebr %f6,%f7 +Testing: lxdbr %f0,%f1 +Frontend: lxdbr %f0,%f1 +Assembly: lxdbr %f12,%f7 +Testing: lxebr %f0,%f1 +Frontend: lxebr %f0,%f1 +Assembly: lxebr %f12,%f7 +============================================================ +LOAD NEGATIVE +============================================================ +Testing: lnebr %f0,%f1 +Frontend: lnebr %f0,%f1 +Assembly: lnebr %f6,%f7 +Testing: lndbr %f0,%f1 +Frontend: lndbr %f0,%f1 +Assembly: lndbr %f6,%f7 +============================================================ +LOAD POSITIVE +============================================================ +Testing: lpebr %f0,%f1 +Frontend: lpebr %f0,%f1 +Assembly: lpebr %f6,%f7 +Testing: lpdbr %f0,%f1 +Frontend: lpdbr %f0,%f1 +Assembly: lpdbr %f6,%f7 +Testing: lpxbr %f0,%f1 +Frontend: lpxbr %f0,%f1 +Assembly: lpxbr %f12,%f13 +============================================================ +LOAD ROUNDED +============================================================ +Testing: ledbr %f0,%f1 +Frontend: ledbr %f0,%f1 +Assembly: ledbr %f6,%f7 +Testing: ldxbr %f0,%f1 +Frontend: ldxbr %f0,%f1 +Assembly: ldxbr %f12,%f13 +Testing: lexbr %f0,%f1 +Frontend: lexbr %f0,%f1 +Assembly: lexbr %f12,%f13 +Testing: ledbra %f0,0,%f1,0 +Frontend: ledbr %f0,%f1 +Assembly: ledbr %f6,%f7 +Testing: ldxbra %f0,0,%f1,0 +Frontend: ldxbr %f0,%f1 +Assembly: ldxbr %f12,%f13 +Testing: lexbra %f0,0,%f1,0 +Frontend: lexbr %f0,%f1 +Assembly: lexbr %f12,%f13 +Testing: ledbra %f0,1,%f1,0 +Frontend: ledbra %f0,1,%f1,0 +Assembly: ledbra %f6,1,%f7,0 +Testing: ldxbra %f0,1,%f1,0 +Frontend: ldxbra %f0,1,%f1,0 +Assembly: ldxbra %f12,1,%f13,0 +Testing: lexbra %f0,1,%f1,0 +Frontend: lexbra %f0,1,%f1,0 +Assembly: lexbra %f12,1,%f13,0 +Testing: ledbra %f0,3,%f1,0 +Frontend: ledbra %f0,3,%f1,0 +Assembly: ledbra %f6,3,%f7,0 +Testing: ldxbra %f0,3,%f1,0 +Frontend: ldxbra %f0,3,%f1,0 +Assembly: ldxbra %f12,3,%f13,0 +Testing: lexbra %f0,3,%f1,0 +Frontend: lexbra %f0,3,%f1,0 +Assembly: lexbra %f12,3,%f13,0 +Testing: ledbra %f0,4,%f1,0 +Frontend: ledbra %f0,4,%f1,0 +Assembly: ledbra %f6,4,%f7,0 +Testing: ldxbra %f0,4,%f1,0 +Frontend: ldxbra %f0,4,%f1,0 +Assembly: ldxbra %f12,4,%f13,0 +Testing: lexbra %f0,4,%f1,0 +Frontend: lexbra %f0,4,%f1,0 +Assembly: lexbra %f12,4,%f13,0 +Testing: ledbra %f0,5,%f1,0 +Frontend: ledbra %f0,5,%f1,0 +Assembly: ledbra %f6,5,%f7,0 +Testing: ldxbra %f0,5,%f1,0 +Frontend: ldxbra %f0,5,%f1,0 +Assembly: ldxbra %f12,5,%f13,0 +Testing: lexbra %f0,5,%f1,0 +Frontend: lexbra %f0,5,%f1,0 +Assembly: lexbra %f12,5,%f13,0 +Testing: ledbra %f0,6,%f1,0 +Frontend: ledbra %f0,6,%f1,0 +Assembly: ledbra %f6,6,%f7,0 +Testing: ldxbra %f0,6,%f1,0 +Frontend: ldxbra %f0,6,%f1,0 +Assembly: ldxbra %f12,6,%f13,0 +Testing: lexbra %f0,6,%f1,0 +Frontend: lexbra %f0,6,%f1,0 +Assembly: lexbra %f12,6,%f13,0 +Testing: ledbra %f0,7,%f1,0 +Frontend: ledbra %f0,7,%f1,0 +Assembly: ledbra %f6,7,%f7,0 +Testing: ldxbra %f0,7,%f1,0 +Frontend: ldxbra %f0,7,%f1,0 +Assembly: ldxbra %f12,7,%f13,0 +Testing: lexbra %f0,7,%f1,0 +Frontend: lexbra %f0,7,%f1,0 +Assembly: lexbra %f12,7,%f13,0 +============================================================ +MULTIPLY +============================================================ +Testing: meebr %f0,%f1 +Frontend: meebr %f0,%f1 +Assembly: meebr %f7,%f6 +Testing: mdbr %f0,%f1 +Frontend: mdbr %f0,%f1 +Assembly: mdbr %f7,%f6 +Testing: mxbr %f0,%f1 +Frontend: mxbr %f0,%f1 +Assembly: mxbr %f12,%f13 +============================================================ +MULTIPLY AND ADD +============================================================ +Testing: maebr %f0,%f1,%f2 +Frontend: maebr %f0,%f1,%f2 +Assembly: maebr %f5,%f7,%f6 +Testing: madbr %f0,%f1,%f2 +Frontend: madbr %f0,%f1,%f2 +Assembly: madbr %f5,%f7,%f6 +============================================================ +MULTIPLY AND SUBTRACT +============================================================ +Testing: msebr %f0,%f1,%f2 +Frontend: msebr %f0,%f1,%f2 +Assembly: msebr %f5,%f7,%f6 +Testing: msdbr %f0,%f1,%f2 +Frontend: msdbr %f0,%f1,%f2 +Assembly: msdbr %f5,%f7,%f6 +============================================================ +SQUARE ROOT +============================================================ +Testing: sqebr %f0,%f1 +Frontend: sqebr %f0,%f1 +Assembly: sqebr %f6,%f7 +Testing: sqdbr %f0,%f1 +Frontend: sqdbr %f0,%f1 +Assembly: sqdbr %f6,%f7 +Testing: sqxbr %f0,%f1 +Frontend: sqxbr %f0,%f1 +Assembly: sqxbr %f12,%f13 +============================================================ +SUBTRACT +============================================================ +Testing: sebr %f0,%f1 +Frontend: sebr %f0,%f1 +Assembly: sebr %f7,%f6 +Testing: sdbr %f0,%f1 +Frontend: sdbr %f0,%f1 +Assembly: sdbr %f7,%f6 +Testing: sxbr %f0,%f1 +Frontend: sxbr %f0,%f1 +Assembly: sxbr %f12,%f13 diff --git a/none/tests/s390x/bfp-emit.stderr.exp b/none/tests/s390x/bfp-emit.stderr.exp new file mode 100644 index 0000000000..139597f9cb --- /dev/null +++ b/none/tests/s390x/bfp-emit.stderr.exp @@ -0,0 +1,2 @@ + + diff --git a/none/tests/s390x/bfp-emit.vgtest b/none/tests/s390x/bfp-emit.vgtest new file mode 100644 index 0000000000..b6c6e5b06c --- /dev/null +++ b/none/tests/s390x/bfp-emit.vgtest @@ -0,0 +1,3 @@ +prereq: ./bfp-emit.pl --check-prereq && ../../../tests/s390x_features s390x-fpext +prog: /bin/true +post: ./bfp-emit.pl |
|
From: Mark W. <ma...@so...> - 2025-09-19 21:53:32
|
https://sourceware.org/cgit/valgrind/commit/?id=0aecd4fe70e1522314866c48b6de20b6ea2f08a3 commit 0aecd4fe70e1522314866c48b6de20b6ea2f08a3 Author: Martin Cermak <mc...@re...> Date: Fri Sep 19 17:25:30 2025 +0200 Wrap the mount_setattr syscall 442 int syscall(SYS_mount_setattr, int dirfd, const char *pathname, unsigned int flags, struct mount_attr *attr, size_t size); The mount_setattr() system call changes the mount properties of a mount or an entire mount tree. If pathname is a relative pathname, then it is interpreted relative to the directory referred to by the file descriptor dirfd. If dirfd is the special value AT_FDCWD, then pathname is interpreted relative to the current working directory of the calling process. If pathname is the empty string and AT_EMPTY_PATH is specified in flags, then the mount properties of the mount identified by dirfd are changed Declare a mount_setattr wrapper in priv_syswrap-linux.h and hook it for {amd64,arm,arm64,mips64,ppc32,ppc64,riscv64,s390x,x86}-linux using LINX_ with PRE handler in syswrap-linux.c Part of this update also is a fix of the sys_move_mount wrapper. Specifically there was a typo mount_moce vs. move_mount, and also there was a problem in handling VKI_AT_FDCWD special fd value in the check for to_fd and to_pathname. https://bugs.kde.org/show_bug.cgi?id=509566 Diff: --- NEWS | 1 + coregrind/m_syswrap/priv_syswrap-linux.h | 3 +++ coregrind/m_syswrap/syswrap-amd64-linux.c | 1 + coregrind/m_syswrap/syswrap-arm-linux.c | 1 + coregrind/m_syswrap/syswrap-arm64-linux.c | 1 + coregrind/m_syswrap/syswrap-linux.c | 34 ++++++++++++++++------------- coregrind/m_syswrap/syswrap-mips32-linux.c | 1 + coregrind/m_syswrap/syswrap-mips64-linux.c | 1 + coregrind/m_syswrap/syswrap-ppc32-linux.c | 1 + coregrind/m_syswrap/syswrap-ppc64-linux.c | 1 + coregrind/m_syswrap/syswrap-riscv64-linux.c | 1 + coregrind/m_syswrap/syswrap-s390x-linux.c | 1 + coregrind/m_syswrap/syswrap-x86-linux.c | 1 + include/vki/vki-scnums-shared-linux.h | 1 + 14 files changed, 34 insertions(+), 15 deletions(-) diff --git a/NEWS b/NEWS index 66a9f29a22..ecd58cc501 100644 --- a/NEWS +++ b/NEWS @@ -138,6 +138,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 +509566 Wrap amd64-linux syscall: 442 (mount_setattr) 509590 Run the LTP tests with LTP_QUIET 509567 unhandled amd64-linux syscall: 443 (quotactl_fd) 509642 Add missing ppc64-linux syswraps diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h index 752bdf7370..53aa1b582d 100644 --- a/coregrind/m_syswrap/priv_syswrap-linux.h +++ b/coregrind/m_syswrap/priv_syswrap-linux.h @@ -346,6 +346,9 @@ DECL_TEMPLATE(linux, sys_pidfd_open); DECL_TEMPLATE(linux, sys_close_range); DECL_TEMPLATE(linux, sys_openat2); +// Linux-specific (new in Linux 5.12) +DECL_TEMPLATE(linux, sys_mount_setattr) + // Linux-specific (new in Linux 5.13) DECL_TEMPLATE(linux, sys_landlock_create_ruleset) DECL_TEMPLATE(linux, sys_landlock_add_rule) diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c index 8b2c95037f..4a3bad55f4 100644 --- a/coregrind/m_syswrap/syswrap-amd64-linux.c +++ b/coregrind/m_syswrap/syswrap-amd64-linux.c @@ -895,6 +895,7 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_faccessat2, sys_faccessat2), // 439 LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 + LINX_(__NR_mount_setattr, sys_mount_setattr), // 442 LINX_(__NR_quotactl_fd, sys_quotactl_fd), // 443 LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), // 444 diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c index e4f5e4c092..f55ed05e61 100644 --- a/coregrind/m_syswrap/syswrap-arm-linux.c +++ b/coregrind/m_syswrap/syswrap-arm-linux.c @@ -1069,6 +1069,7 @@ static SyscallTableEntry syscall_main_table[] = { LINXY(__NR_pidfd_getfd, sys_pidfd_getfd), // 438 LINX_(__NR_faccessat2, sys_faccessat2), // 439 LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 + LINX_(__NR_mount_setattr, sys_mount_setattr), // 442 LINX_(__NR_quotactl_fd, sys_quotactl_fd), // 443 LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), // 444 diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c index e1a8a883fc..b28b4598c0 100644 --- a/coregrind/m_syswrap/syswrap-arm64-linux.c +++ b/coregrind/m_syswrap/syswrap-arm64-linux.c @@ -846,6 +846,7 @@ static SyscallTableEntry syscall_main_table[] = { LINX_(__NR_faccessat2, sys_faccessat2), // 439 LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 + LINX_(__NR_mount_setattr, sys_mount_setattr), // 442 LINX_(__NR_quotactl_fd, sys_quotactl_fd), // 443 LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), // 444 diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 5474176982..d891ac6daa 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -1025,6 +1025,18 @@ PRE(sys_mount) PRE_MEM_RASCIIZ( "mount(type)", ARG3); } +PRE(sys_mount_setattr) +{ + // int syscall(SYS_mount_setattr, int dirfd, const char *pathname, + // unsigned int flags, struct mount_attr *attr, size_t size); + *flags |= SfMayBlock; + PRINT("sys_mount_setattr ( %d, %#" FMT_REGWORD "x, %" FMT_REGWORD "u, %#" + FMT_REGWORD "x, %" FMT_REGWORD "u )", (Int)ARG1, ARG2, + ARG3, ARG4, ARG5); + PRE_MEM_READ("mount(attr)", ARG5, ARG6); + ML_(fd_at_check_allowed)(SARG1, (const HChar*)ARG2, "mount_setattr(dirfd)", tid, status); +} + PRE(sys_oldumount) { PRINT("sys_oldumount( %#" FMT_REGWORD "x )", ARG1); @@ -2897,9 +2909,9 @@ PRE(sys_fanotify_mark) #else # error Unexpected word size #endif - if ( !ML_(fd_allowed)(SARG1, "fanotify_mark[fanotify_fd]", tid, False) ) + if ( !ML_(fd_allowed)(SARG1, "fanotify_mark(fanotify_fd)", tid, False) ) SET_STATUS_Failure( VKI_EBADF ); - ML_(fd_at_check_allowed)(SARG4, (const HChar*)ARG5, "mkdirat[firfd]", tid, status); + ML_(fd_at_check_allowed)(SARG4, (const HChar*)ARG5, "fanotify_mark(dirfd)", tid, status); } /* --------------------------------------------------------------------- @@ -14340,27 +14352,19 @@ PRE(sys_move_mount) "%ld, %#" FMT_REGWORD "x(%s), %ld", SARG1, ARG2, (HChar*)(Addr)ARG2, SARG3, ARG4, (HChar*)(Addr)ARG4, SARG5); - PRE_REG_READ5(long, "mount_move", + PRE_REG_READ5(long, "move_mount", int, from_dfd, const char *, from_pathname, int, to_dfd, const char*, to_pathname, int, flags); - PRE_MEM_RASCIIZ( "mount_move(from_pathname)", ARG2); + PRE_MEM_RASCIIZ( "move_mount(from_pathname)", ARG2); /* For absolute filenames, from_dfd is ignored. If from_dfd is AT_FDCWD, from_pathname is relative to cwd. When comparing from_dfd against AT_FDCWD, be sure only to compare the bottom 32 bits. */ - if (ML_(safe_to_deref)( (void*)(Addr)ARG2, 1 ) - && *(Char *)(Addr)ARG2 != '/' - && ((Int)ARG1) != ((Int)VKI_AT_FDCWD) - && !ML_(fd_allowed)(ARG1, "mount_move", tid, False)) - SET_STATUS_Failure( VKI_EBADF ); - PRE_MEM_RASCIIZ( "mount_move(from_pathname)", ARG4); + ML_(fd_at_check_allowed)(SARG1, (const HChar*)ARG2, "move_mount(from_dfd)", tid, status); + PRE_MEM_RASCIIZ( "move_mount(to_pathname)", ARG4); /* For absolute filenames, to_dfd is ignored. If to_dfd is AT_FDCWD, to_pathname is relative to cwd. When comparing to_dfd against AT_FDCWD, be sure only to compare the bottom 32 bits. */ - if (ML_(safe_to_deref)( (void*)(Addr)ARG4, 1 ) - && *(Char *)(Addr)ARG4 != '/' - && ((Int)ARG4) != ((Int)VKI_AT_FDCWD) - && !ML_(fd_allowed)(ARG3, "mount_move", tid, False)) - SET_STATUS_Failure( VKI_EBADF ); + ML_(fd_at_check_allowed)(SARG3, (const HChar*)ARG4, "move_mount(to_dfd)", tid, status); } /* int fsopen (const char *fs_name, unsigned int flags) */ diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c index d1f5dfce36..c4d7a66206 100644 --- a/coregrind/m_syswrap/syswrap-mips32-linux.c +++ b/coregrind/m_syswrap/syswrap-mips32-linux.c @@ -1176,6 +1176,7 @@ static SyscallTableEntry syscall_main_table[] = { LINX_ (__NR_faccessat2, sys_faccessat2), // 439 LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 + LINX_(__NR_mount_setattr, sys_mount_setattr), // 442 LINX_(__NR_quotactl_fd, sys_quotactl_fd), // 443 LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), // 444 diff --git a/coregrind/m_syswrap/syswrap-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c index 64fb647b18..45af0a3fd9 100644 --- a/coregrind/m_syswrap/syswrap-mips64-linux.c +++ b/coregrind/m_syswrap/syswrap-mips64-linux.c @@ -646,6 +646,7 @@ static SyscallTableEntry syscall_main_table[] = { GENX_ (__NR_acct, sys_acct), GENX_ (__NR_settimeofday, sys_settimeofday), LINX_ (__NR_mount, sys_mount), + LINX_ (__NR_mount_setattr, sys_mount_setattr), LINX_ (__NR_umount2, sys_umount), PLAX_ (__NR_swapon, sys_swapon), PLAX_ (__NR_swapoff, sys_swapoff), diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c index 94010bcee1..8bb0a04f56 100644 --- a/coregrind/m_syswrap/syswrap-ppc32-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c @@ -1075,6 +1075,7 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_faccessat2, sys_faccessat2), // 439 LINXY (__NR_epoll_pwait2, sys_epoll_pwait2), // 441 + LINX_ (__NR_mount_setattr, sys_mount_setattr), // 442 LINX_ (__NR_quotactl_fd, sys_quotactl_fd), // 443 LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), // 444 diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c index da81c0757e..0f51117289 100644 --- a/coregrind/m_syswrap/syswrap-ppc64-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c @@ -1053,6 +1053,7 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_faccessat2, sys_faccessat2), // 439 LINXY (__NR_epoll_pwait2, sys_epoll_pwait2), // 441 + LINX_ (__NR_mount_setattr, sys_mount_setattr), // 442 LINX_ (__NR_quotactl_fd, sys_quotactl_fd), // 443 LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), // 444 diff --git a/coregrind/m_syswrap/syswrap-riscv64-linux.c b/coregrind/m_syswrap/syswrap-riscv64-linux.c index dc175e3eca..d806b92b8f 100644 --- a/coregrind/m_syswrap/syswrap-riscv64-linux.c +++ b/coregrind/m_syswrap/syswrap-riscv64-linux.c @@ -595,6 +595,7 @@ static SyscallTableEntry syscall_main_table[] = { LINXY(__NR_pidfd_getfd, sys_pidfd_getfd), /* 438 */ LINX_(__NR_faccessat2, sys_faccessat2), /* 439 */ LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), /* 441 */ + LINX_(__NR_mount_setattr, sys_mount_setattr), /* 442 */ LINX_(__NR_quotactl_fd, sys_quotactl_fd), /* 443 */ LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), /* 444 */ LINX_(__NR_landlock_add_rule, sys_landlock_add_rule), /* 445 */ diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c index fba3d96fb5..643549c64f 100644 --- a/coregrind/m_syswrap/syswrap-s390x-linux.c +++ b/coregrind/m_syswrap/syswrap-s390x-linux.c @@ -886,6 +886,7 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_faccessat2, sys_faccessat2), // 439 LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 + LINX_(__NR_mount_setattr, sys_mount_setattr), // 442 LINX_(__NR_quotactl_fd, sys_quotactl_fd), // 443 LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), // 444 diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c index 7d2d495a90..42a69cb965 100644 --- a/coregrind/m_syswrap/syswrap-x86-linux.c +++ b/coregrind/m_syswrap/syswrap-x86-linux.c @@ -1668,6 +1668,7 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_faccessat2, sys_faccessat2), // 439 LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 + LINX_(__NR_mount_setattr, sys_mount_setattr), // 442 LINX_(__NR_quotactl_fd, sys_quotactl_fd), // 443 LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), // 444 diff --git a/include/vki/vki-scnums-shared-linux.h b/include/vki/vki-scnums-shared-linux.h index c5f33e935c..518131a1fd 100644 --- a/include/vki/vki-scnums-shared-linux.h +++ b/include/vki/vki-scnums-shared-linux.h @@ -48,6 +48,7 @@ #define __NR_epoll_pwait2 441 +#define __NR_mount_setattr 442 #define __NR_quotactl_fd 443 #define __NR_landlock_create_ruleset 444 #define __NR_landlock_add_rule 445 |
|
From: Paul F. <pa...@so...> - 2025-09-19 20:42:48
|
https://sourceware.org/cgit/valgrind/commit/?id=3e30bd17b037f4f402a020f8674b1ae576c5cfcc commit 3e30bd17b037f4f402a020f8674b1ae576c5cfcc Author: Paul Floyd <pj...@wa...> Date: Fri Sep 19 19:57:07 2025 +0200 FreeBSD regtest: add syscall 9999 to scalar This provokes an unhandled syscall message, as is done on other platforms. Update filter since scalar runs on all FreeBSD platforms. Diff: --- coregrind/pub_core_aspacemgr.h | 2 +- memcheck/tests/freebsd/filter_scalar | 1 + memcheck/tests/freebsd/scalar.c | 5 +++++ memcheck/tests/freebsd/scalar.stderr.exp | 8 ++++++++ memcheck/tests/freebsd/scalar.stderr.exp-x86 | 8 ++++++++ 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/coregrind/pub_core_aspacemgr.h b/coregrind/pub_core_aspacemgr.h index b867108a22..56c5b8dd10 100644 --- a/coregrind/pub_core_aspacemgr.h +++ b/coregrind/pub_core_aspacemgr.h @@ -340,7 +340,7 @@ extern Bool VG_(am_relocate_nooverlap_client)( /*OUT*/Bool* need_discard, #else # define VG_STACK_GUARD_SZB 8192 // 2 pages #endif -# define VG_DEFAULT_STACK_ACTIVE_SZB 1048576 // (4096 * 256) = 1Mb +# define VG_DEFAULT_STACK_ACTIVE_SZB 1048576 // (4096 * 256) = 1Mb typedef struct _VgStack VgStack; diff --git a/memcheck/tests/freebsd/filter_scalar b/memcheck/tests/freebsd/filter_scalar index 1e4f2d753e..2741038d1d 100755 --- a/memcheck/tests/freebsd/filter_scalar +++ b/memcheck/tests/freebsd/filter_scalar @@ -16,6 +16,7 @@ sed '/at 0x........: syscall (in \/...libc...)/d' | sed 's/SYS_freebsd12/ SYS/' | sed 's/SYS_freebsd13/ SYS/' | sed 's/SYS_freebsd14/ SYS/' | +sed 's/arm64-freebsd/amd64-freebsd/' | # get rid of error limit message diff --git a/memcheck/tests/freebsd/scalar.c b/memcheck/tests/freebsd/scalar.c index d327609ac7..acb4b662e7 100644 --- a/memcheck/tests/freebsd/scalar.c +++ b/memcheck/tests/freebsd/scalar.c @@ -2594,6 +2594,11 @@ int main(void) FAKE_SY("\n"); #endif + // no such syscall... + GO(9999, "1e"); + SY(9999); FAIL; + + /* SYS_exit 1 */ GO(SYS_exit, "1s 0m"); SY(SYS_exit, x0); FAIL; diff --git a/memcheck/tests/freebsd/scalar.stderr.exp b/memcheck/tests/freebsd/scalar.stderr.exp index 638e87bd62..2acb864e73 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp +++ b/memcheck/tests/freebsd/scalar.stderr.exp @@ -5854,6 +5854,14 @@ Syscall param setgroups(list) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd +--------------------------------------------------------- +9999: 9999 1e +--------------------------------------------------------- +WARNING: unhandled amd64-freebsd syscall: 9999 +You may be able to write your own handler. +Read the file README_MISSING_SYSCALL_OR_IOCTL. +Nevertheless we consider this a bug. Please report +it at http://valgrind.org/support/bug_reports.html. --------------------------------------------------------- 1: SYS_exit 1s 0m --------------------------------------------------------- diff --git a/memcheck/tests/freebsd/scalar.stderr.exp-x86 b/memcheck/tests/freebsd/scalar.stderr.exp-x86 index 7304090f5c..957ffb2058 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp-x86 +++ b/memcheck/tests/freebsd/scalar.stderr.exp-x86 @@ -5926,6 +5926,14 @@ Syscall param setgroups(list) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd +--------------------------------------------------------- +9999: 9999 1e +--------------------------------------------------------- +WARNING: unhandled x86-freebsd syscall: 9999 +You may be able to write your own handler. +Read the file README_MISSING_SYSCALL_OR_IOCTL. +Nevertheless we consider this a bug. Please report +it at http://valgrind.org/support/bug_reports.html. --------------------------------------------------------- 1: SYS_exit 1s 0m --------------------------------------------------------- |
|
From: Mark W. <ma...@so...> - 2025-09-19 16:41:18
|
https://sourceware.org/cgit/valgrind/commit/?id=2604bb753a9ff461550e0d4d0c1ebd3ab6488d6d commit 2604bb753a9ff461550e0d4d0c1ebd3ab6488d6d Author: Martin Cermak <mc...@re...> Date: Fri Sep 19 09:31:39 2025 +0200 Wrap the setdomainname syscall The setdomainname() call sets the domain name to the value given in the character array name. The len argument specifies the number of bytes in name. (Thus, name does not require a terminating null byte.) Declare a setdomainname wrapper in priv_syswrap-linux.h and hook it for {amd64,arm,arm64,mips64,ppc32,ppc64,riscv64,s390x,x86}-linux using LINX_ with PRE handler in syswrap-linux.c https://bugs.kde.org/show_bug.cgi?id=369030 Diff: --- NEWS | 1 + coregrind/m_syswrap/priv_syswrap-linux.h | 1 + coregrind/m_syswrap/syswrap-amd64-linux.c | 2 +- coregrind/m_syswrap/syswrap-arm-linux.c | 2 +- coregrind/m_syswrap/syswrap-arm64-linux.c | 2 +- coregrind/m_syswrap/syswrap-linux.c | 7 +++++++ coregrind/m_syswrap/syswrap-mips32-linux.c | 2 +- coregrind/m_syswrap/syswrap-mips64-linux.c | 9 +-------- coregrind/m_syswrap/syswrap-nanomips-linux.c | 9 +-------- coregrind/m_syswrap/syswrap-ppc32-linux.c | 2 +- coregrind/m_syswrap/syswrap-ppc64-linux.c | 2 +- coregrind/m_syswrap/syswrap-riscv64-linux.c | 1 + coregrind/m_syswrap/syswrap-s390x-linux.c | 2 +- coregrind/m_syswrap/syswrap-x86-linux.c | 2 +- include/vki/vki-scnums-riscv64-linux.h | 1 + 15 files changed, 21 insertions(+), 24 deletions(-) diff --git a/NEWS b/NEWS index f768e5ca5b..66a9f29a22 100644 --- a/NEWS +++ b/NEWS @@ -69,6 +69,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 309554 Wrap syscall remap_file_pages (216) 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" 418756 MAP_FIXED_NOREPLACE mmap flag unsupported 493430 Review all syscalls that use or return (new) file descriptors diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h index 49a4c222b5..752bdf7370 100644 --- a/coregrind/m_syswrap/priv_syswrap-linux.h +++ b/coregrind/m_syswrap/priv_syswrap-linux.h @@ -62,6 +62,7 @@ DECL_TEMPLATE(linux, sys_readahead); DECL_TEMPLATE(linux, sys_move_pages); DECL_TEMPLATE(linux, sys_cachestat); DECL_TEMPLATE(linux, sys_sysfs); +DECL_TEMPLATE(linux, sys_setdomainname); // clone is similar enough between linux variants to have a generic // version, but which will call an extern defined in syswrap-<platform>-linux.c diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c index 88c84b8418..8b2c95037f 100644 --- a/coregrind/m_syswrap/syswrap-amd64-linux.c +++ b/coregrind/m_syswrap/syswrap-amd64-linux.c @@ -675,7 +675,7 @@ static SyscallTableEntry syscall_table[] = { // (__NR_reboot, sys_reboot), // 169 GENX_(__NR_sethostname, sys_sethostname), // 170 - // (__NR_setdomainname, sys_setdomainname), // 171 + LINX_(__NR_setdomainname, sys_setdomainname), // 171 GENX_(__NR_iopl, sys_iopl), // 172 LINX_(__NR_ioperm, sys_ioperm), // 173 GENX_(__NR_create_module, sys_ni_syscall), // 174 diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c index 5567146eb3..e4f5e4c092 100644 --- a/coregrind/m_syswrap/syswrap-arm-linux.c +++ b/coregrind/m_syswrap/syswrap-arm-linux.c @@ -694,7 +694,7 @@ static SyscallTableEntry syscall_main_table[] = { PLAX_(__NR_sigreturn, sys_sigreturn), // 119 ?/Linux LINX_(__NR_clone, sys_clone), // 120 -//zz // (__NR_setdomainname, sys_setdomainname), // 121 */*(?) + LINX_(__NR_setdomainname, sys_setdomainname), // 121 GENXY(__NR_uname, sys_newuname), // 122 // PLAX_(__NR_modify_ldt, sys_modify_ldt), // 123 LINXY(__NR_adjtimex, sys_adjtimex), // 124 diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c index ada952cca6..e1a8a883fc 100644 --- a/coregrind/m_syswrap/syswrap-arm64-linux.c +++ b/coregrind/m_syswrap/syswrap-arm64-linux.c @@ -710,7 +710,7 @@ static SyscallTableEntry syscall_main_table[] = { GENX_(__NR_setgroups, sys_setgroups), // 159 GENXY(__NR_uname, sys_newuname), // 160 GENX_(__NR_sethostname, sys_sethostname), // 161 - // (__NR_setdomainname, sys_ni_syscall), // 162 + LINX_(__NR_setdomainname, sys_setdomainname), // 162 GENXY(__NR_getrlimit, sys_old_getrlimit), // 163 GENX_(__NR_setrlimit, sys_setrlimit), // 164 GENXY(__NR_getrusage, sys_getrusage), // 165 diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 0d5aa7965d..5474176982 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -1653,6 +1653,13 @@ POST(sys_sendfile64) } } +PRE(sys_setdomainname) +{ + PRINT ("sys_setdomainname ( %#" FMT_REGWORD "x, %ld )", ARG1, SARG2); + PRE_REG_READ2 (long, "setdomainname", const void *, name, int, len); + PRE_MEM_READ("setdomainname(name)", ARG1, ARG2); +} + static void pre_read_timespec64 (ThreadId tid, const char *msg, UWord arg) { struct vki_timespec64 *ts64 = (void *)(Addr)arg; diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c index ba5a8bb179..d1f5dfce36 100644 --- a/coregrind/m_syswrap/syswrap-mips32-linux.c +++ b/coregrind/m_syswrap/syswrap-mips32-linux.c @@ -886,7 +886,7 @@ static SyscallTableEntry syscall_main_table[] = { GENX_ (__NR_fsync, sys_fsync), // 118 PLAX_ (__NR_sigreturn, sys_sigreturn), // 119 LINX_ (__NR_clone, sys_clone), // 120 - //.. // (__NR_setdomainname, sys_setdomainname), // 121 + LINX_ (__NR_setdomainname, sys_setdomainname), // 121 GENXY (__NR_uname, sys_newuname), // 122 //.. PLAX_(__NR_modify_ldt, sys_modify_ldt), // 123 LINXY (__NR_adjtimex, sys_adjtimex), // 124 diff --git a/coregrind/m_syswrap/syswrap-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c index 095be9b6ae..64fb647b18 100644 --- a/coregrind/m_syswrap/syswrap-mips64-linux.c +++ b/coregrind/m_syswrap/syswrap-mips64-linux.c @@ -217,7 +217,6 @@ SysRes sys_set_tls ( ThreadId tid, Addr tlsptr ) DECL_TEMPLATE (mips_linux, sys_set_thread_area); DECL_TEMPLATE (mips_linux, sys_swapon); DECL_TEMPLATE (mips_linux, sys_swapoff); -DECL_TEMPLATE (mips_linux, sys_setdomainname); DECL_TEMPLATE (mips_linux, sys_sethostname); DECL_TEMPLATE (mips_linux, sys_reboot); DECL_TEMPLATE (mips_linux, sys_cacheflush); @@ -273,12 +272,6 @@ PRE(sys_reboot) *flags |= SfMayBlock; } -PRE(sys_setdomainname) -{ - PRINT ("sys_setdomainname ( %#" FMT_REGWORD "x, %ld )", ARG1, SARG2); - PRE_REG_READ2 (long, "setdomainname", const void *, name, int, len); -} - PRE(sys_sethostname) { PRINT ("sys_sethostname ( %#" FMT_REGWORD "x, %ld )", ARG1, SARG2); @@ -658,7 +651,7 @@ static SyscallTableEntry syscall_main_table[] = { PLAX_ (__NR_swapoff, sys_swapoff), PLAX_ (__NR_reboot, sys_reboot), PLAX_ (__NR_sethostname, sys_sethostname), - PLAX_ (__NR_setdomainname, sys_setdomainname), + LINX_ (__NR_setdomainname, sys_setdomainname), GENX_ (__NR_create_module, sys_ni_syscall), LINX_ (__NR_init_module, sys_init_module), LINX_ (__NR_delete_module, sys_delete_module), diff --git a/coregrind/m_syswrap/syswrap-nanomips-linux.c b/coregrind/m_syswrap/syswrap-nanomips-linux.c index 592d93d8f3..94e4ce4d43 100644 --- a/coregrind/m_syswrap/syswrap-nanomips-linux.c +++ b/coregrind/m_syswrap/syswrap-nanomips-linux.c @@ -382,7 +382,6 @@ DECL_TEMPLATE (mips_linux, sys_set_thread_area); DECL_TEMPLATE (mips_linux, sys_ptrace); DECL_TEMPLATE (mips_linux, sys_unshare); DECL_TEMPLATE (mips_linux, sys_reboot); -DECL_TEMPLATE (mips_linux, sys_setdomainname); DECL_TEMPLATE (mips_linux, sys_sethostname); DECL_TEMPLATE (mips_linux, sys_swapon); DECL_TEMPLATE (mips_linux, sys_swapoff); @@ -514,12 +513,6 @@ PRE(sys_reboot) *flags |= SfMayBlock; } -PRE(sys_setdomainname) -{ - PRINT ("sys_setdomainname ( %#lx, %ld )", ARG1, SARG2); - PRE_REG_READ2 (long, "setdomainname", const void *, name, int, len); -} - PRE(sys_sethostname) { PRINT ("sys_sethostname ( %#lx, %ld )", ARG1, SARG2); @@ -712,7 +705,7 @@ static SyscallTableEntry syscall_main_table[] = { GENX_ (__NR_setgroups, sys_setgroups), GENXY (__NR_uname, sys_newuname), PLAX_ (__NR_sethostname, sys_sethostname), - PLAX_ (__NR_setdomainname, sys_setdomainname), + LINX_ (__NR_setdomainname, sys_setdomainname), GENXY (__NR_getrusage, sys_getrusage), GENX_ (__NR_umask, sys_umask), LINXY (__NR_prctl, sys_prctl), diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c index a0e11d5ed6..94010bcee1 100644 --- a/coregrind/m_syswrap/syswrap-ppc32-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c @@ -757,7 +757,7 @@ static SyscallTableEntry syscall_table[] = { PLAX_(__NR_sigreturn, sys_sigreturn), // 119 ?/Linux //.. LINX_(__NR_clone, sys_clone), // 120 -//.. // (__NR_setdomainname, sys_setdomainname), // 121 */*(?) + LINX_(__NR_setdomainname, sys_setdomainname), // 121 GENXY(__NR_uname, sys_newuname), // 122 //.. PLAX_(__NR_modify_ldt, sys_modify_ldt), // 123 LINXY(__NR_adjtimex, sys_adjtimex), // 124 diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c index 974a4995fd..da81c0757e 100644 --- a/coregrind/m_syswrap/syswrap-ppc64-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c @@ -745,7 +745,7 @@ static SyscallTableEntry syscall_table[] = { // _____(__NR_sigreturn, sys_sigreturn), // 119 LINX_(__NR_clone, sys_clone), // 120 -// _____(__NR_setdomainname, sys_setdomainname), // 121 + LINX_(__NR_setdomainname, sys_setdomainname), // 121 GENXY(__NR_uname, sys_newuname), // 122 // _____(__NR_modify_ldt, sys_modify_ldt), // 123 LINXY(__NR_adjtimex, sys_adjtimex), // 124 diff --git a/coregrind/m_syswrap/syswrap-riscv64-linux.c b/coregrind/m_syswrap/syswrap-riscv64-linux.c index 5134bd1713..dc175e3eca 100644 --- a/coregrind/m_syswrap/syswrap-riscv64-linux.c +++ b/coregrind/m_syswrap/syswrap-riscv64-linux.c @@ -468,6 +468,7 @@ static SyscallTableEntry syscall_main_table[] = { GENX_(__NR_setgroups, sys_setgroups), /* 159 */ GENXY(__NR_uname, sys_newuname), /* 160 */ GENX_(__NR_sethostname, sys_sethostname), /* 161 */ + LINX_(__NR_setdomainname, sys_setdomainname), /* 162 */ GENXY(__NR_getrlimit, sys_getrlimit), /* 163 */ GENX_(__NR_setrlimit, sys_setrlimit), /* 164 */ GENXY(__NR_getrusage, sys_getrusage), /* 165 */ diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c index 8f7159751a..fba3d96fb5 100644 --- a/coregrind/m_syswrap/syswrap-s390x-linux.c +++ b/coregrind/m_syswrap/syswrap-s390x-linux.c @@ -556,7 +556,7 @@ static SyscallTableEntry syscall_table[] = { PLAX_(__NR_sigreturn, sys_sigreturn), // 119 LINX_(__NR_clone, sys_clone), // 120 -// ?????(__NR_setdomainname, ), // 121 + LINX_(__NR_setdomainname, sys_setdomainname), // 121 GENXY(__NR_uname, sys_newuname), // 122 GENX_(123, sys_ni_syscall), /* unimplemented (by the kernel) */ // 123 // ?????(__NR_adjtimex, ), // 124 diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c index f129317a82..7d2d495a90 100644 --- a/coregrind/m_syswrap/syswrap-x86-linux.c +++ b/coregrind/m_syswrap/syswrap-x86-linux.c @@ -1302,7 +1302,7 @@ static SyscallTableEntry syscall_table[] = { PLAX_(__NR_sigreturn, sys_sigreturn), // 119 ?/Linux LINX_(__NR_clone, sys_clone), // 120 -//zz // (__NR_setdomainname, sys_setdomainname), // 121 */*(?) + LINX_(__NR_setdomainname, sys_setdomainname), // 121 GENXY(__NR_uname, sys_newuname), // 122 PLAX_(__NR_modify_ldt, sys_modify_ldt), // 123 LINXY(__NR_adjtimex, sys_adjtimex), // 124 diff --git a/include/vki/vki-scnums-riscv64-linux.h b/include/vki/vki-scnums-riscv64-linux.h index f30636f417..6130ce37f1 100644 --- a/include/vki/vki-scnums-riscv64-linux.h +++ b/include/vki/vki-scnums-riscv64-linux.h @@ -192,6 +192,7 @@ #define __NR_setgroups 159 #define __NR_uname 160 #define __NR_sethostname 161 +#define __NR_setdomainname 162 #define __NR_getrlimit 163 #define __NR_setrlimit 164 #define __NR_getrusage 165 |
|
From: Florian K. <fk...@so...> - 2025-09-19 16:07:19
|
https://sourceware.org/cgit/valgrind/commit/?id=1bed301999ee962d3b57869053b64a064ae8d6ba commit 1bed301999ee962d3b57869053b64a064ae8d6ba Author: Florian Krohm <fl...@ei...> Date: Fri Sep 19 16:06:39 2025 +0000 Fix none/tests/s390x/disasm-test/Makefile.am Remove disasm-test.stdout.exp from Makefile.am. This was fogotten in 3d224b85ac. Diff: --- none/tests/s390x/disasm-test/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/none/tests/s390x/disasm-test/Makefile.am b/none/tests/s390x/disasm-test/Makefile.am index 9d3ee3a291..5629d7d52d 100644 --- a/none/tests/s390x/disasm-test/Makefile.am +++ b/none/tests/s390x/disasm-test/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/Makefile.all.am -EXTRA_DIST = disasm-test.vgtest disasm-test.stderr.exp disasm-test.stdout.exp \ +EXTRA_DIST = disasm-test.vgtest disasm-test.stderr.exp \ disasm-test.post.exp dist_noinst_SCRIPTS = filter_stderr |
|
From: Florian K. <fk...@so...> - 2025-09-19 15:25:45
|
https://sourceware.org/cgit/valgrind/commit/?id=3d224b85acd061419dd0276e345c402198178d1d commit 3d224b85acd061419dd0276e345c402198178d1d Author: Florian Krohm <fl...@ei...> Date: Fri Sep 19 15:25:00 2025 +0000 s390: Tweak disasm-test Remove stdout.exp file as it is not needed. The mandatory .stderr.exp file was not empty even though disasm-test does not write anything to stderr. Annoying! ../filter_stderr was doing it. Adjust filter_stderr accordingly and let .stderr.exp reflect the actual output. Diff: --- none/tests/s390x/disasm-test/disasm-test.stderr.exp | 2 -- none/tests/s390x/disasm-test/disasm-test.stdout.exp | 0 none/tests/s390x/disasm-test/filter_stderr | 3 ++- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/none/tests/s390x/disasm-test/disasm-test.stderr.exp b/none/tests/s390x/disasm-test/disasm-test.stderr.exp index 139597f9cb..e69de29bb2 100644 --- a/none/tests/s390x/disasm-test/disasm-test.stderr.exp +++ b/none/tests/s390x/disasm-test/disasm-test.stderr.exp @@ -1,2 +0,0 @@ - - diff --git a/none/tests/s390x/disasm-test/disasm-test.stdout.exp b/none/tests/s390x/disasm-test/disasm-test.stdout.exp deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/none/tests/s390x/disasm-test/filter_stderr b/none/tests/s390x/disasm-test/filter_stderr index f4c67057ee..17cc8adf58 100755 --- a/none/tests/s390x/disasm-test/filter_stderr +++ b/none/tests/s390x/disasm-test/filter_stderr @@ -1,3 +1,4 @@ #!/bin/sh -../../filter_stderr "$@" +# Nothing to filter. +true |
|
From: Mark W. <ma...@so...> - 2025-09-19 15:20:11
|
https://sourceware.org/cgit/valgrind/commit/?id=53c66de8857300172c62827a4fc06e28685892a0 commit 53c66de8857300172c62827a4fc06e28685892a0 Author: Martin Cermak <mc...@re...> Date: Fri Sep 19 11:47:14 2025 +0200 Add missing ppc64-linux and s390x-linux syswraps existing on other arches This update adds following ppc64le and s390x syswraps: - sys_msgctl - sys_semctl - sys_semtimedop - sys_sethostname - sys_shmctl - sys_sigpending - sys_stime This update adds following ppc64le syswraps: - sys_setns This update adds following s390x syswraps: - sys_bpf Blacklist the shmctl05, as it is a long running one. It does pass on all architectures afaics, but needs a relatively high LTP_TIMEOUT_MUL setting. So, let's skip that one. https://bugs.kde.org/show_bug.cgi?id=509642 https://bugs.kde.org/show_bug.cgi?id=509643 Diff: --- NEWS | 2 ++ auxprogs/ltp-excludes.txt | 4 ++++ coregrind/m_syswrap/syswrap-ppc64-linux.c | 14 +++++++++----- coregrind/m_syswrap/syswrap-s390x-linux.c | 9 +++++++-- include/vki/vki-scnums-ppc64-linux.h | 4 ++++ include/vki/vki-scnums-s390x-linux.h | 5 +++++ 6 files changed, 31 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index 3114eb4fe1..f768e5ca5b 100644 --- a/NEWS +++ b/NEWS @@ -139,6 +139,8 @@ are not entered into bugzilla tend to get forgotten about or ignored. 509517 s390x: Even/odd lane confusion in various vector insns 509590 Run the LTP tests with LTP_QUIET 509567 unhandled amd64-linux syscall: 443 (quotactl_fd) +509642 Add missing ppc64-linux syswraps +509643 Add missing s390x-linux syswraps To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/auxprogs/ltp-excludes.txt b/auxprogs/ltp-excludes.txt index 0d00bab8a6..3a3d7e44d8 100644 --- a/auxprogs/ltp-excludes.txt +++ b/auxprogs/ltp-excludes.txt @@ -34,3 +34,7 @@ kcmp03 # don't have a separate mmap allocator so set hblks & hblkhd to 0. mallinfo02 mallinfo2_01 +# The shmctl05 testcase is a long running one. It does pass with +# LTP_TIMEOUT_MUL set to some relatively high value. Let's just +# skip it here. +shmctl05 diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c index d5e2f523c4..974a4995fd 100644 --- a/coregrind/m_syswrap/syswrap-ppc64-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c @@ -630,7 +630,7 @@ static SyscallTableEntry syscall_table[] = { GENX_(__NR_setuid, sys_setuid), // 23 GENX_(__NR_getuid, sys_getuid), // 24 -// _____(__NR_stime, sys_stime), // 25 + LINX_(__NR_stime, sys_stime), // 25 PLAXY(__NR_ptrace, sys_ptrace), // 26 GENX_(__NR_alarm, sys_alarm), // 27 // _____(__NR_oldfstat, sys_oldfstat), // 28 @@ -687,14 +687,14 @@ static SyscallTableEntry syscall_table[] = { GENX_(__NR_setreuid, sys_setreuid), // 70 GENX_(__NR_setregid, sys_setregid), // 71 // _____(__NR_sigsuspend, sys_sigsuspend), // 72 -// _____(__NR_sigpending, sys_sigpending), // 73 -// _____(__NR_sethostname, sys_sethostname), // 74 + LINXY(__NR_sigpending, sys_sigpending), // 73 + GENX_(__NR_sethostname, sys_sethostname), // 74 GENX_(__NR_setrlimit, sys_setrlimit), // 75 GENXY(__NR_getrlimit, sys_getrlimit), // 76 GENXY(__NR_getrusage, sys_getrusage), // 77 GENXY(__NR_gettimeofday, sys_gettimeofday), // 78 -// _____(__NR_settimeofday, sys_settimeofday), // 79 + GENX_(__NR_settimeofday, sys_settimeofday), // 79 GENXY(__NR_getgroups, sys_getgroups), // 80 GENX_(__NR_setgroups, sys_setgroups), // 81 @@ -1005,6 +1005,7 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_syncfs, sys_syncfs), // 348 LINXY(__NR_sendmmsg, sys_sendmmsg), // 349 + LINX_(__NR_setns, sys_setns), // 350 LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 351 LINX_(__NR_process_vm_writev, sys_process_vm_writev),// 352 LINX_(__NR_kcmp, sys_kcmp), // 354 @@ -1031,7 +1032,10 @@ static SyscallTableEntry syscall_table[] = { GENX_(__NR_rseq, sys_ni_syscall), // 387 LINX_(__NR_io_pgetevents, sys_io_pgetevents), // 388 - + LINX_(__NR_semtimedop, sys_semtimedop), // 392 + LINXY(__NR_semctl, sys_semctl), // 394 + LINXY(__NR_shmctl, sys_shmctl), // 396 + LINXY(__NR_msgctl, sys_msgctl), // 402 LINXY(__NR_io_uring_setup, sys_io_uring_setup), // 425 LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426 LINXY(__NR_io_uring_register, sys_io_uring_register), // 427 diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c index 4d794ce81c..8f7159751a 100644 --- a/coregrind/m_syswrap/syswrap-s390x-linux.c +++ b/coregrind/m_syswrap/syswrap-s390x-linux.c @@ -498,8 +498,8 @@ static SyscallTableEntry syscall_table[] = { GENX_(70, sys_ni_syscall), /* unimplemented (by the kernel) */ // 70 GENX_(71, sys_ni_syscall), /* unimplemented (by the kernel) */ // 71 // ?????(__NR_sigsuspend, ), // 72 -// ?????(__NR_sigpending, ), // 73 -// ?????(__NR_sethostname, ), // 74 + LINXY(__NR_sigpending, sys_sigpending), // 73 + GENX_(__NR_sethostname, sys_sethostname), // 74 GENX_(__NR_setrlimit, sys_setrlimit), // 75 GENXY(76, sys_getrlimit), /* see also 191 */ // 76 @@ -832,6 +832,7 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_getrandom, sys_getrandom), // 349 LINXY(__NR_memfd_create, sys_memfd_create), // 350 + LINXY(__NR_bpf, sys_bpf), // 351 LINX_(__NR_execveat, sys_execveat), // 354 @@ -864,6 +865,10 @@ static SyscallTableEntry syscall_table[] = { GENX_(__NR_rseq, sys_ni_syscall), // 381 LINX_(__NR_io_pgetevents, sys_io_pgetevents), // 382 + LINX_(__NR_semtimedop, sys_semtimedop), // 392 + LINXY(__NR_semctl, sys_semctl), // 394 + LINXY(__NR_shmctl, sys_shmctl), // 396 + LINXY(__NR_msgctl, sys_msgctl), // 402 LINXY(__NR_io_uring_setup, sys_io_uring_setup), // 425 LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426 LINXY(__NR_io_uring_register, sys_io_uring_register), // 427 diff --git a/include/vki/vki-scnums-ppc64-linux.h b/include/vki/vki-scnums-ppc64-linux.h index 4b42c60b59..85e2d7a70f 100644 --- a/include/vki/vki-scnums-ppc64-linux.h +++ b/include/vki/vki-scnums-ppc64-linux.h @@ -409,6 +409,10 @@ #define __NR_pkey_mprotect 386 #define __NR_rseq 387 #define __NR_io_pgetevents 388 +#define __NR_semtimedop 392 +#define __NR_semctl 394 +#define __NR_shmctl 396 +#define __NR_msgctl 402 #define __NR_futex_waitv 449 #endif /* __VKI_SCNUMS_PPC64_LINUX_H */ diff --git a/include/vki/vki-scnums-s390x-linux.h b/include/vki/vki-scnums-s390x-linux.h index ad3647d23d..22d94ee4d0 100644 --- a/include/vki/vki-scnums-s390x-linux.h +++ b/include/vki/vki-scnums-s390x-linux.h @@ -314,6 +314,7 @@ #define __NR_seccomp 348 #define __NR_getrandom 349 #define __NR_memfd_create 350 +#define __NR_bpf 351 #define __NR_execveat 354 @@ -346,6 +347,10 @@ #define __NR_kexec_file_load 381 #define __NR_io_pgetevents 382 #define __NR_rseq 383 +#define __NR_semtimedop 392 +#define __NR_semctl 394 +#define __NR_shmctl 396 +#define __NR_msgctl 402 #define __NR_futex_waitv 449 #define NR_syscalls 384 |
|
From: Florian K. <fk...@so...> - 2025-09-19 15:16:21
|
https://sourceware.org/cgit/valgrind/commit/?id=c8b8f8a491b250b8b716c0460705f827ffaa2f6c commit c8b8f8a491b250b8b716c0460705f827ffaa2f6c Author: Florian Krohm <fl...@ei...> Date: Fri Sep 19 15:15:39 2025 +0000 s390: disasm-test: Fix a few opcode specs. Namely: eedtr, eextr, esdtr, esxtr, iedtr, iextr, rrdtr, rrxtr Wrong register class was used. binutils 2.44 let that slide by. 2.45 does not. Diff: --- none/tests/s390x/disasm-test/opcode.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/none/tests/s390x/disasm-test/opcode.c b/none/tests/s390x/disasm-test/opcode.c index e98a5e9e5e..df8ca7e8c0 100644 --- a/none/tests/s390x/disasm-test/opcode.c +++ b/none/tests/s390x/disasm-test/opcode.c @@ -1157,12 +1157,12 @@ static const char *opcodes[] = { "dxtr f1:{0,1,4,5,8,9,12,13},f2:{0,1,4,5,8,9,12,13},f3:{0,1,4,5,8,9,12,13}", "ddtra f1,f2,f3,m4", "dxtra f1:{0,1,4,5,8,9,12,13},f2:{0,1,4,5,8,9,12,13},f3:{0,1,4,5,8,9,12,13},m4", - "eedtr f1,f2", - "eextr f1,f2:{0,1,4,5,8,9,12,13}", - "esdtr f1,f2", - "esxtr f1,f2:{0,1,4,5,8,9,12,13}", - "iedtr f1,f3,f2", - "iextr f1:{0,1,4,5,8,9,12,13},f3:{0,1,4,5,8,9,12,13},f2", + "eedtr r1,f2", + "eextr r1,f2:{0,1,4,5,8,9,12,13}", + "esdtr r1,f2", + "esxtr r1,f2:{0,1,4,5,8,9,12,13}", + "iedtr f1,f3,r2", + "iextr f1:{0,1,4,5,8,9,12,13},f3:{0,1,4,5,8,9,12,13},r2", "ltdtr f1,f2", "ltxtr f1:{0,1,4,5,8,9,12,13},f2:{0,1,4,5,8,9,12,13}", // fidtr not implemented @@ -1177,8 +1177,8 @@ static const char *opcodes[] = { "mxtra f1:{0,1,4,5,8,9,12,13},f2:{0,1,4,5,8,9,12,13},f3:{0,1,4,5,8,9,12,13},m4", "qadtr f1,f3,f2,m4", "qaxtr f1:{0,1,4,5,8,9,12,13},f3:{0,1,4,5,8,9,12,13},f2:{0,1,4,5,8,9,12,13},m4", - "rrdtr f1,f3,f2,m4", - "rrxtr f1:{0,1,4,5,8,9,12,13},f3:{0,1,4,5,8,9,12,13},f2,m4", + "rrdtr f1,f3,r2,m4", + "rrxtr f1:{0,1,4,5,8,9,12,13},f3:{0,1,4,5,8,9,12,13},r2,m4", "sldt f1,f3,d12(x2,b2)", "slxt f1:{0,1,4,5,8,9,12,13},f3:{0,1,4,5,8,9,12,13},d12(x2,b2)", "srdt f1,f3,d12(x2,b2)", |