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
(129) |
Nov
(102) |
Dec
(83) |
|
From: Paul F. <pa...@so...> - 2025-11-27 12:26:53
|
https://sourceware.org/cgit/valgrind/commit/?id=65165ae36f7048542c34813da20e2b608409900d commit 65165ae36f7048542c34813da20e2b608409900d Author: Paul Floyd <pj...@wa...> Date: Thu Nov 27 13:26:20 2025 +0100 Add missing massif filter file Diff: --- massif/tests/filter_ignore_fn | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/massif/tests/filter_ignore_fn b/massif/tests/filter_ignore_fn new file mode 100755 index 0000000000..2b524f08ba --- /dev/null +++ b/massif/tests/filter_ignore_fn @@ -0,0 +1,5 @@ +#! /bin/sh + +awk '/Massif arguments/{gsub(/ unsigned int/, "uint")}{print}' | +# unmangled C++ names can contain spaces so the above filter removes themn first +awk '{gsub(/ --ignore-fn=[^ ]*/, ""); print}' |
|
From: Paul F. <pa...@so...> - 2025-11-27 12:19:39
|
https://sourceware.org/cgit/valgrind/commit/?id=dbf8d4d9bc3eba8c692782cb825f326f3a993058 commit dbf8d4d9bc3eba8c692782cb825f326f3a993058 Author: Paul Floyd <pj...@wa...> Date: Thu Nov 27 13:14:43 2025 +0100 Massif regtest: filter ignore functions, part 1 This is mainly for Darwin which has numerous leaks that need to be ignored. This filter removes all --ignore-fn options from the "out" expecteds. This should allow adding endless functions to ignore in the vgtest files without having to also update the out.exp files as well. Part 2 will be for the verbose output which adds ignore files to the stderr.exp references. Diff: --- massif/tests/Makefile.am | 2 +- massif/tests/alloc-fns-A.post.exp | 2 +- massif/tests/alloc-fns-A.vgtest | 2 +- massif/tests/alloc-fns-B.post.exp | 2 +- massif/tests/alloc-fns-B.vgtest | 2 +- massif/tests/basic.post.exp | 2 +- massif/tests/basic.vgtest | 2 +- massif/tests/basic2.post.exp | 2 +- massif/tests/basic2.vgtest | 2 +- massif/tests/big-alloc.post.exp | 2 +- massif/tests/big-alloc.post.exp-64bit | 2 +- massif/tests/big-alloc.post.exp-ppc64 | 2 +- massif/tests/big-alloc.post.exp-x86-freebsd | 2 +- massif/tests/big-alloc.vgtest | 2 +- massif/tests/bug469146.post.exp | 2 +- massif/tests/bug469146.vgtest | 2 +- massif/tests/custom_alloc.post.exp | 2 +- massif/tests/custom_alloc.vgtest | 2 +- massif/tests/deep-A.post.exp | 2 +- massif/tests/deep-A.vgtest | 2 +- massif/tests/deep-B.post.exp | 2 +- massif/tests/deep-B.vgtest | 2 +- massif/tests/deep-C.post.exp | 2 +- massif/tests/deep-C.vgtest | 2 +- massif/tests/deep-D.post.exp | 2 +- massif/tests/deep-D.vgtest | 2 +- massif/tests/ignored.post.exp | 2 +- massif/tests/ignored.vgtest | 2 +- massif/tests/ignoring.post.exp | 2 +- massif/tests/ignoring.vgtest | 2 +- massif/tests/inlinfomalloc.post.exp | 2 +- massif/tests/inlinfomalloc.vgtest | 2 +- massif/tests/insig.post.exp | 2 +- massif/tests/insig.vgtest | 2 +- massif/tests/long-names.post.exp | 2 +- massif/tests/long-names.vgtest | 2 +- massif/tests/long-time.post.exp | 2 +- massif/tests/long-time.vgtest | 2 +- massif/tests/mmapunmap.vgtest | 2 +- massif/tests/new-cpp.post.exp | 2 +- massif/tests/new-cpp.vgtest | 2 +- massif/tests/no-stack-no-heap.post.exp | 2 +- massif/tests/no-stack-no-heap.vgtest | 2 +- massif/tests/null.post.exp | 2 +- massif/tests/null.vgtest | 2 +- massif/tests/one.post.exp | 2 +- massif/tests/one.post.exp2 | 2 +- massif/tests/one.vgtest | 2 +- massif/tests/overloaded-new.post.exp | 2 +- massif/tests/overloaded-new.post.exp-mips32 | 2 +- massif/tests/overloaded-new.vgtest | 2 +- massif/tests/pages_as_heap.vgtest | 2 +- massif/tests/peak.post.exp | 2 +- massif/tests/peak.vgtest | 2 +- massif/tests/peak2.post.exp | 2 +- massif/tests/peak2.vgtest | 2 +- massif/tests/realloc.post.exp | 2 +- massif/tests/realloc.vgtest | 2 +- massif/tests/thresholds_0_0.post.exp | 2 +- massif/tests/thresholds_0_0.vgtest | 2 +- massif/tests/thresholds_0_10.post.exp | 2 +- massif/tests/thresholds_0_10.vgtest | 2 +- massif/tests/thresholds_10_0.post.exp | 2 +- massif/tests/thresholds_10_0.vgtest | 2 +- massif/tests/thresholds_10_10.post.exp | 2 +- massif/tests/thresholds_10_10.vgtest | 3 ++- massif/tests/thresholds_5_0.post.exp | 2 +- massif/tests/thresholds_5_0.vgtest | 3 ++- massif/tests/thresholds_5_10.post.exp | 2 +- massif/tests/thresholds_5_10.vgtest | 3 ++- massif/tests/zero1.post.exp | 2 +- massif/tests/zero1.vgtest | 3 ++- massif/tests/zero2.post.exp | 2 +- massif/tests/zero2.vgtest | 2 +- 74 files changed, 78 insertions(+), 74 deletions(-) diff --git a/massif/tests/Makefile.am b/massif/tests/Makefile.am index 515913e3ce..a79373876f 100644 --- a/massif/tests/Makefile.am +++ b/massif/tests/Makefile.am @@ -1,7 +1,7 @@ include $(top_srcdir)/Makefile.tool-tests.am -dist_noinst_SCRIPTS = filter_stderr filter_verbose filter_new_aligned +dist_noinst_SCRIPTS = filter_stderr filter_verbose filter_new_aligned filter_ignore_fn EXTRA_DIST = \ alloc-fns-A.post.exp alloc-fns-A.stderr.exp alloc-fns-A.vgtest \ diff --git a/massif/tests/alloc-fns-A.post.exp b/massif/tests/alloc-fns-A.post.exp index 3fcb17db4c..5d44e96add 100644 --- a/massif/tests/alloc-fns-A.post.exp +++ b/massif/tests/alloc-fns-A.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./alloc-fns -Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/alloc-fns-A.vgtest b/massif/tests/alloc-fns-A.vgtest index fcfaec5085..a605a9b31d 100644 --- a/massif/tests/alloc-fns-A.vgtest +++ b/massif/tests/alloc-fns-A.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/alloc-fns-B.post.exp b/massif/tests/alloc-fns-B.post.exp index dc5679dddc..55f7cf740d 100644 --- a/massif/tests/alloc-fns-B.post.exp +++ b/massif/tests/alloc-fns-B.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./alloc-fns -Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --alloc-fn=a4 --alloc-fn=b4 --alloc-fn=b3 --alloc-fn=c4 --alloc-fn=c3 --alloc-fn=c2 --alloc-fn=d4 --alloc-fn=d3 --alloc-fn=d2 --alloc-fn=d1 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --alloc-fn=a4 --alloc-fn=b4 --alloc-fn=b3 --alloc-fn=c4 --alloc-fn=c3 --alloc-fn=c2 --alloc-fn=d4 --alloc-fn=d3 --alloc-fn=d2 --alloc-fn=d1 --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/alloc-fns-B.vgtest b/massif/tests/alloc-fns-B.vgtest index 9ec545cadd..24da5ad029 100644 --- a/massif/tests/alloc-fns-B.vgtest +++ b/massif/tests/alloc-fns-B.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --time-unit=B --heap-admin=0 --alloc-fn=a4 --alloc-fn=b4 --a vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/basic.post.exp b/massif/tests/basic.post.exp index 7ffcfb5803..4e0b08ec99 100644 --- a/massif/tests/basic.post.exp +++ b/massif/tests/basic.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./basic -Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/basic.vgtest b/massif/tests/basic.vgtest index 2508ad91f0..6a67f8a607 100644 --- a/massif/tests/basic.vgtest +++ b/massif/tests/basic.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/basic2.post.exp b/massif/tests/basic2.post.exp index 820e7e51bc..257aaec674 100644 --- a/massif/tests/basic2.post.exp +++ b/massif/tests/basic2.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./basic -Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --detailed-freq=1 --max-snapshots=10 --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --detailed-freq=1 --max-snapshots=10 --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/basic2.vgtest b/massif/tests/basic2.vgtest index 42c449b9fe..36e3118693 100644 --- a/massif/tests/basic2.vgtest +++ b/massif/tests/basic2.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out --detailed-freq=1 vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/big-alloc.post.exp b/massif/tests/big-alloc.post.exp index 6be3a661d0..d880ad9f24 100644 --- a/massif/tests/big-alloc.post.exp +++ b/massif/tests/big-alloc.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./big-alloc -Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/big-alloc.post.exp-64bit b/massif/tests/big-alloc.post.exp-64bit index a005c1c603..783ed5d630 100644 --- a/massif/tests/big-alloc.post.exp-64bit +++ b/massif/tests/big-alloc.post.exp-64bit @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./big-alloc -Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/big-alloc.post.exp-ppc64 b/massif/tests/big-alloc.post.exp-ppc64 index c33c3a8d26..e85493a5d2 100644 --- a/massif/tests/big-alloc.post.exp-ppc64 +++ b/massif/tests/big-alloc.post.exp-ppc64 @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./big-alloc -Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/big-alloc.post.exp-x86-freebsd b/massif/tests/big-alloc.post.exp-x86-freebsd index 7ac5ef1f86..ad1a1ade28 100644 --- a/massif/tests/big-alloc.post.exp-x86-freebsd +++ b/massif/tests/big-alloc.post.exp-x86-freebsd @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./big-alloc -Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/big-alloc.vgtest b/massif/tests/big-alloc.vgtest index 58ee5c501e..d7242de195 100644 --- a/massif/tests/big-alloc.vgtest +++ b/massif/tests/big-alloc.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/bug469146.post.exp b/massif/tests/bug469146.post.exp index 2c3db3a79b..c04e97306b 100644 --- a/massif/tests/bug469146.post.exp +++ b/massif/tests/bug469146.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./bug469146 -Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_alloc.cc --ignore-fn=call_init.part.0 --ignore-fn=call_init --ignore-fn=pool --ignore-fn=filter_function1 --ignore-fn=filter_function2(int) --ignore-fn=filter_function3 +Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/bug469146.vgtest b/massif/tests/bug469146.vgtest index 86cc5b7d36..83a4f8779f 100644 --- a/massif/tests/bug469146.vgtest +++ b/massif/tests/bug469146.vgtest @@ -4,5 +4,5 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f vgopts: --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_alloc.cc --ignore-fn=call_init.part.0 vgopts: --ignore-fn=call_init --ignore-fn=pool vgopts: --ignore-fn=filter_function1 --ignore-fn="filter_function2(int)" --ignore-fn=filter_function3 -post: perl ../../massif/ms_print massif.out | sed 's/gcc[0-9]*/gcc/' | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | sed 's/gcc[0-9]*/gcc/' | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/custom_alloc.post.exp b/massif/tests/custom_alloc.post.exp index 1c1b014226..e66bef5887 100644 --- a/massif/tests/custom_alloc.post.exp +++ b/massif/tests/custom_alloc.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./custom_alloc -Massif arguments: --stacks=no --time-unit=B --heap-admin=16 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --heap-admin=16 --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/custom_alloc.vgtest b/massif/tests/custom_alloc.vgtest index b55c154b7b..58e68c67fe 100644 --- a/massif/tests/custom_alloc.vgtest +++ b/massif/tests/custom_alloc.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --time-unit=B --heap-admin=16 --massif-out-file=massif.out vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/deep-A.post.exp b/massif/tests/deep-A.post.exp index 13b90882a6..34f32e878f 100644 --- a/massif/tests/deep-A.post.exp +++ b/massif/tests/deep-A.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./deep -Massif arguments: --stacks=no --time-unit=B --depth=8 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --depth=8 --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/deep-A.vgtest b/massif/tests/deep-A.vgtest index 30c01ef3b4..01139e0f7c 100644 --- a/massif/tests/deep-A.vgtest +++ b/massif/tests/deep-A.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --time-unit=B --depth=8 --massif-out-file=massif.out vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/deep-B.post.exp b/massif/tests/deep-B.post.exp index 9c6bb699c5..11dddd6c0c 100644 --- a/massif/tests/deep-B.post.exp +++ b/massif/tests/deep-B.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./deep -Massif arguments: --stacks=no --time-unit=B --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --depth=8 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --depth=8 --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/deep-B.vgtest b/massif/tests/deep-B.vgtest index 5405fd7f58..75e9f10f02 100644 --- a/massif/tests/deep-B.vgtest +++ b/massif/tests/deep-B.vgtest @@ -4,5 +4,5 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create stderr_filter: filter_verbose -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/deep-C.post.exp b/massif/tests/deep-C.post.exp index 723c11c23d..3ca0b6f07b 100644 --- a/massif/tests/deep-C.post.exp +++ b/massif/tests/deep-C.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./deep -Massif arguments: --stacks=no --time-unit=B --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --depth=8 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --depth=8 --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/deep-C.vgtest b/massif/tests/deep-C.vgtest index cebcc682a7..aa592c5570 100644 --- a/massif/tests/deep-C.vgtest +++ b/massif/tests/deep-C.vgtest @@ -4,5 +4,5 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create stderr_filter: filter_verbose -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/deep-D.post.exp b/massif/tests/deep-D.post.exp index 5f639422cb..a5d205c619 100644 --- a/massif/tests/deep-D.post.exp +++ b/massif/tests/deep-D.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./deep -Massif arguments: --stacks=no --time-unit=B --alloc-fn=a1 --alloc-fn=a2 --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --alloc-fn=main --depth=20 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --alloc-fn=a1 --alloc-fn=a2 --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --alloc-fn=main --depth=20 --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/deep-D.vgtest b/massif/tests/deep-D.vgtest index 2da8ae30e1..2259b309f5 100644 --- a/massif/tests/deep-D.vgtest +++ b/massif/tests/deep-D.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --time-unit=B --alloc-fn=a1 --alloc-fn=a2 --alloc-fn=a3 --al vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ../../tests/filter_libc +post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ../../tests/filter_libc | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/ignored.post.exp b/massif/tests/ignored.post.exp index 286e9bd7b3..77e5bc17df 100644 --- a/massif/tests/ignored.post.exp +++ b/massif/tests/ignored.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./ignored -Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --ignore-fn=ignore1 --ignore-fn=ignore2 --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/ignored.vgtest b/massif/tests/ignored.vgtest index e561194f03..acd67b87a3 100644 --- a/massif/tests/ignored.vgtest +++ b/massif/tests/ignored.vgtest @@ -4,5 +4,5 @@ vgopts: --ignore-fn=ignore1 --ignore-fn=ignore2 vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/ignoring.post.exp b/massif/tests/ignoring.post.exp index 8c884a8e30..cef505e509 100644 --- a/massif/tests/ignoring.post.exp +++ b/massif/tests/ignoring.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./ignoring -Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/ignoring.vgtest b/massif/tests/ignoring.vgtest index 29c03fd322..bcaf7a8ec3 100644 --- a/massif/tests/ignoring.vgtest +++ b/massif/tests/ignoring.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/inlinfomalloc.post.exp b/massif/tests/inlinfomalloc.post.exp index a4da734384..3b3166e1cb 100644 --- a/massif/tests/inlinfomalloc.post.exp +++ b/massif/tests/inlinfomalloc.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./inlinfomalloc -Massif arguments: --stacks=no --heap-admin=0 --time-unit=B --threshold=0 --detailed-freq=6 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element +Massif arguments: --stacks=no --heap-admin=0 --time-unit=B --threshold=0 --detailed-freq=6 --massif-out-file=massif.out ms_print arguments: --threshold=0 massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/inlinfomalloc.vgtest b/massif/tests/inlinfomalloc.vgtest index 9021b926e5..a064110ce5 100644 --- a/massif/tests/inlinfomalloc.vgtest +++ b/massif/tests/inlinfomalloc.vgtest @@ -2,5 +2,5 @@ prog: inlinfomalloc vgopts: --stacks=no --heap-admin=0 --time-unit=B --threshold=0 --detailed-freq=6 --massif-out-file=massif.out vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element stderr_filter: filter_verbose -post: perl ../../massif/ms_print --threshold=0 massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print --threshold=0 massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/insig.post.exp b/massif/tests/insig.post.exp index 82f539638c..627dced49e 100644 --- a/massif/tests/insig.post.exp +++ b/massif/tests/insig.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./insig -Massif arguments: --stacks=no --time-unit=B --heap-admin=128 --massif-out-file=massif.out --threshold=0.99 --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --heap-admin=128 --massif-out-file=massif.out --threshold=0.99 --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/insig.vgtest b/massif/tests/insig.vgtest index 35ac4b1a6f..a23eedb0ef 100644 --- a/massif/tests/insig.vgtest +++ b/massif/tests/insig.vgtest @@ -4,5 +4,5 @@ vgopts: --stacks=no --time-unit=B --heap-admin=128 --massif-out-file=massif.out vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/long-names.post.exp b/massif/tests/long-names.post.exp index a45a3bc497..0bd1eea931 100644 --- a/massif/tests/long-names.post.exp +++ b/massif/tests/long-names.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./long-names -Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --detailed-freq=3 --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --detailed-freq=3 --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/long-names.vgtest b/massif/tests/long-names.vgtest index 7860172607..eff405574d 100644 --- a/massif/tests/long-names.vgtest +++ b/massif/tests/long-names.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out -- vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/long-time.post.exp b/massif/tests/long-time.post.exp index f60595c391..c36e52a7fd 100644 --- a/massif/tests/long-time.post.exp +++ b/massif/tests/long-time.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./long-time -Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/long-time.vgtest b/massif/tests/long-time.vgtest index 595ba779fc..3d038d353d 100644 --- a/massif/tests/long-time.vgtest +++ b/massif/tests/long-time.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/mmapunmap.vgtest b/massif/tests/mmapunmap.vgtest index 6605299e9c..ca10f9b041 100644 --- a/massif/tests/mmapunmap.vgtest +++ b/massif/tests/mmapunmap.vgtest @@ -2,5 +2,5 @@ prog: mmapunmap vgopts: --pages-as-heap=yes --threshold=30.0 -q vgopts: --stacks=no --time-unit=B --depth=8 --massif-out-file=massif.out vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element -post: grep -A5 -e =peak massif.out | grep -e 'main (mmapunmap.c:16)\|(below main)' | tr -s ' ' | ../../tests/filter_addresses | ../../tests/filter_libc +post: grep -A5 -e =peak massif.out | grep -e 'main (mmapunmap.c:16)\|(below main)' | tr -s ' ' | ../../tests/filter_addresses | ../../tests/filter_libc | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/new-cpp.post.exp b/massif/tests/new-cpp.post.exp index e23a9f59cc..93c57c2c3b 100644 --- a/massif/tests/new-cpp.post.exp +++ b/massif/tests/new-cpp.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./new-cpp -Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_alloc.cc --ignore-fn=call_init.part.0 --ignore-fn=call_init --ignore-fn=pool --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/new-cpp.vgtest b/massif/tests/new-cpp.vgtest index 57afa50362..19ea0db35e 100644 --- a/massif/tests/new-cpp.vgtest +++ b/massif/tests/new-cpp.vgtest @@ -5,5 +5,5 @@ vgopts: --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_allo vgopts: --ignore-fn=call_init --ignore-fn=pool # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create -post: perl ../../massif/ms_print massif.out | sed 's/gcc[0-9]*/gcc/' | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | sed 's/gcc[0-9]*/gcc/' | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/no-stack-no-heap.post.exp b/massif/tests/no-stack-no-heap.post.exp index 1f3d27ec43..b8caf841a4 100644 --- a/massif/tests/no-stack-no-heap.post.exp +++ b/massif/tests/no-stack-no-heap.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./basic -Massif arguments: --stacks=no --heap=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element +Massif arguments: --stacks=no --heap=no --time-unit=B --massif-out-file=massif.out ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/no-stack-no-heap.vgtest b/massif/tests/no-stack-no-heap.vgtest index b984fc0604..9eee9c60b6 100644 --- a/massif/tests/no-stack-no-heap.vgtest +++ b/massif/tests/no-stack-no-heap.vgtest @@ -1,5 +1,5 @@ prog: basic vgopts: --stacks=no --heap=no --time-unit=B --massif-out-file=massif.out vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/null.post.exp b/massif/tests/null.post.exp index 4e4ae81017..a346a4bb98 100644 --- a/massif/tests/null.post.exp +++ b/massif/tests/null.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./null -Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/null.vgtest b/massif/tests/null.vgtest index 73b440f8a1..89a3152fcf 100644 --- a/massif/tests/null.vgtest +++ b/massif/tests/null.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/one.post.exp b/massif/tests/one.post.exp index a0b1908b86..abffae8571 100644 --- a/massif/tests/one.post.exp +++ b/massif/tests/one.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./one -Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/one.post.exp2 b/massif/tests/one.post.exp2 index 73edd1a7c3..0455ce5527 100644 --- a/massif/tests/one.post.exp2 +++ b/massif/tests/one.post.exp2 @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./one -Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn=allocBuckets(void*, unsigned int) --ignore-fn=realizeClass(objc_class*) --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=xpc_string_create --alloc-fn=strdup --alloc-fn=_xpc_calloc --ignore-fn=xpc_array_create +Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/one.vgtest b/massif/tests/one.vgtest index bb45ac52d5..a51f019b9f 100644 --- a/massif/tests/one.vgtest +++ b/massif/tests/one.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element # Darwin ignore functions, for macOS 10.13 vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=map_images_nolock --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXH... [truncated message content] |
|
From: Martin C. <mc...@so...> - 2025-11-27 08:25:56
|
https://sourceware.org/cgit/valgrind/commit/?id=3275a177f99d36836107a425b46c84964f1ad354 commit 3275a177f99d36836107a425b46c84964f1ad354 Author: Martin Cermak <mc...@re...> Date: Thu Nov 27 09:25:07 2025 +0100 Provide missing syswraps for file_getattr and file_setattr The syscalls take fd and path. If path is absolute, fd is not used. If path is empty, fd can be AT_FDCWD or any valid fd which will be used to get/set attributes on. https://bugs.kde.org/show_bug.cgi?id=510169 Diff: --- NEWS | 1 + coregrind/m_syswrap/priv_syswrap-linux.h | 4 +++ 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 | 38 ++++++++++++++++++++++++++++ coregrind/m_syswrap/syswrap-mips32-linux.c | 2 ++ coregrind/m_syswrap/syswrap-mips64-linux.c | 2 ++ coregrind/m_syswrap/syswrap-nanomips-linux.c | 2 ++ coregrind/m_syswrap/syswrap-ppc32-linux.c | 2 ++ coregrind/m_syswrap/syswrap-ppc64-linux.c | 2 ++ coregrind/m_syswrap/syswrap-riscv64-linux.c | 2 ++ coregrind/m_syswrap/syswrap-s390x-linux.c | 2 ++ coregrind/m_syswrap/syswrap-x86-linux.c | 2 ++ include/vki/vki-linux.h | 12 +++++++++ include/vki/vki-scnums-shared-linux.h | 2 ++ 16 files changed, 79 insertions(+) diff --git a/NEWS b/NEWS index 3b76257d65..b944b1fb98 100644 --- a/NEWS +++ b/NEWS @@ -28,6 +28,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 510864 Add SSE4.1 PMAXSD and PMINSD instructions support for 32-bit x86 413369 unhandled amd64-darwin syscall: unix:151 (getpgid) 487055 memcheck/tests/x86-linux/scalar fails running in Docker +510416 Missing syswraps for file_getattr and file_setattr 511329 Darwin and FreeBSD: Move setting of carry flag out of ML_(do_syscall_for_client_WRK) 511713 Refactor syscall argument handling diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h index 21cb32829a..2c878c8c56 100644 --- a/coregrind/m_syswrap/priv_syswrap-linux.h +++ b/coregrind/m_syswrap/priv_syswrap-linux.h @@ -373,6 +373,10 @@ DECL_TEMPLATE(linux, sys_statmount); // Since Linux 6.10 DECL_TEMPLATE(linux, sys_mseal); +// Since Linux 6.17-rc1 +DECL_TEMPLATE(linux, sys_file_getattr); +DECL_TEMPLATE(linux, sys_file_setattr); + /* --------------------------------------------------------------------- Wrappers for sockets and ipc-ery. These are split into standalone procedures because x86-linux hides them inside multiplexors diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c index 234b056e58..5dccb47b3e 100644 --- a/coregrind/m_syswrap/syswrap-amd64-linux.c +++ b/coregrind/m_syswrap/syswrap-amd64-linux.c @@ -910,6 +910,8 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_statmount, sys_statmount), // 457 LINXY(__NR_listmount, sys_listmount), // 458 LINX_(__NR_mseal, sys_mseal), // 462 + LINXY(__NR_file_getattr, sys_file_getattr), // 468 + LINX_(__NR_file_setattr, sys_file_setattr), // 469 }; SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno ) diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c index 9e1b2efb48..af3ec18ddf 100644 --- a/coregrind/m_syswrap/syswrap-arm-linux.c +++ b/coregrind/m_syswrap/syswrap-arm-linux.c @@ -1080,6 +1080,8 @@ static SyscallTableEntry syscall_main_table[] = { LINXY(__NR_statmount, sys_statmount), // 457 LINXY(__NR_listmount, sys_listmount), // 458 LINX_(__NR_mseal, sys_mseal), // 462 + LINXY(__NR_file_getattr, sys_file_getattr), // 468 + LINX_(__NR_file_setattr, sys_file_setattr), // 469 }; diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c index 418c78443f..05a39ed07f 100644 --- a/coregrind/m_syswrap/syswrap-arm64-linux.c +++ b/coregrind/m_syswrap/syswrap-arm64-linux.c @@ -861,6 +861,8 @@ static SyscallTableEntry syscall_main_table[] = { LINXY(__NR_statmount, sys_statmount), // 457 LINXY(__NR_listmount, sys_listmount), // 458 LINX_(__NR_mseal, sys_mseal), // 462 + LINXY(__NR_file_getattr, sys_file_getattr), // 468 + LINX_(__NR_file_setattr, sys_file_setattr), // 469 }; diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 8bf0bab56d..e17aff6a43 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -4482,6 +4482,44 @@ POST(sys_listmount) } } +PRE(sys_file_getattr) +{ + // SYSCALL_DEFINE5(file_getattr, int, dfd, const char __user *, filename, + // struct file_attr __user *, ufattr, size_t, usize, + // unsigned int, at_flags) + // in: dfd, filename, at_flags + // out: ufattr, usize + *flags |= SfMayBlock; + PRINT("sys_file_getattr ( %ld, %#" FMT_REGWORD "x(%s), %#" + FMT_REGWORD "x, %" FMT_REGWORD "u, %#" FMT_REGWORD "x )" , + SARG1, ARG2, (HChar*)(Addr)ARG2, ARG3, ARG4, ARG5); + PRE_REG_READ5(int, "file_getattr", int, dfd, const char*, filename, + struct vki_file_attr *, ufattr, vki_size_t, usize, int, at_flags); + ML_(fd_at_check_allowed)(SARG1, (const HChar*)ARG2, "file_getattr", tid, status); + PRE_MEM_WRITE("file_getattr(ufattr)", ARG3, ARG4); +} + +POST(sys_file_getattr) +{ + POST_MEM_WRITE(ARG3, ARG4); +} + +PRE(sys_file_setattr) +{ + // SYSCALL_DEFINE5(file_setattr, int, dfd, const char __user *, filename, + // struct file_attr __user *, ufattr, size_t, usize, + // unsigned int, at_flags) + // in: dfd, filename, ufattr, usize, at_flags + *flags |= SfMayBlock; + PRINT("sys_file_setattr ( %ld, %#" FMT_REGWORD "x(%s), %#" + FMT_REGWORD "x, %" FMT_REGWORD "u, %#" FMT_REGWORD "x )" , + SARG1, ARG2, (HChar*)(Addr)ARG2, ARG3, ARG4, ARG5); + PRE_REG_READ5(int, "file_setattr", int, dfd, const char*, filename, + struct vki_file_attr *, ufattr, vki_size_t, usize, int, at_flags); + ML_(fd_at_check_allowed)(SARG1, (const HChar*)ARG2, "sys_file_setattr", tid, status); + PRE_MEM_READ("file_setattr(ufattr)", ARG3, ARG4); +} + PRE(sys_syncfs) { *flags |= SfMayBlock; diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c index 6132c9ff1a..1262449250 100644 --- a/coregrind/m_syswrap/syswrap-mips32-linux.c +++ b/coregrind/m_syswrap/syswrap-mips32-linux.c @@ -1189,6 +1189,8 @@ static SyscallTableEntry syscall_main_table[] = { LINXY(__NR_statmount, sys_statmount), // 457 LINXY(__NR_listmount, sys_listmount), // 458 LINX_(__NR_mseal, sys_mseal), // 462 + LINXY(__NR_file_getattr, sys_file_getattr), // 468 + LINX_(__NR_file_setattr, sys_file_setattr), // 469 }; SyscallTableEntry* ML_(get_linux_syscall_entry) (UInt sysno) diff --git a/coregrind/m_syswrap/syswrap-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c index 238b1cda0d..f39bb58cc1 100644 --- a/coregrind/m_syswrap/syswrap-mips64-linux.c +++ b/coregrind/m_syswrap/syswrap-mips64-linux.c @@ -800,6 +800,8 @@ static SyscallTableEntry syscall_main_table[] = { LINX_ (__NR_mseal, sys_mseal), LINX_ (__NR_futex_waitv, sys_futex_waitv), LINX_ (__NR_quotactl_fd, sys_quotactl_fd), + LINXY(__NR_file_getattr, sys_file_getattr), + LINX_(__NR_file_setattr, sys_file_setattr), }; SyscallTableEntry * ML_(get_linux_syscall_entry) ( UInt sysno ) diff --git a/coregrind/m_syswrap/syswrap-nanomips-linux.c b/coregrind/m_syswrap/syswrap-nanomips-linux.c index bb20cd7d3b..00bd2e756e 100644 --- a/coregrind/m_syswrap/syswrap-nanomips-linux.c +++ b/coregrind/m_syswrap/syswrap-nanomips-linux.c @@ -825,6 +825,8 @@ static SyscallTableEntry syscall_main_table[] = { LINXY (__NR_listmount, sys_listmount), LINX_ (__NR_mseal, sys_mseal), LINX_ (__NR_futex_waitv, sys_futex_waitv), + LINXY (__NR_file_getattr, sys_file_getattr), + LINX_ (__NR_file_setattr, sys_file_setattr), }; SyscallTableEntry* ML_(get_linux_syscall_entry) (UInt sysno) diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c index 4d7e43130c..99f71b7a66 100644 --- a/coregrind/m_syswrap/syswrap-ppc32-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c @@ -1088,6 +1088,8 @@ static SyscallTableEntry syscall_table[] = { LINXY (__NR_statmount, sys_statmount), // 457 LINXY (__NR_listmount, sys_listmount), // 458 LINX_ (__NR_mseal, sys_mseal), // 462 + LINXY (__NR_file_getattr, sys_file_getattr), // 468 + LINX_ (__NR_file_setattr, sys_file_setattr), // 469 }; SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno ) diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c index 826c87937f..e8996b6b78 100644 --- a/coregrind/m_syswrap/syswrap-ppc64-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c @@ -1066,6 +1066,8 @@ static SyscallTableEntry syscall_table[] = { LINXY (__NR_statmount, sys_statmount), // 457 LINXY (__NR_listmount, sys_listmount), // 458 LINX_ (__NR_mseal, sys_mseal), // 462 + LINXY (__NR_file_getattr, sys_file_getattr), // 468 + LINX_ (__NR_file_setattr, sys_file_setattr), // 469 }; SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno ) diff --git a/coregrind/m_syswrap/syswrap-riscv64-linux.c b/coregrind/m_syswrap/syswrap-riscv64-linux.c index 78b1b6b42d..3dbae3cb67 100644 --- a/coregrind/m_syswrap/syswrap-riscv64-linux.c +++ b/coregrind/m_syswrap/syswrap-riscv64-linux.c @@ -609,6 +609,8 @@ static SyscallTableEntry syscall_main_table[] = { LINXY(__NR_statmount, sys_statmount), /* 457 */ LINXY(__NR_listmount, sys_listmount), /* 458 */ LINX_(__NR_mseal, sys_mseal), /* 462 */ + LINXY(__NR_file_getattr, sys_file_getattr), /* 468 */ + LINX_(__NR_file_setattr, sys_file_setattr), /* 469 */ }; SyscallTableEntry* ML_(get_linux_syscall_entry)(UInt sysno) diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c index c16b69731a..d96adecde3 100644 --- a/coregrind/m_syswrap/syswrap-s390x-linux.c +++ b/coregrind/m_syswrap/syswrap-s390x-linux.c @@ -901,6 +901,8 @@ static SyscallTableEntry syscall_table[] = { LINXY (__NR_statmount, sys_statmount), // 457 LINXY (__NR_listmount, sys_listmount), // 458 LINX_ (__NR_mseal, sys_mseal), // 462 + LINXY (__NR_file_getattr, sys_file_getattr), // 468 + LINX_ (__NR_file_setattr, sys_file_setattr), // 469 }; SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno ) diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c index 423feac568..a83c02b046 100644 --- a/coregrind/m_syswrap/syswrap-x86-linux.c +++ b/coregrind/m_syswrap/syswrap-x86-linux.c @@ -1691,6 +1691,8 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_statmount, sys_statmount), // 457 LINXY(__NR_listmount, sys_listmount), // 458 LINX_(__NR_mseal, sys_mseal), // 462 + LINXY(__NR_file_getattr, sys_file_getattr), // 468 + LINX_(__NR_file_setattr, sys_file_setattr), // 469 }; SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno ) diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h index 59c4d57c8a..48aacea22f 100644 --- a/include/vki/vki-linux.h +++ b/include/vki/vki-linux.h @@ -5598,6 +5598,18 @@ struct vki_statmount { char str[]; /* Variable size part containing strings */ }; +//---------------------------------------------------------------------- +// From uapi/linux/fs.h +//---------------------------------------------------------------------- + +struct vki_file_attr { + __vki_u64 fa_xflags; /* xflags field value (get/set) */ + __vki_u32 fa_extsize; /* extsize field value (get/set)*/ + __vki_u32 fa_nextents; /* nextents field value (get) */ + __vki_u32 fa_projid; /* project identifier (get/set) */ + __vki_u32 fa_cowextsize; /* CoW extsize field value (get/set) */ +}; + /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/ diff --git a/include/vki/vki-scnums-shared-linux.h b/include/vki/vki-scnums-shared-linux.h index 8efba61690..704e6378cc 100644 --- a/include/vki/vki-scnums-shared-linux.h +++ b/include/vki/vki-scnums-shared-linux.h @@ -61,5 +61,7 @@ #define __NR_statmount 457 #define __NR_listmount 458 #define __NR_mseal 462 +#define __NR_file_getattr 468 +#define __NR_file_setattr 469 #endif |
|
From: Paul F. <pa...@so...> - 2025-11-26 20:39:21
|
https://sourceware.org/cgit/valgrind/commit/?id=7256b7bf018eb77cf37d356c8b8cdc3e2a003ed0 commit 7256b7bf018eb77cf37d356c8b8cdc3e2a003ed0 Author: Paul Floyd <pj...@wa...> Date: Wed Nov 26 21:37:10 2025 +0100 Darwin regtest: add filters for memcheck x86 sh-mem-vec128-plo* Need to bash the output to make it look like posix_memalign. Also add -q because Darwin libc is incontinent. Diff: --- .../tests/common/sh-mem-vec128-plo-no.stderr.exp-32bit-le | 11 ----------- .../tests/common/sh-mem-vec128-plo-yes.stderr.exp-32bit-le | 11 ----------- memcheck/tests/x86/sh-mem-vec128-plo-no.vgtest | 3 ++- memcheck/tests/x86/sh-mem-vec128-plo-yes.vgtest | 3 ++- 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-32bit-le b/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-32bit-le index b4cdfe84ba..630d27a694 100644 --- a/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-32bit-le +++ b/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-32bit-le @@ -1,4 +1,3 @@ - sh-mem-vec128: config: little-endian, 32-bit word size 20537 136 171 75 38 63 139 23 5 110 66 421 194 86 232 115 @@ -529,13 +528,3 @@ Invalid read of size 16 dddddddddddddddd - -HEAP SUMMARY: - in use at exit: 0 bytes in 0 blocks - total heap usage: 33 allocs, 33 frees, 82,048 bytes allocated - -For a detailed leak analysis, rerun with: --leak-check=full - -Use --track-origins=yes to see where uninitialised values come from -For lists of detected and suppressed errors, rerun with: -s -ERROR SUMMARY: 66 errors from 66 contexts (suppressed: 0 from 0) diff --git a/memcheck/tests/common/sh-mem-vec128-plo-yes.stderr.exp-32bit-le b/memcheck/tests/common/sh-mem-vec128-plo-yes.stderr.exp-32bit-le index a6bea42416..7a0cfa94ab 100644 --- a/memcheck/tests/common/sh-mem-vec128-plo-yes.stderr.exp-32bit-le +++ b/memcheck/tests/common/sh-mem-vec128-plo-yes.stderr.exp-32bit-le @@ -1,4 +1,3 @@ - sh-mem-vec128: config: little-endian, 32-bit word size 20537 136 171 75 38 63 139 23 5 110 66 421 194 86 232 115 @@ -436,13 +435,3 @@ Invalid read of size 16 dddddddddddddddd - -HEAP SUMMARY: - in use at exit: 0 bytes in 0 blocks - total heap usage: 33 allocs, 33 frees, 82,048 bytes allocated - -For a detailed leak analysis, rerun with: --leak-check=full - -Use --track-origins=yes to see where uninitialised values come from -For lists of detected and suppressed errors, rerun with: -s -ERROR SUMMARY: 51 errors from 51 contexts (suppressed: 0 from 0) diff --git a/memcheck/tests/x86/sh-mem-vec128-plo-no.vgtest b/memcheck/tests/x86/sh-mem-vec128-plo-no.vgtest index 6cc8f18f2b..ea875e008a 100644 --- a/memcheck/tests/x86/sh-mem-vec128-plo-no.vgtest +++ b/memcheck/tests/x86/sh-mem-vec128-plo-no.vgtest @@ -1,4 +1,5 @@ prog: sh-mem-vec128 prereq: ../../../tests/x86_amd64_features x86-sse args: -q -vgopts: --partial-loads-ok=no +vgopts: --partial-loads-ok=no -q +stderr_filter: ../amd64/filter_malloc_zone diff --git a/memcheck/tests/x86/sh-mem-vec128-plo-yes.vgtest b/memcheck/tests/x86/sh-mem-vec128-plo-yes.vgtest index bc2a135670..572d3c0277 100644 --- a/memcheck/tests/x86/sh-mem-vec128-plo-yes.vgtest +++ b/memcheck/tests/x86/sh-mem-vec128-plo-yes.vgtest @@ -1,4 +1,5 @@ prog: sh-mem-vec128 prereq: ../../../tests/x86_amd64_features x86-sse args: -q -vgopts: --partial-loads-ok=yes +vgopts: --partial-loads-ok=yes -q +stderr_filter: ../amd64/filter_malloc_zone |
|
From: Paul F. <pa...@so...> - 2025-11-26 20:31:18
|
https://sourceware.org/cgit/valgrind/commit/?id=9240f2d666a30549365eada1d9090aedd394eaa0 commit 9240f2d666a30549365eada1d9090aedd394eaa0 Author: Paul Floyd <pj...@wa...> Date: Wed Nov 26 21:22:51 2025 +0100 Darwin new/delete wrappers: fix on x86 Untested code is always full of surprises. Darwin x86 doesn't use size_t for the size (where 32bit size_t is unsigned int and 64but size_t is unsigned long). Instead it uses unsigned long on both platforms. That changes the mangled name. It's all 'm' for unsigned long rather than 32bit 'j' for unsigned short and 64bit 'm' for unsigned long. Diff: --- coregrind/m_replacemalloc/vg_replace_malloc.c | 101 +++----------------------- 1 file changed, 12 insertions(+), 89 deletions(-) diff --git a/coregrind/m_replacemalloc/vg_replace_malloc.c b/coregrind/m_replacemalloc/vg_replace_malloc.c index 114e922288..7d92450c4e 100644 --- a/coregrind/m_replacemalloc/vg_replace_malloc.c +++ b/coregrind/m_replacemalloc/vg_replace_malloc.c @@ -503,18 +503,11 @@ extern int * __error(void) __attribute__((weak)); #endif #elif defined(VGO_darwin) - // operator new(unsigned int) - #if VG_WORDSIZE == 4 - ALLOC_or_BOMB(VG_Z_LIBSTDCXX_SONAME, _Znwj, __builtin_new); - ALLOC_or_BOMB(VG_Z_LIBCXX_SONAME, _Znwj, __builtin_new); - ALLOC_or_BOMB(SO_SYN_MALLOC, _Znwj, __builtin_new); - #endif + // both 32bit and 64bit // operator new(unsigned long) - #if VG_WORDSIZE == 8 ALLOC_or_BOMB(VG_Z_LIBSTDCXX_SONAME, _Znwm, __builtin_new); ALLOC_or_BOMB(VG_Z_LIBCXX_SONAME, _Znwm, __builtin_new); ALLOC_or_BOMB(SO_SYN_MALLOC, _Znwm, __builtin_new); - #endif #elif defined(VGO_solaris) // operator new(unsigned int) @@ -563,16 +556,10 @@ extern int * __error(void) __attribute__((weak)); #endif #elif defined(VGO_darwin) - #if VG_WORDSIZE == 4 - ALLOC_or_BOMB_ALIGNED(VG_Z_LIBSTDCXX_SONAME, _ZnwjSt11align_val_t, __builtin_new_aligned, NewAligned); - ALLOC_or_BOMB_ALIGNED(VG_Z_LIBCXX_SONAME, _ZnwjSt11align_val_t, __builtin_new_aligned, NewAligned); - ALLOC_or_BOMB_ALIGNED(SO_SYN_MALLOC, _ZnwjSt11align_val_t, __builtin_new_aligned, NewAligned); - #endif - #if VG_WORDSIZE == 8 + // both 32bit and 64bit ALLOC_or_BOMB_ALIGNED(VG_Z_LIBSTDCXX_SONAME, _ZnwmSt11align_val_t, __builtin_new_aligned, NewAligned); ALLOC_or_BOMB_ALIGNED(VG_Z_LIBCXX_SONAME, _ZnwmSt11align_val_t, __builtin_new_aligned, NewAligned); ALLOC_or_BOMB_ALIGNED(SO_SYN_MALLOC, _ZnwmSt11align_val_t, __builtin_new_aligned, NewAligned); - #endif #elif defined(VGO_solaris) // operator new(unsigned int, std::align_val_t) @@ -623,18 +610,11 @@ extern int * __error(void) __attribute__((weak)); #endif #elif defined(VGO_darwin) - // operator new(unsigned, std::nothrow_t const&) - #if VG_WORDSIZE == 4 - ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, _ZnwjRKSt9nothrow_t, __builtin_new); - ALLOC_or_NULL(VG_Z_LIBCXX_SONAME, _ZnwjRKSt9nothrow_t, __builtin_new); - ALLOC_or_NULL(SO_SYN_MALLOC, _ZnwjRKSt9nothrow_t, __builtin_new); - #endif + // both 32bit and 64bit // operator new(unsigned long, std::nothrow_t const&) - #if VG_WORDSIZE == 8 ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, _ZnwmRKSt9nothrow_t, __builtin_new); ALLOC_or_NULL(VG_Z_LIBCXX_SONAME, _ZnwmRKSt9nothrow_t, __builtin_new); ALLOC_or_NULL(SO_SYN_MALLOC, _ZnwmRKSt9nothrow_t, __builtin_new); - #endif #elif defined(VGO_solaris) // operator new(unsigned, std::nothrow_t const&) @@ -683,16 +663,10 @@ extern int * __error(void) __attribute__((weak)); #endif #elif defined(VGO_darwin) - #if VG_WORDSIZE == 4 - ALLOC_or_NULL_ALIGNED(VG_Z_LIBSTDCXX_SONAME, _ZnwjSt11align_val_tRKSt9nothrow_t, __builtin_new_aligned, NewAligned); - ALLOC_or_NULL_ALIGNED(VG_Z_LIBCXX_SONAME, _ZnwjSt11align_val_tRKSt9nothrow_t, __builtin_new_aligned, NewAligned); - ALLOC_or_NULL_ALIGNED(SO_SYN_MALLOC, _ZnwjSt11align_val_tRKSt9nothrow_t, __builtin_new_aligned, NewAligned); - #endif - #if VG_WORDSIZE == 8 + // both 32bit and 64bit ALLOC_or_NULL_ALIGNED(VG_Z_LIBSTDCXX_SONAME, _ZnwmSt11align_val_tRKSt9nothrow_t, __builtin_new_aligned, NewAligned); ALLOC_or_NULL_ALIGNED(VG_Z_LIBCXX_SONAME, _ZnwmSt11align_val_tRKSt9nothrow_t, __builtin_new_aligned, NewAligned); ALLOC_or_NULL_ALIGNED(SO_SYN_MALLOC, _ZnwmSt11align_val_tRKSt9nothrow_t, __builtin_new_aligned, NewAligned); - #endif #elif defined(VGO_solaris) // operator new(unsigned, std::align_val_t, std::nothrow_t const&) @@ -745,18 +719,11 @@ extern int * __error(void) __attribute__((weak)); #endif #elif defined(VGO_darwin) - // operator new[](unsigned int) - #if VG_WORDSIZE == 4 - ALLOC_or_BOMB(VG_Z_LIBSTDCXX_SONAME, _Znaj, __builtin_vec_new ); - ALLOC_or_BOMB(VG_Z_LIBCXX_SONAME, _Znaj, __builtin_vec_new ); - ALLOC_or_BOMB(SO_SYN_MALLOC, _Znaj, __builtin_vec_new ); - #endif + // both 32bit and 64bit // operator new[](unsigned long) - #if VG_WORDSIZE == 8 ALLOC_or_BOMB(VG_Z_LIBSTDCXX_SONAME, _Znam, __builtin_vec_new ); ALLOC_or_BOMB(VG_Z_LIBCXX_SONAME, _Znam, __builtin_vec_new ); ALLOC_or_BOMB(SO_SYN_MALLOC, _Znam, __builtin_vec_new ); - #endif #elif defined(VGO_solaris) // operator new[](unsigned int) @@ -806,17 +773,11 @@ extern int * __error(void) __attribute__((weak)); #elif defined(VGO_darwin) - #if VG_WORDSIZE == 4 - ALLOC_or_BOMB_ALIGNED(VG_Z_LIBSTDCXX_SONAME, _ZnajSt11align_val_t, __builtin_vec_new_aligned, VecNewAligned ); - ALLOC_or_BOMB_ALIGNED(VG_Z_LIBCXX_SONAME, _ZnajSt11align_val_t, __builtin_vec_new_aligned, VecNewAligned ); - ALLOC_or_BOMB_ALIGNED(SO_SYN_MALLOC, _ZnajSt11align_val_t, __builtin_vec_new_aligned, VecNewAligned ); - #endif + // both 32bit and 64bit // operator new[](unsigned long, std::align_val_t) - #if VG_WORDSIZE == 8 ALLOC_or_BOMB_ALIGNED(VG_Z_LIBSTDCXX_SONAME, _ZnamSt11align_val_t, __builtin_vec_new_aligned, VecNewAligned ); ALLOC_or_BOMB_ALIGNED(VG_Z_LIBCXX_SONAME, _ZnamSt11align_val_t, __builtin_vec_new_aligned, VecNewAligned ); ALLOC_or_BOMB_ALIGNED(SO_SYN_MALLOC, _ZnamSt11align_val_t, __builtin_vec_new_aligned, VecNewAligned ); - #endif #elif defined(VGO_solaris) // operator new[](unsigned int, std::align_val_t) @@ -866,18 +827,11 @@ extern int * __error(void) __attribute__((weak)); #endif #elif defined(VGO_darwin) - // operator new[](unsigned, std::nothrow_t const&) - #if VG_WORDSIZE == 4 - ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, _ZnajRKSt9nothrow_t, __builtin_vec_new ); - ALLOC_or_NULL(VG_Z_LIBCXX_SONAME, _ZnajRKSt9nothrow_t, __builtin_vec_new ); - ALLOC_or_NULL(SO_SYN_MALLOC, _ZnajRKSt9nothrow_t, __builtin_vec_new ); - #endif + // both 32bit and 64bit // operator new[](unsigned long, std::nothrow_t const&) - #if VG_WORDSIZE == 8 ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, _ZnamRKSt9nothrow_t, __builtin_vec_new ); ALLOC_or_NULL(VG_Z_LIBCXX_SONAME, _ZnamRKSt9nothrow_t, __builtin_vec_new ); ALLOC_or_NULL(SO_SYN_MALLOC, _ZnamRKSt9nothrow_t, __builtin_vec_new ); - #endif #elif defined(VGO_solaris) // operator new[](unsigned, std::nothrow_t const&) @@ -927,17 +881,10 @@ extern int * __error(void) __attribute__((weak)); #elif defined(VGO_darwin) - #if VG_WORDSIZE == 4 - ALLOC_or_NULL_ALIGNED(VG_Z_LIBSTDCXX_SONAME, _ZnajSt11align_val_tRKSt9nothrow_t, __builtin_vec_new_aligned, VecNewAligned ); - ALLOC_or_NULL_ALIGNED(VG_Z_LIBCXX_SONAME, _ZnajSt11align_val_tRKSt9nothrow_t, __builtin_vec_new_aligned, VecNewAligned ); - ALLOC_or_NULL_ALIGNED(SO_SYN_MALLOC, _ZnajSt11align_val_tRKSt9nothrow_t, __builtin_vec_new_aligned, VecNewAligned ); - #endif - // operator new[](unsigned long, std::align_val_t, std::nothrow_t const&) - #if VG_WORDSIZE == 8 + // both 32bit and 64bit ALLOC_or_NULL_ALIGNED(VG_Z_LIBSTDCXX_SONAME, _ZnamSt11align_val_tRKSt9nothrow_t, __builtin_vec_new_aligned, VecNewAligned ); ALLOC_or_NULL_ALIGNED(VG_Z_LIBCXX_SONAME, _ZnamSt11align_val_tRKSt9nothrow_t, __builtin_vec_new_aligned, VecNewAligned ); ALLOC_or_NULL_ALIGNED(SO_SYN_MALLOC, _ZnamSt11align_val_tRKSt9nothrow_t, __builtin_vec_new_aligned, VecNewAligned ); - #endif #elif defined(VGO_solaris) // operator new[](unsigned int, std::align_val_t, std::nothrow_t const&) @@ -1198,17 +1145,11 @@ extern int * __error(void) __attribute__((weak)); #endif #elif defined(VGO_darwin) - // operator delete(void*, unsigned int) -#if __SIZEOF_SIZE_T__ == 4 - DELETE_SIZED(VG_Z_LIBSTDCXX_SONAME, _ZdlPvj, __builtin_delete, DeleteSized ); - DELETE_SIZED(VG_Z_LIBCXX_SONAME, _ZdlPvj, __builtin_delete, DeleteSized ); - DELETE_SIZED(SO_SYN_MALLOC, _ZdlPvj, __builtin_delete, DeleteSized ); -#elif __SIZEOF_SIZE_T__ == 8 + // both 32bit and 64bit // operator delete(void*, unsigned long) DELETE_SIZED(VG_Z_LIBSTDCXX_SONAME, _ZdlPvm, __builtin_delete, DeleteSized ); DELETE_SIZED(VG_Z_LIBCXX_SONAME, _ZdlPvm, __builtin_delete, DeleteSized ); DELETE_SIZED(SO_SYN_MALLOC, _ZdlPvm, __builtin_delete, DeleteSized ); -#endif #elif defined(VGO_solaris) // operator delete(void*, unsigned long) @@ -1307,17 +1248,10 @@ extern int * __error(void) __attribute__((weak)); DELETE_ALIGNED(VG_Z_LIBCXX_SONAME, _ZdlPvSt11align_val_t, __builtin_delete_aligned, DeleteAligned ); DELETE_ALIGNED(SO_SYN_MALLOC, _ZdlPvSt11align_val_t, __builtin_delete_aligned, DeleteAligned ); - // operator delete(void*, unsigned int, std::align_val_t) -#if __SIZEOF_SIZE_T__ == 4 - DELETE_SIZED_ALIGNED(VG_Z_LIBSTDCXX_SONAME, _ZdlPvjSt11align_val_t, __builtin_delete_aligned, DeleteSizedAligned ); - DELETE_SIZED_ALIGNED(VG_Z_LIBCXX_SONAME, _ZdlPvjSt11align_val_t, __builtin_delete_aligned, DeleteSizedAligned ); - DELETE_SIZED_ALIGNED(SO_SYN_MALLOC, _ZdlPvjSt11align_val_t, __builtin_delete_aligned, DeleteSizedAligned ); - // operator delete(void*, unsigned long, std::align_val_t) -#elif __SIZEOF_SIZE_T__ == 8 + // both 32bit and 64bit DELETE_SIZED_ALIGNED(VG_Z_LIBSTDCXX_SONAME, _ZdlPvmSt11align_val_t, __builtin_delete_aligned, DeleteSizedAligned ); DELETE_SIZED_ALIGNED(VG_Z_LIBCXX_SONAME, _ZdlPvmSt11align_val_t, __builtin_delete_aligned, DeleteSizedAligned ); DELETE_SIZED_ALIGNED(SO_SYN_MALLOC, _ZdlPvmSt11align_val_t, __builtin_delete_aligned, DeleteSizedAligned ); -#endif #elif defined(VGO_solaris) @@ -1461,15 +1395,10 @@ extern int * __error(void) __attribute__((weak)); #elif defined(VGO_darwin) - #if __SIZEOF_SIZE_T__ == 4 - DELETE_SIZED(VG_Z_LIBSTDCXX_SONAME, _ZdaPvj, __builtin_vec_delete, VecDeleteSized ); - DELETE_SIZED(VG_Z_LIBCXX_SONAME, _ZdaPvj, __builtin_vec_delete, VecDeleteSized ); - DELETE_SIZED(SO_SYN_MALLOC, _ZdaPvj, __builtin_vec_delete, VecDeleteSized ); - #elif __SIZEOF_SIZE_T__ == 8 + // both 32bit and 64bit DELETE_SIZED(VG_Z_LIBSTDCXX_SONAME, _ZdaPvm, __builtin_vec_delete, VecDeleteSized ); DELETE_SIZED(VG_Z_LIBCXX_SONAME, _ZdaPvm, __builtin_vec_delete, VecDeleteSized ); DELETE_SIZED(SO_SYN_MALLOC, _ZdaPvm, __builtin_vec_delete, VecDeleteSized ); - #endif #elif defined(VGO_solaris) // operator delete[](void*, unsigned int) @@ -1532,17 +1461,11 @@ extern int * __error(void) __attribute__((weak)); DELETE_ALIGNED(VG_Z_LIBCXX_SONAME, _ZdaPvSt11align_val_t, __builtin_vec_delete_aligned, VecDeleteAligned ); DELETE_ALIGNED(SO_SYN_MALLOC, _ZdaPvSt11align_val_t, __builtin_vec_delete_aligned, VecDeleteAligned ); - // operator delete[](void*, unsigned int, std::align_val_t) - #if __SIZEOF_SIZE_T__ == 4 - DELETE_SIZED_ALIGNED(VG_Z_LIBSTDCXX_SONAME, _ZdaPvjSt11align_val_t, __builtin_vec_delete_aligned, VecDeleteSizedAligned ); - DELETE_SIZED_ALIGNED(VG_Z_LIBCXX_SONAME, _ZdaPvjSt11align_val_t, __builtin_vec_delete_aligned, VecDeleteSizedAligned ); - DELETE_SIZED_ALIGNED(SO_SYN_MALLOC, _ZdaPvjSt11align_val_t, __builtin_vec_delete_aligned, VecDeleteSizedAligned ); + // both 32bit and 64bit // operator delete[](void*, unsigned long, std::align_val_t) - #elif __SIZEOF_SIZE_T__ == 8 DELETE_SIZED_ALIGNED(VG_Z_LIBSTDCXX_SONAME, _ZdaPvmSt11align_val_t, __builtin_vec_delete_aligned, VecDeleteSizedAligned ); DELETE_SIZED_ALIGNED(VG_Z_LIBCXX_SONAME, _ZdaPvmSt11align_val_t, __builtin_vec_delete_aligned, VecDeleteSizedAligned ); DELETE_SIZED_ALIGNED(SO_SYN_MALLOC, _ZdaPvmSt11align_val_t, __builtin_vec_delete_aligned, VecDeleteSizedAligned ); -#endif #elif defined(VGO_solaris) |
|
From: Paul F. <pa...@so...> - 2025-11-26 19:28:12
|
https://sourceware.org/cgit/valgrind/commit/?id=a0e79f983bfc042fa29eaa83ea6a4324be8935e2 commit a0e79f983bfc042fa29eaa83ea6a4324be8935e2 Author: Paul Floyd <pj...@wa...> Date: Wed Nov 26 20:27:43 2025 +0100 A few more syscall comments and doc tweaks Diff: --- coregrind/m_syswrap/syswrap-main.c | 4 ++++ docs/internals/client_syscall_arguments.txt | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-main.c b/coregrind/m_syswrap/syswrap-main.c index ff9960225f..07f1930469 100644 --- a/coregrind/m_syswrap/syswrap-main.c +++ b/coregrind/m_syswrap/syswrap-main.c @@ -1858,6 +1858,10 @@ void getSyscallArgLayout ( /*OUT*/SyscallArgLayout* layout, /*IN*/Bool syscall_s layout->uu_arg8 = -1; /* impossible value */ #elif defined(VGP_x86_freebsd) + // libc converts syscall_syscall to canonical form + // (it just needs to pop the ret address, pop the sysno into eax + // do the syscall + // and push back the ret address) layout->o_sysno = OFFSET_x86_EAX; // syscall parameters are on stack in C convention layout->s_arg1 = sizeof(UWord) * 1; diff --git a/docs/internals/client_syscall_arguments.txt b/docs/internals/client_syscall_arguments.txt index 1ef113db84..233d332122 100644 --- a/docs/internals/client_syscall_arguments.txt +++ b/docs/internals/client_syscall_arguments.txt @@ -56,6 +56,7 @@ This stores the canonical arguments (syscall syscall format gets shuffled) in the SyscallArgs structure. 2. Get the syscall argument layout +Call getSyscallArgLayout() This just initialises the fields of the SyscallArgLayout structure. The layout will be different depending if it is a normal syscall or a syscall syscall. It cannot be canonicalised - we can shuffle around the values but we can't @@ -83,7 +84,7 @@ This is the more complicated of the two as we need to release the global lock, change to using the guest signal mask, do the syscall, restore the Valgrind signal mask and request the global lock again. -A call to putSyscallArgsIntoGuestState is made. The PRE may have changed +A call to putSyscallArgsIntoGuestState() is made. The PRE may have changed some of the arguments so we need to put the arguments back into VexGuestArchState. @@ -93,7 +94,7 @@ from VexGuestArchState. 6. Perform a non-blocking syscall. -This is much simpler. It performs the syscall via VG_(do_syscall). +This is much simpler. It performs the syscall via VG_(do_syscall)(). The arguments are passed via struct SyscallArgs (possibly modified by the PRE wrapper). |
|
From: Paul F. <pa...@so...> - 2025-11-26 19:26:40
|
https://sourceware.org/cgit/valgrind/commit/?id=8e935144655b94efc121b8432c4f5653e3cc2c01 commit 8e935144655b94efc121b8432c4f5653e3cc2c01 Author: Paul Floyd <pj...@wa...> Date: Wed Nov 26 20:25:10 2025 +0100 Darwin: fix x86 build and client syscall Diff: --- cachegrind/tests/x86/fpu-28-108.S | 3 +++ coregrind/m_replacemalloc/vg_replace_malloc.c | 2 +- coregrind/m_syswrap/syswrap-main.c | 2 +- coregrind/m_syswrap/syswrap-x86-darwin.c | 4 ++-- memcheck/tests/x86/pushfpopf_s.S | 2 ++ memcheck/tests/x86/tronical.S | 2 ++ none/tests/x86/cpuid_s.S | 3 +++ 7 files changed, 14 insertions(+), 4 deletions(-) diff --git a/cachegrind/tests/x86/fpu-28-108.S b/cachegrind/tests/x86/fpu-28-108.S index cb770f818e..7f99387ff8 100644 --- a/cachegrind/tests/x86/fpu-28-108.S +++ b/cachegrind/tests/x86/fpu-28-108.S @@ -24,5 +24,8 @@ VG_SYM_ASM(main): movl $0, %eax ret +#if !defined(VGO_darwin) .section .note.GNU-stack,"",@progbits +#endif + diff --git a/coregrind/m_replacemalloc/vg_replace_malloc.c b/coregrind/m_replacemalloc/vg_replace_malloc.c index 5f3aec0f05..114e922288 100644 --- a/coregrind/m_replacemalloc/vg_replace_malloc.c +++ b/coregrind/m_replacemalloc/vg_replace_malloc.c @@ -1883,7 +1883,7 @@ extern int * __error(void) __attribute__((weak)); VERIFY_ALIGNMENT(&aligned_alloc_info); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord)zone); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(n); \ - MALLOC_TRACE("zone_memalign(%p, %lu, %u)", zone, \ + MALLOC_TRACE("zone_memalign(%p, %lu, %lu)", zone, \ alignment, n); \ \ if (alignment == 0 || alignment % sizeof(void*) != 0 || \ diff --git a/coregrind/m_syswrap/syswrap-main.c b/coregrind/m_syswrap/syswrap-main.c index 82f3adc5da..ff9960225f 100644 --- a/coregrind/m_syswrap/syswrap-main.c +++ b/coregrind/m_syswrap/syswrap-main.c @@ -2296,7 +2296,7 @@ void VG_(client_syscall) ( ThreadId tid, UInt trc ) /* Save the syscall number in the thread state in case the syscall is interrupted by a signal. */ canonical_sysno = sci->orig_args.canonical_sysno; -#if defined(VGO_freebsd) || defined(VGO_darwin) +#if defined(VGO_freebsd) || defined(VGP_amd64_darwin) original_sysno = sci->orig_args.original_sysno; #else /* diff --git a/coregrind/m_syswrap/syswrap-x86-darwin.c b/coregrind/m_syswrap/syswrap-x86-darwin.c index 7459ef83a2..97c044f77e 100644 --- a/coregrind/m_syswrap/syswrap-x86-darwin.c +++ b/coregrind/m_syswrap/syswrap-x86-darwin.c @@ -375,8 +375,8 @@ asm( To handle this in valgrind, we create and destroy a valgrind thread for every work item. */ -void wqthread_hijack(Addr self, Addr kport, Addr stackaddr, Addr workitem, - Int reuse, Addr sp) +void wqthread_hijack(Addr self, Addr kport, Addr stackaddr, Addr workitem, + UInt reuse, Int kevent_count, Addr sp) { ThreadState *tst; VexGuestX86State *vex; diff --git a/memcheck/tests/x86/pushfpopf_s.S b/memcheck/tests/x86/pushfpopf_s.S index 3cdd64d569..5fef88e144 100644 --- a/memcheck/tests/x86/pushfpopf_s.S +++ b/memcheck/tests/x86/pushfpopf_s.S @@ -46,5 +46,7 @@ theend: .size VG_SYM_ASM(fooble),.Lfe1-VG_SYM_ASM(fooble) #endif .ident "GCC: (GNU) 2.96 20000731 (Red Hat Linux 7.1 2.96-98)" +#if !defined(VGO_darwin) .section .note.GNU-stack,"",@progbits +#endif diff --git a/memcheck/tests/x86/tronical.S b/memcheck/tests/x86/tronical.S index 60427c1c2f..52adfd82bd 100644 --- a/memcheck/tests/x86/tronical.S +++ b/memcheck/tests/x86/tronical.S @@ -104,5 +104,7 @@ VG_SYM_ASM(main): .Lfe3: .comm foo,4,4 .ident "GCC: (GNU) 2.96 20000731 (Red Hat Linux 7.1 2.96-98)" +#if !defined(VGO_darwin) .section .note.GNU-stack,"",@progbits +#endif diff --git a/none/tests/x86/cpuid_s.S b/none/tests/x86/cpuid_s.S index e5012cc92d..8f8c9611d1 100644 --- a/none/tests/x86/cpuid_s.S +++ b/none/tests/x86/cpuid_s.S @@ -71,5 +71,8 @@ VG_SYM_ASM(get_cpuid1): .ident "GCC: (GNU) 2.96 20000731 (Red Hat Linux 7.1 2.96-98)" +#if !defined(VGO_darwin) .section .note.GNU-stack,"",@progbits +#endif + |
|
From: Alexandra H. <aha...@so...> - 2025-11-26 19:19:14
|
https://sourceware.org/cgit/valgrind/commit/?id=e2a244aceb31680d5314afe1a25ad7f6f664dc28 commit e2a244aceb31680d5314afe1a25ad7f6f664dc28 Author: Alexandra Hájková <aha...@re...> Date: Tue Nov 11 07:34:10 2025 -0500 Add pmaxsd and pminsd support for x86 32 bit Support pmaxsd and pminsd instructions in guest_x86_toIR.c and host_x86_isel.c and modify the none/tests/x86/sse4-x86.stdout.exp to match pmaxsd and pminsd support. Diff: --- NEWS | 1 + VEX/priv/guest_x86_toIR.c | 22 +++++++++++++++++++++ VEX/priv/host_x86_isel.c | 6 ++++++ none/tests/amd64/sse4-64.c | 11 ----------- none/tests/sse4-common.h | 11 +++++++++++ none/tests/x86/sse4-x86.c | 1 + none/tests/x86/sse4-x86.stdout.exp | 40 ++++++++++++++++++++++++++++++++++++++ 7 files changed, 81 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index 252c8e8ec0..3b76257d65 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,7 @@ bugzilla (https://bugs.kde.org/enter_bug.cgi?product=valgrind) rather than mailing the developers (or mailing lists) directly -- bugs that are not entered into bugzilla tend to get forgotten about or ignored. +510864 Add SSE4.1 PMAXSD and PMINSD instructions support for 32-bit x86 413369 unhandled amd64-darwin syscall: unix:151 (getpgid) 487055 memcheck/tests/x86-linux/scalar fails running in Docker 511329 Darwin and FreeBSD: Move setting of carry flag out of diff --git a/VEX/priv/guest_x86_toIR.c b/VEX/priv/guest_x86_toIR.c index 8ecfad155c..a91551f562 100644 --- a/VEX/priv/guest_x86_toIR.c +++ b/VEX/priv/guest_x86_toIR.c @@ -12995,6 +12995,26 @@ DisResult disInstr_X86_WRK ( goto decode_success; } + /* 66 0F 38 39 /r - PMINSD xmm1, xmm2/m128 + 66 0F 38 3D /r - PMAXSD xmm1, xmm2/m128 + 66 prefix (sz == 2): SSE2/SSE4 XMM instructions (128-bit) + 0F 38 is the secondary escape used for SSSE3, SSE4, and later extensions + 39 = PMINSD (minimum of packed signed 32-bit integers) + 3D = PMAXSD (maximum of packed signed 32-bit integers) + reference: Intel Software Developer Manual (Volume 2: Instruction Set Reference) */ + if (sz == 2 + && insn[0] == 0x0F && insn[1] == 0x38 + && (insn[2] == 0x39 || insn[2] == 0x3D)) { + Bool isMAX = insn[2] == 0x3D; + delta = dis_SSEint_E_to_G( + sorb, delta+3, + isMAX ? "pmaxsd" : "pminsd", + isMAX ? Iop_Max32Sx4 : Iop_Min32Sx4, + False + ); + goto decode_success; + } + /* 66 0F 3A 0B /r ib = ROUNDSD imm8, xmm2/m64, xmm1 (Partial implementation only -- only deal with cases where the rounding mode is specified directly by the immediate byte.) @@ -13072,6 +13092,8 @@ DisResult disInstr_X86_WRK ( nameIReg(sz, gregOfRM(modrm))); } + + IRTemp res = gen_LZCNT(ty, src); putIReg(sz, gregOfRM(modrm), mkexpr(res)); diff --git a/VEX/priv/host_x86_isel.c b/VEX/priv/host_x86_isel.c index 6559ad51de..0dbd0fb8a2 100644 --- a/VEX/priv/host_x86_isel.c +++ b/VEX/priv/host_x86_isel.c @@ -3867,6 +3867,12 @@ static HReg iselVecExpr_wrk ( ISelEnv* env, const IRExpr* e ) case Iop_NarrowBin16to8x16: fn = (HWord)h_generic_calc_NarrowBin16to8x16; goto do_SseAssistedBinary; + case Iop_Max32Sx4: + fn = (HWord)h_generic_calc_Max32Sx4; + goto do_SseAssistedBinary; + case Iop_Min32Sx4: + fn = (HWord)h_generic_calc_Min32Sx4; + goto do_SseAssistedBinary; do_SseAssistedBinary: { /* As with the amd64 case (where this is copied from) we generate pretty bad code. */ diff --git a/none/tests/amd64/sse4-64.c b/none/tests/amd64/sse4-64.c index 7048f96f67..fc30963448 100644 --- a/none/tests/amd64/sse4-64.c +++ b/none/tests/amd64/sse4-64.c @@ -1536,17 +1536,6 @@ void test_PMINSB ( void ) } } -void test_PMINSD ( void ) -{ - V128 src, dst; - Int i; - for (i = 0; i < 10; i++) { - randV128(&src); - randV128(&dst); - DO_mandr_r("pminsd", src, dst); - } -} - void test_PMINUD ( void ) { V128 src, dst; diff --git a/none/tests/sse4-common.h b/none/tests/sse4-common.h index 1e08218b5e..e3341186bd 100644 --- a/none/tests/sse4-common.h +++ b/none/tests/sse4-common.h @@ -263,4 +263,15 @@ static inline void test_PMAXSD ( void ) } } +static inline void test_PMINSD ( void ) +{ + V128 src, dst; + Int i; + for (i = 0; i < 10; i++) { + randV128(&src); + randV128(&dst); + DO_mandr_r("pminsd", src, dst); + } +} + #endif /* __SSE4_COMMON_H */ diff --git a/none/tests/x86/sse4-x86.c b/none/tests/x86/sse4-x86.c index 7e4189852f..f47f185bf6 100644 --- a/none/tests/x86/sse4-x86.c +++ b/none/tests/x86/sse4-x86.c @@ -105,6 +105,7 @@ int main(void) // ------ SSE 4.1 ------ test_PINSRD(); test_PMAXSD(); + test_PMINSD(); return 0; } diff --git a/none/tests/x86/sse4-x86.stdout.exp b/none/tests/x86/sse4-x86.stdout.exp index 9642a37561..99822c46cf 100644 --- a/none/tests/x86/sse4-x86.stdout.exp +++ b/none/tests/x86/sse4-x86.stdout.exp @@ -6,3 +6,43 @@ r pinsrd $2 3bd127afa6e9c369 55555555555555555555555555555555 55555555a6e9c3 m pinsrd $2 3bd127afa6e9c369 55555555555555555555555555555555 55555555a6e9c3695555555555555555 r pinsrd $3 0d6a95fac528657d 55555555555555555555555555555555 c528657d555555555555555555555555 m pinsrd $3 0d6a95fac528657d 55555555555555555555555555555555 c528657d555555555555555555555555 +r pmaxsd 60b160857d45c48447b8d8c0eeef1e50 b6d2fb5aa7bc5127fe9915e556a044b2 60b160857d45c48447b8d8c056a044b2 +m pmaxsd 60b160857d45c48447b8d8c0eeef1e50 b6d2fb5aa7bc5127fe9915e556a044b2 60b160857d45c48447b8d8c056a044b2 +r pmaxsd 19a348215c3a67fd399182c2dbcc2d38 065d77195d623e6b842adc6450659e17 19a348215d623e6b399182c250659e17 +m pmaxsd 19a348215c3a67fd399182c2dbcc2d38 065d77195d623e6b842adc6450659e17 19a348215d623e6b399182c250659e17 +r pmaxsd d89998df5035ed364a4bc43968bc40e5 cb509970b8136c85d740b80eb7839b97 d89998df5035ed364a4bc43968bc40e5 +m pmaxsd d89998df5035ed364a4bc43968bc40e5 cb509970b8136c85d740b80eb7839b97 d89998df5035ed364a4bc43968bc40e5 +r pmaxsd f9dd4a29f8c093db56b01a12b0ca1583 5ff85bc9535c191fd3a727d1a705f65d 5ff85bc9535c191f56b01a12b0ca1583 +m pmaxsd f9dd4a29f8c093db56b01a12b0ca1583 5ff85bc9535c191fd3a727d1a705f65d 5ff85bc9535c191f56b01a12b0ca1583 +r pmaxsd d8bc5c6dee699597398e0039cf03663d 20a1bb92cbc97fe8542da4983df76c96 20a1bb92ee699597542da4983df76c96 +m pmaxsd d8bc5c6dee699597398e0039cf03663d 20a1bb92cbc97fe8542da4983df76c96 20a1bb92ee699597542da4983df76c96 +r pmaxsd d182c916cebc2e17cfaff39be272ef40 6897b536bbe4da8a369dab4f9465b86e 6897b536cebc2e17369dab4fe272ef40 +m pmaxsd d182c916cebc2e17cfaff39be272ef40 6897b536bbe4da8a369dab4f9465b86e 6897b536cebc2e17369dab4fe272ef40 +r pmaxsd 407b8d9035449b06f4e06e2205236eb7 95264321bf3b68b255c2b9e2c95c9810 407b8d9035449b0655c2b9e205236eb7 +m pmaxsd 407b8d9035449b06f4e06e2205236eb7 95264321bf3b68b255c2b9e2c95c9810 407b8d9035449b0655c2b9e205236eb7 +r pmaxsd 81f2a547be8d181184ededbc53239dcf 019963bf7459630b8d69483df7e8c6a9 019963bf7459630b8d69483d53239dcf +m pmaxsd 81f2a547be8d181184ededbc53239dcf 019963bf7459630b8d69483df7e8c6a9 019963bf7459630b8d69483d53239dcf +r pmaxsd f0350ca70523e0e45ba1ec54e87d39b3 0a3e0f7c75cb0842b95ed64d3b13ff64 0a3e0f7c75cb08425ba1ec543b13ff64 +m pmaxsd f0350ca70523e0e45ba1ec54e87d39b3 0a3e0f7c75cb0842b95ed64d3b13ff64 0a3e0f7c75cb08425ba1ec543b13ff64 +r pmaxsd e98ebd1ca893312a54cae7d5e13dfe91 0a5f45c55f1c9202b76ddefcb0ebfe6e 0a5f45c55f1c920254cae7d5e13dfe91 +m pmaxsd e98ebd1ca893312a54cae7d5e13dfe91 0a5f45c55f1c9202b76ddefcb0ebfe6e 0a5f45c55f1c920254cae7d5e13dfe91 +r pminsd c84ab713406845904d325b2d5a70a792 5f490104ced83ff86262dd37727c80f3 c84ab713ced83ff84d325b2d5a70a792 +m pminsd c84ab713406845904d325b2d5a70a792 5f490104ced83ff86262dd37727c80f3 c84ab713ced83ff84d325b2d5a70a792 +r pminsd e9b5f3f66b2e58c121a6c3476d21f1e5 63483da65c8c49d096084deb9ed0411e e9b5f3f65c8c49d096084deb9ed0411e +m pminsd e9b5f3f66b2e58c121a6c3476d21f1e5 63483da65c8c49d096084deb9ed0411e e9b5f3f65c8c49d096084deb9ed0411e +r pminsd a81b6e33c572a86aacf29b0f395c98b4 73a8f718a8c3ec352e2dac0350f6fd1c a81b6e33a8c3ec35acf29b0f395c98b4 +m pminsd a81b6e33c572a86aacf29b0f395c98b4 73a8f718a8c3ec352e2dac0350f6fd1c a81b6e33a8c3ec35acf29b0f395c98b4 +r pminsd 61c82534e9bf6f37c9e25f72d82e582b ecb42ac54b0966d4089b756aa3f77018 ecb42ac5e9bf6f37c9e25f72a3f77018 +m pminsd 61c82534e9bf6f37c9e25f72d82e582b ecb42ac54b0966d4089b756aa3f77018 ecb42ac5e9bf6f37c9e25f72a3f77018 +r pminsd 6f07136773a2ead356428c5a66a2ec77 28bad218e4ebf159ff1f240eb3e1553f 28bad218e4ebf159ff1f240eb3e1553f +m pminsd 6f07136773a2ead356428c5a66a2ec77 28bad218e4ebf159ff1f240eb3e1553f 28bad218e4ebf159ff1f240eb3e1553f +r pminsd 3026343700a654eb2ddd9db4ffc411c4 8404eb7f0cf4ca6fee8536da9dbf68bc 8404eb7f00a654ebee8536da9dbf68bc +m pminsd 3026343700a654eb2ddd9db4ffc411c4 8404eb7f0cf4ca6fee8536da9dbf68bc 8404eb7f00a654ebee8536da9dbf68bc +r pminsd ff6f850f2c57ea2a2c810e6dc1a1833d 5cdf726562b02dc2b39925ba7d9d67bc ff6f850f2c57ea2ab39925bac1a1833d +m pminsd ff6f850f2c57ea2a2c810e6dc1a1833d 5cdf726562b02dc2b39925ba7d9d67bc ff6f850f2c57ea2ab39925bac1a1833d +r pminsd 372f015d9242e83d2ef85b6fc544fd0f 0c9761367fac55ff28276f9a6e880c6b 0c9761369242e83d28276f9ac544fd0f +m pminsd 372f015d9242e83d2ef85b6fc544fd0f 0c9761367fac55ff28276f9a6e880c6b 0c9761369242e83d28276f9ac544fd0f +r pminsd 36b2a38dcef18acf0e0f01a829ba3c66 f078b65e01737fd22bfa8f668c8b14f4 f078b65ecef18acf0e0f01a88c8b14f4 +m pminsd 36b2a38dcef18acf0e0f01a829ba3c66 f078b65e01737fd22bfa8f668c8b14f4 f078b65ecef18acf0e0f01a88c8b14f4 +r pminsd 57436a097df30b8daa927a03090dfc6d 65ce6d498492e7e796df010bf4b23b84 57436a098492e7e796df010bf4b23b84 +m pminsd 57436a097df30b8daa927a03090dfc6d 65ce6d498492e7e796df010bf4b23b84 57436a098492e7e796df010bf4b23b84 |
|
From: Alexandra H. <aha...@so...> - 2025-11-26 19:19:05
|
https://sourceware.org/cgit/valgrind/commit/?id=5e584556a9b9a373426de517085ab9003a8c2e17 commit 5e584556a9b9a373426de517085ab9003a8c2e17 Author: Alexandra Hájková <aha...@re...> Date: Tue Nov 4 13:59:10 2025 -0500 Add none/tests/sse4-common.h header Refactor none/tests/amd64/sse4-64.c and none/tests/x86/sse4-x86.c to use a common none/tests/sse4-common.h header. This eliminates code redundancies and makes it easier to add new SSE4 tests for both architectures more easily. The shared header contains common helper functions, type definitions, and test macros previously duplicated in both files. Diff: --- none/tests/amd64/sse4-64.c | 242 +------------------------------------------- none/tests/sse4-common.h | 246 +++++++++++++++++++++++++++++++++++++++++++++ none/tests/x86/sse4-x86.c | 165 +----------------------------- 3 files changed, 250 insertions(+), 403 deletions(-) diff --git a/none/tests/amd64/sse4-64.c b/none/tests/amd64/sse4-64.c index 662dd52001..d795dfde51 100644 --- a/none/tests/amd64/sse4-64.c +++ b/none/tests/amd64/sse4-64.c @@ -9,158 +9,7 @@ gcc -m64 -g -O -Wall -o sse4-64 sse4-64.c */ -#include <stdio.h> -#include <stdlib.h> -#include <assert.h> -#include "tests/malloc.h" -#include <string.h> - - -typedef unsigned char V128[16]; -typedef unsigned int UInt; -typedef signed int Int; -typedef unsigned char UChar; -typedef unsigned long long int ULong; - -typedef unsigned char Bool; -#define False ((Bool)0) -#define True ((Bool)1) - - -typedef - struct { - V128 arg1; - V128 arg2; - V128 res; - } - RRArgs; - -typedef - struct { - V128 arg1; - V128 res; - } - RMArgs; - -static void do64HLtoV128 ( /*OUT*/V128* res, ULong wHi, ULong wLo ) -{ - // try to sidestep strict-aliasing snafus by memcpying explicitly - UChar* p = (UChar*)res; - memcpy(&p[8], (UChar*)&wHi, 8); - memcpy(&p[0], (UChar*)&wLo, 8); -} - -static UChar randUChar ( void ) -{ - static UInt seed = 80021; - seed = 1103515245 * seed + 12345; - return (seed >> 17) & 0xFF; -} - -static ULong randULong ( void ) -{ - Int i; - ULong r = 0; - for (i = 0; i < 8; i++) { - r = (r << 8) | (ULong)(0xFF & randUChar()); - } - return r; -} - -static void randV128 ( V128* v ) -{ - Int i; - for (i = 0; i < 16; i++) - (*v)[i] = randUChar(); -} - -static void showV128 ( V128* v ) -{ - Int i; - for (i = 15; i >= 0; i--) - printf("%02x", (Int)(*v)[i]); -} - -static void showMaskedV128 ( V128* v, V128* mask ) -{ - Int i; - for (i = 15; i >= 0; i--) - printf("%02x", (Int)( ((*v)[i]) & ((*mask)[i]) )); -} - -static void showIGVV( char* rOrM, char* op, Int imm, - ULong src64, V128* dst, V128* res ) -{ - printf("%s %10s $%d ", rOrM, op, imm); - printf("%016llx", src64); - printf(" "); - showV128(dst); - printf(" "); - showV128(res); - printf("\n"); -} - -static void showIAG ( char* rOrM, char* op, Int imm, - V128* argL, ULong argR, ULong res ) -{ - printf("%s %10s $%d ", rOrM, op, imm); - showV128(argL); - printf(" "); - printf("%016llx", argR); - printf(" "); - printf("%016llx", res); - printf("\n"); -} - -static void showIAA ( char* rOrM, char* op, Int imm, RRArgs* rra, V128* rmask ) -{ - printf("%s %10s $%d ", rOrM, op, imm); - showV128(&rra->arg1); - printf(" "); - showV128(&rra->arg2); - printf(" "); - showMaskedV128(&rra->res, rmask); - printf("\n"); -} - -static void showAA ( char* rOrM, char* op, RRArgs* rra, V128* rmask ) -{ - printf("%s %10s ", rOrM, op); - showV128(&rra->arg1); - printf(" "); - showV128(&rra->arg2); - printf(" "); - showMaskedV128(&rra->res, rmask); - printf("\n"); -} - -/* Note: these are little endian. Hence first byte is the least - significant byte of lane zero. */ - -/* Mask for insns where all result bits are non-approximated. */ -static V128 AllMask = { 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF }; - -/* Mark for insns which produce approximated vector short results. */ -__attribute__((unused)) -static V128 ApproxPS = { 0x00,0x00,0x80,0xFF, 0x00,0x00,0x80,0xFF, - 0x00,0x00,0x80,0xFF, 0x00,0x00,0x80,0xFF }; - -/* Mark for insns which produce approximated scalar short results. */ -__attribute__((unused)) -static V128 ApproxSS = { 0x00,0x00,0x80,0xFF, 0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF }; - -static V128 fives = { 0x55,0x55,0x55,0x55, 0x55,0x55,0x55,0x55, - 0x55,0x55,0x55,0x55, 0x55,0x55,0x55,0x55 }; - -static V128 zeroes = { 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00 }; - -double mkPosInf ( void ) { return 1.0 / 0.0; } -double mkNegInf ( void ) { return -mkPosInf(); } -double mkPosNan ( void ) { return 0.0 / 0.0; } -double mkNegNan ( void ) { return -mkPosNan(); } +#include "../sse4-common.h" __attribute__((noinline)) UInt get_mxcsr ( void ) @@ -207,94 +56,7 @@ void set_sse_roundingmode ( UInt m ) set_mxcsr(w); } - -#define DO_imm_r_r(_opname, _imm, _src, _dst) \ - { \ - V128 _tmp; \ - __asm__ __volatile__( \ - "movupd (%0), %%xmm2" "\n\t" \ - "movupd (%1), %%xmm11" "\n\t" \ - _opname " $" #_imm ", %%xmm2, %%xmm11" "\n\t" \ - "movupd %%xmm11, (%2)" "\n" \ - : /*out*/ : /*in*/ "r"(&(_src)), "r"(&(_dst)), "r"(&(_tmp)) \ - : "cc", "memory", "xmm2", "xmm11" \ - ); \ - RRArgs rra; \ - memcpy(&rra.arg1, &(_src), sizeof(V128)); \ - memcpy(&rra.arg2, &(_dst), sizeof(V128)); \ - memcpy(&rra.res, &(_tmp), sizeof(V128)); \ - showIAA("r", (_opname), (_imm), &rra, &AllMask); \ - } - -#define DO_imm_m_r(_opname, _imm, _src, _dst) \ - { \ - V128 _tmp; \ - V128* _srcM = memalign16(sizeof(V128)); \ - memcpy(_srcM, &(_src), sizeof(V128)); \ - __asm__ __volatile__( \ - "movupd (%1), %%xmm11" "\n\t" \ - _opname " $" #_imm ", (%0), %%xmm11" "\n\t" \ - "movupd %%xmm11, (%2)" "\n" \ - : /*out*/ : /*in*/ "r"(_srcM), "r"(&(_dst)), "r"(&(_tmp)) \ - : "cc", "memory", "xmm11" \ - ); \ - RRArgs rra; \ - memcpy(&rra.arg1, &(_src), sizeof(V128)); \ - memcpy(&rra.arg2, &(_dst), sizeof(V128)); \ - memcpy(&rra.res, &(_tmp), sizeof(V128)); \ - showIAA("m", (_opname), (_imm), &rra, &AllMask); \ - free(_srcM); \ - } - -#define DO_imm_mandr_r(_opname, _imm, _src, _dst) \ - DO_imm_r_r( _opname, _imm, _src, _dst ) \ - DO_imm_m_r( _opname, _imm, _src, _dst ) - - - - - -#define DO_r_r(_opname, _src, _dst) \ - { \ - V128 _tmp; \ - __asm__ __volatile__( \ - "movupd (%0), %%xmm2" "\n\t" \ - "movupd (%1), %%xmm11" "\n\t" \ - _opname " %%xmm2, %%xmm11" "\n\t" \ - "movupd %%xmm11, (%2)" "\n" \ - : /*out*/ : /*in*/ "r"(&(_src)), "r"(&(_dst)), "r"(&(_tmp)) \ - : "cc", "memory", "xmm2", "xmm11" \ - ); \ - RRArgs rra; \ - memcpy(&rra.arg1, &(_src), sizeof(V128)); \ - memcpy(&rra.arg2, &(_dst), sizeof(V128)); \ - memcpy(&rra.res, &(_tmp), sizeof(V128)); \ - showAA("r", (_opname), &rra, &AllMask); \ - } - -#define DO_m_r(_opname, _src, _dst) \ - { \ - V128 _tmp; \ - V128* _srcM = memalign16(sizeof(V128)); \ - memcpy(_srcM, &(_src), sizeof(V128)); \ - __asm__ __volatile__( \ - "movupd (%1), %%xmm11" "\n\t" \ - _opname " (%0), %%xmm11" "\n\t" \ - "movupd %%xmm11, (%2)" "\n" \ - : /*out*/ : /*in*/ "r"(_srcM), "r"(&(_dst)), "r"(&(_tmp)) \ - : "cc", "memory", "xmm11" \ - ); \ - RRArgs rra; \ - memcpy(&rra.arg1, &(_src), sizeof(V128)); \ - memcpy(&rra.arg2, &(_dst), sizeof(V128)); \ - memcpy(&rra.res, &(_tmp), sizeof(V128)); \ - showAA("m", (_opname), &rra, &AllMask); \ - free(_srcM); \ - } - -#define DO_mandr_r(_opname, _src, _dst) \ - DO_r_r(_opname, _src, _dst) \ - DO_m_r(_opname, _src, _dst) +/* Architecture-specific macros for amd64 (use %r11) */ diff --git a/none/tests/sse4-common.h b/none/tests/sse4-common.h new file mode 100644 index 0000000000..80ffb4e771 --- /dev/null +++ b/none/tests/sse4-common.h @@ -0,0 +1,246 @@ +/* Common infrastructure for SSE4 tests (both x86 and amd64) */ + +#ifndef __SSE4_COMMON_H +#define __SSE4_COMMON_H + +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include "tests/malloc.h" +#include <string.h> + +typedef unsigned char V128[16]; +typedef unsigned int UInt; +typedef signed int Int; +typedef unsigned char UChar; +typedef unsigned long long int ULong; + +typedef unsigned char Bool; +#define False ((Bool)0) +#define True ((Bool)1) + + +typedef + struct { + V128 arg1; + V128 arg2; + V128 res; + } + RRArgs; + +typedef + struct { + V128 arg1; + V128 res; + } + RMArgs; + +static UChar randUChar ( void ) +{ + static UInt seed = 80021; + seed = 1103515245 * seed + 12345; + return (seed >> 17) & 0xFF; +} + + +static ULong randULong ( void ) +{ + Int i; + ULong r = 0; + for (i = 0; i < 8; i++) { + r = (r << 8) | (ULong)(0xFF & randUChar()); + } + return r; +} + +static void randV128 ( V128* v ) +{ + Int i; + for (i = 0; i < 16; i++) + (*v)[i] = randUChar(); +} + +static void showV128 ( V128* v ) +{ + Int i; + for (i = 15; i >= 0; i--) + printf("%02x", (Int)(*v)[i]); +} + +static void showMaskedV128 ( V128* v, V128* mask ) +{ + Int i; + for (i = 15; i >= 0; i--) + printf("%02x", (Int)( ((*v)[i]) & ((*mask)[i]) )); +} + +static void do64HLtoV128 ( /*OUT*/V128* res, ULong wHi, ULong wLo ) +{ + // try to sidestep strict-aliasing snafus by memcpying explicitly + UChar* p = (UChar*)res; + memcpy(&p[8], (UChar*)&wHi, 8); + memcpy(&p[0], (UChar*)&wLo, 8); +} + +static void showIGVV( char* rOrM, char* op, Int imm, + ULong src64, V128* dst, V128* res ) +{ + printf("%s %10s $%d ", rOrM, op, imm); + printf("%016llx", src64); + printf(" "); + showV128(dst); + printf(" "); + showV128(res); + printf("\n"); +} + +static void showIAG ( char* rOrM, char* op, Int imm, + V128* argL, ULong argR, ULong res ) +{ + printf("%s %10s $%d ", rOrM, op, imm); + showV128(argL); + printf(" "); + printf("%016llx", argR); + printf(" "); + printf("%016llx", res); + printf("\n"); +} + +static void showIAA ( char* rOrM, char* op, Int imm, RRArgs* rra, V128* rmask ) +{ + printf("%s %10s $%d ", rOrM, op, imm); + showV128(&rra->arg1); + printf(" "); + showV128(&rra->arg2); + printf(" "); + showMaskedV128(&rra->res, rmask); + printf("\n"); +} + +static void showAA ( char* rOrM, char* op, RRArgs* rra, V128* rmask ) +{ + printf("%s %10s ", rOrM, op); + showV128(&rra->arg1); + printf(" "); + showV128(&rra->arg2); + printf(" "); + showMaskedV128(&rra->res, rmask); + printf("\n"); +} + +/* Note: these are little endian. Hence first byte is the least + significant byte of lane zero. */ + +/* Mask for insns where all result bits are non-approximated. */ +static V128 AllMask = { 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF }; + +/* Mark for insns which produce approximated vector short results. */ +__attribute__((unused)) +static V128 ApproxPS = { 0x00,0x00,0x80,0xFF, 0x00,0x00,0x80,0xFF, + 0x00,0x00,0x80,0xFF, 0x00,0x00,0x80,0xFF }; + +/* Mark for insns which produce approximated scalar short results. */ +__attribute__((unused)) +static V128 ApproxSS = { 0x00,0x00,0x80,0xFF, 0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF }; + +static V128 fives = { 0x55,0x55,0x55,0x55, 0x55,0x55,0x55,0x55, + 0x55,0x55,0x55,0x55, 0x55,0x55,0x55,0x55 }; + +static V128 zeroes = { 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00 }; + +/* Helper functions for creating special float values */ +static inline double mkPosInf ( void ) { return 1.0 / 0.0; } +static inline double mkNegInf ( void ) { return -mkPosInf(); } +static inline double mkPosNan ( void ) { return 0.0 / 0.0; } +static inline double mkNegNan ( void ) { return -mkPosNan(); } + +/* Macros for testing XMM register to register and memory to register operations */ + +#define DO_imm_r_r(_opname, _imm, _src, _dst) \ + { \ + V128 _tmp; \ + __asm__ __volatile__( \ + "movupd (%0), %%xmm2" "\n\t" \ + "movupd (%1), %%xmm11" "\n\t" \ + _opname " $" #_imm ", %%xmm2, %%xmm11" "\n\t" \ + "movupd %%xmm11, (%2)" "\n" \ + : /*out*/ : /*in*/ "r"(&(_src)), "r"(&(_dst)), "r"(&(_tmp)) \ + : "cc", "memory", "xmm2", "xmm11" \ + ); \ + RRArgs rra; \ + memcpy(&rra.arg1, &(_src), sizeof(V128)); \ + memcpy(&rra.arg2, &(_dst), sizeof(V128)); \ + memcpy(&rra.res, &(_tmp), sizeof(V128)); \ + showIAA("r", (_opname), (_imm), &rra, &AllMask); \ + } + +#define DO_imm_m_r(_opname, _imm, _src, _dst) \ + { \ + V128 _tmp; \ + V128* _srcM = memalign16(sizeof(V128)); \ + memcpy(_srcM, &(_src), sizeof(V128)); \ + __asm__ __volatile__( \ + "movupd (%1), %%xmm11" "\n\t" \ + _opname " $" #_imm ", (%0), %%xmm11" "\n\t" \ + "movupd %%xmm11, (%2)" "\n" \ + : /*out*/ : /*in*/ "r"(_srcM), "r"(&(_dst)), "r"(&(_tmp)) \ + : "cc", "memory", "xmm11" \ + ); \ + RRArgs rra; \ + memcpy(&rra.arg1, &(_src), sizeof(V128)); \ + memcpy(&rra.arg2, &(_dst), sizeof(V128)); \ + memcpy(&rra.res, &(_tmp), sizeof(V128)); \ + showIAA("m", (_opname), (_imm), &rra, &AllMask); \ + free(_srcM); \ + } + +#define DO_imm_mandr_r(_opname, _imm, _src, _dst) \ + DO_imm_r_r( _opname, _imm, _src, _dst ) \ + DO_imm_m_r( _opname, _imm, _src, _dst ) + +#define DO_r_r(_opname, _src, _dst) \ + { \ + V128 _tmp; \ + __asm__ __volatile__( \ + "movupd (%0), %%xmm2" "\n\t" \ + "movupd (%1), %%xmm11" "\n\t" \ + _opname " %%xmm2, %%xmm11" "\n\t" \ + "movupd %%xmm11, (%2)" "\n" \ + : /*out*/ : /*in*/ "r"(&(_src)), "r"(&(_dst)), "r"(&(_tmp)) \ + : "cc", "memory", "xmm2", "xmm11" \ + ); \ + RRArgs rra; \ + memcpy(&rra.arg1, &(_src), sizeof(V128)); \ + memcpy(&rra.arg2, &(_dst), sizeof(V128)); \ + memcpy(&rra.res, &(_tmp), sizeof(V128)); \ + showAA("r", (_opname), &rra, &AllMask); \ + } + +#define DO_m_r(_opname, _src, _dst) \ + { \ + V128 _tmp; \ + V128* _srcM = memalign16(sizeof(V128)); \ + memcpy(_srcM, &(_src), sizeof(V128)); \ + __asm__ __volatile__( \ + "movupd (%1), %%xmm11" "\n\t" \ + _opname " (%0), %%xmm11" "\n\t" \ + "movupd %%xmm11, (%2)" "\n" \ + : /*out*/ : /*in*/ "r"(_srcM), "r"(&(_dst)), "r"(&(_tmp)) \ + : "cc", "memory", "xmm11" \ + ); \ + RRArgs rra; \ + memcpy(&rra.arg1, &(_src), sizeof(V128)); \ + memcpy(&rra.arg2, &(_dst), sizeof(V128)); \ + memcpy(&rra.res, &(_tmp), sizeof(V128)); \ + showAA("m", (_opname), &rra, &AllMask); \ + free(_srcM); \ + } + +#define DO_mandr_r(_opname, _src, _dst) \ + DO_r_r(_opname, _src, _dst) \ + DO_m_r(_opname, _src, _dst) + +#endif /* __SSE4_COMMON_H */ diff --git a/none/tests/x86/sse4-x86.c b/none/tests/x86/sse4-x86.c index 0fec4bda6b..a93a4acd27 100644 --- a/none/tests/x86/sse4-x86.c +++ b/none/tests/x86/sse4-x86.c @@ -1,170 +1,9 @@ -/* A program to test SSE4.1/SSE4.2 instructions. +/* A program to test SSE4.1/SSE4.2 instructions. Copied from amd64 version. */ -#include <stdio.h> -#include <stdlib.h> -#include <assert.h> -#include "tests/malloc.h" -#include <string.h> - - -typedef unsigned char V128[16]; -typedef unsigned int UInt; -typedef signed int Int; -typedef unsigned char UChar; -typedef unsigned long long int ULong; - -typedef unsigned char Bool; -#define False ((Bool)0) -#define True ((Bool)1) - - -typedef - struct { - V128 arg1; - V128 arg2; - V128 res; - } - RRArgs; - -typedef - struct { - V128 arg1; - V128 res; - } - RMArgs; - - -static UChar randUChar ( void ) -{ - static UInt seed = 80021; - seed = 1103515245 * seed + 12345; - return (seed >> 17) & 0xFF; -} - - -static ULong randULong ( void ) -{ - Int i; - ULong r = 0; - for (i = 0; i < 8; i++) { - r = (r << 8) | (ULong)(0xFF & randUChar()); - } - return r; -} - - -static void showV128 ( V128* v ) -{ - Int i; - for (i = 15; i >= 0; i--) - printf("%02x", (Int)(*v)[i]); -} - - -static void showIGVV( char* rOrM, char* op, Int imm, - ULong src64, V128* dst, V128* res ) -{ - printf("%s %10s $%d ", rOrM, op, imm); - printf("%016llx", src64); - printf(" "); - showV128(dst); - printf(" "); - showV128(res); - printf("\n"); -} - -static V128 fives = { 0x55,0x55,0x55,0x55, 0x55,0x55,0x55,0x55, - 0x55,0x55,0x55,0x55, 0x55,0x55,0x55,0x55 }; - -static V128 zeroes = { 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00 }; - -#define DO_imm_r_r(_opname, _imm, _src, _dst) \ - { \ - V128 _tmp; \ - __asm__ __volatile__( \ - "movupd (%0), %%xmm2" "\n\t" \ - "movupd (%1), %%xmm11" "\n\t" \ - _opname " $" #_imm ", %%xmm2, %%xmm11" "\n\t" \ - "movupd %%xmm11, (%2)" "\n" \ - : /*out*/ : /*in*/ "r"(&(_src)), "r"(&(_dst)), "r"(&(_tmp)) \ - : "cc", "memory", "xmm2", "xmm11" \ - ); \ - RRArgs rra; \ - memcpy(&rra.arg1, &(_src), sizeof(V128)); \ - memcpy(&rra.arg2, &(_dst), sizeof(V128)); \ - memcpy(&rra.res, &(_tmp), sizeof(V128)); \ - showIAA("r", (_opname), (_imm), &rra, &AllMask); \ - } - -#define DO_imm_m_r(_opname, _imm, _src, _dst) \ - { \ - V128 _tmp; \ - V128* _srcM = memalign16(sizeof(V128)); \ - memcpy(_srcM, &(_src), sizeof(V128)); \ - __asm__ __volatile__( \ - "movupd (%1), %%xmm11" "\n\t" \ - _opname " $" #_imm ", (%0), %%xmm11" "\n\t" \ - "movupd %%xmm11, (%2)" "\n" \ - : /*out*/ : /*in*/ "r"(_srcM), "r"(&(_dst)), "r"(&(_tmp)) \ - : "cc", "memory", "xmm11" \ - ); \ - RRArgs rra; \ - memcpy(&rra.arg1, &(_src), sizeof(V128)); \ - memcpy(&rra.arg2, &(_dst), sizeof(V128)); \ - memcpy(&rra.res, &(_tmp), sizeof(V128)); \ - showIAA("m", (_opname), (_imm), &rra, &AllMask); \ - free(_srcM); \ - } - -#define DO_imm_mandr_r(_opname, _imm, _src, _dst) \ - DO_imm_r_r( _opname, _imm, _src, _dst ) \ - DO_imm_m_r( _opname, _imm, _src, _dst ) - -#define DO_r_r(_opname, _src, _dst) \ - { \ - V128 _tmp; \ - __asm__ __volatile__( \ - "movupd (%0), %%xmm2" "\n\t" \ - "movupd (%1), %%xmm11" "\n\t" \ - _opname " %%xmm2, %%xmm11" "\n\t" \ - "movupd %%xmm11, (%2)" "\n" \ - : /*out*/ : /*in*/ "r"(&(_src)), "r"(&(_dst)), "r"(&(_tmp)) \ - : "cc", "memory", "xmm2", "xmm11" \ - ); \ - RRArgs rra; \ - memcpy(&rra.arg1, &(_src), sizeof(V128)); \ - memcpy(&rra.arg2, &(_dst), sizeof(V128)); \ - memcpy(&rra.res, &(_tmp), sizeof(V128)); \ - showAA("r", (_opname), &rra, &AllMask); \ - } - -#define DO_m_r(_opname, _src, _dst) \ - { \ - V128 _tmp; \ - V128* _srcM = memalign16(sizeof(V128)); \ - memcpy(_srcM, &(_src), sizeof(V128)); \ - __asm__ __volatile__( \ - "movupd (%1), %%xmm11" "\n\t" \ - _opname " (%0), %%xmm11" "\n\t" \ - "movupd %%xmm11, (%2)" "\n" \ - : /*out*/ : /*in*/ "r"(_srcM), "r"(&(_dst)), "r"(&(_tmp)) \ - : "cc", "memory", "xmm11" \ - ); \ - RRArgs rra; \ - memcpy(&rra.arg1, &(_src), sizeof(V128)); \ - memcpy(&rra.arg2, &(_dst), sizeof(V128)); \ - memcpy(&rra.res, &(_tmp), sizeof(V128)); \ - showAA("m", (_opname), &rra, &AllMask); \ - free(_srcM); \ - } - -#define DO_mandr_r(_opname, _src, _dst) \ - DO_r_r(_opname, _src, _dst) \ - DO_m_r(_opname, _src, _dst) +#include "../sse4-common.h" #define DO_imm_r_to_rscalar(_opname, _imm, _src) \ { \ |
|
From: Alexandra H. <aha...@so...> - 2025-11-26 19:19:04
|
https://sourceware.org/cgit/valgrind/commit/?id=83a3116dbbd83cf04b623a1cbc5935807c9e1046 commit 83a3116dbbd83cf04b623a1cbc5935807c9e1046 Author: Alexandra Hájková <aha...@re...> Date: Tue Nov 11 04:17:36 2025 -0500 sse4-common.h: make changes to make test_PMAXSD usable for 32bit Modify DO_imm_r_r macro called by test_PMAXSD to use xmm7 register when testing on 32bit. Diff: --- none/tests/amd64/sse4-64.c | 11 ---------- none/tests/sse4-common.h | 52 ++++++++++++++++++++++++++++++++-------------- none/tests/x86/sse4-x86.c | 1 + 3 files changed, 37 insertions(+), 27 deletions(-) diff --git a/none/tests/amd64/sse4-64.c b/none/tests/amd64/sse4-64.c index d795dfde51..7048f96f67 100644 --- a/none/tests/amd64/sse4-64.c +++ b/none/tests/amd64/sse4-64.c @@ -1503,17 +1503,6 @@ void test_PMAXSB ( void ) } } -void test_PMAXSD ( void ) -{ - V128 src, dst; - Int i; - for (i = 0; i < 10; i++) { - randV128(&src); - randV128(&dst); - DO_mandr_r("pmaxsd", src, dst); - } -} - void test_PMAXUD ( void ) { V128 src, dst; diff --git a/none/tests/sse4-common.h b/none/tests/sse4-common.h index 80ffb4e771..1e08218b5e 100644 --- a/none/tests/sse4-common.h +++ b/none/tests/sse4-common.h @@ -159,16 +159,23 @@ static inline double mkNegNan ( void ) { return -mkPosNan(); } /* Macros for testing XMM register to register and memory to register operations */ +/* Use xmm7 for 32-bit x86, xmm11 for amd64 (xmm8-15 don't exist in 32-bit mode) */ +#ifdef __x86_64__ +#define XMMREG_DST "xmm11" +#else +#define XMMREG_DST "xmm7" +#endif + #define DO_imm_r_r(_opname, _imm, _src, _dst) \ { \ V128 _tmp; \ __asm__ __volatile__( \ "movupd (%0), %%xmm2" "\n\t" \ - "movupd (%1), %%xmm11" "\n\t" \ - _opname " $" #_imm ", %%xmm2, %%xmm11" "\n\t" \ - "movupd %%xmm11, (%2)" "\n" \ + "movupd (%1), %%" XMMREG_DST "\n\t" \ + _opname " $" #_imm ", %%xmm2, %%" XMMREG_DST "\n\t" \ + "movupd %%" XMMREG_DST ", (%2)" "\n" \ : /*out*/ : /*in*/ "r"(&(_src)), "r"(&(_dst)), "r"(&(_tmp)) \ - : "cc", "memory", "xmm2", "xmm11" \ + : "cc", "memory", "xmm2", XMMREG_DST \ ); \ RRArgs rra; \ memcpy(&rra.arg1, &(_src), sizeof(V128)); \ @@ -183,11 +190,11 @@ static inline double mkNegNan ( void ) { return -mkPosNan(); } V128* _srcM = memalign16(sizeof(V128)); \ memcpy(_srcM, &(_src), sizeof(V128)); \ __asm__ __volatile__( \ - "movupd (%1), %%xmm11" "\n\t" \ - _opname " $" #_imm ", (%0), %%xmm11" "\n\t" \ - "movupd %%xmm11, (%2)" "\n" \ + "movupd (%1), %%" XMMREG_DST "\n\t" \ + _opname " $" #_imm ", (%0), %%" XMMREG_DST "\n\t" \ + "movupd %%" XMMREG_DST ", (%2)" "\n" \ : /*out*/ : /*in*/ "r"(_srcM), "r"(&(_dst)), "r"(&(_tmp)) \ - : "cc", "memory", "xmm11" \ + : "cc", "memory", XMMREG_DST \ ); \ RRArgs rra; \ memcpy(&rra.arg1, &(_src), sizeof(V128)); \ @@ -206,11 +213,11 @@ static inline double mkNegNan ( void ) { return -mkPosNan(); } V128 _tmp; \ __asm__ __volatile__( \ "movupd (%0), %%xmm2" "\n\t" \ - "movupd (%1), %%xmm11" "\n\t" \ - _opname " %%xmm2, %%xmm11" "\n\t" \ - "movupd %%xmm11, (%2)" "\n" \ + "movupd (%1), %%" XMMREG_DST "\n\t" \ + _opname " %%xmm2, %%" XMMREG_DST "\n\t" \ + "movupd %%" XMMREG_DST ", (%2)" "\n" \ : /*out*/ : /*in*/ "r"(&(_src)), "r"(&(_dst)), "r"(&(_tmp)) \ - : "cc", "memory", "xmm2", "xmm11" \ + : "cc", "memory", "xmm2", XMMREG_DST \ ); \ RRArgs rra; \ memcpy(&rra.arg1, &(_src), sizeof(V128)); \ @@ -225,11 +232,11 @@ static inline double mkNegNan ( void ) { return -mkPosNan(); } V128* _srcM = memalign16(sizeof(V128)); \ memcpy(_srcM, &(_src), sizeof(V128)); \ __asm__ __volatile__( \ - "movupd (%1), %%xmm11" "\n\t" \ - _opname " (%0), %%xmm11" "\n\t" \ - "movupd %%xmm11, (%2)" "\n" \ + "movupd (%1), %%" XMMREG_DST "\n\t" \ + _opname " (%0), %%" XMMREG_DST "\n\t" \ + "movupd %%" XMMREG_DST ", (%2)" "\n" \ : /*out*/ : /*in*/ "r"(_srcM), "r"(&(_dst)), "r"(&(_tmp)) \ - : "cc", "memory", "xmm11" \ + : "cc", "memory", XMMREG_DST \ ); \ RRArgs rra; \ memcpy(&rra.arg1, &(_src), sizeof(V128)); \ @@ -243,4 +250,17 @@ static inline double mkNegNan ( void ) { return -mkPosNan(); } DO_r_r(_opname, _src, _dst) \ DO_m_r(_opname, _src, _dst) +/* Common test functions */ + +static inline void test_PMAXSD ( void ) +{ + V128 src, dst; + Int i; + for (i = 0; i < 10; i++) { + randV128(&src); + randV128(&dst); + DO_mandr_r("pmaxsd", src, dst); + } +} + #endif /* __SSE4_COMMON_H */ diff --git a/none/tests/x86/sse4-x86.c b/none/tests/x86/sse4-x86.c index a93a4acd27..7e4189852f 100644 --- a/none/tests/x86/sse4-x86.c +++ b/none/tests/x86/sse4-x86.c @@ -104,6 +104,7 @@ int main(void) { // ------ SSE 4.1 ------ test_PINSRD(); + test_PMAXSD(); return 0; } |
|
From: Paul F. <pa...@so...> - 2025-11-26 17:55:36
|
https://sourceware.org/cgit/valgrind/commit/?id=4968e6f2446e6f8deccdabeccd8d2e2372b5285d commit 4968e6f2446e6f8deccdabeccd8d2e2372b5285d Author: Paul Floyd <pj...@wa...> Date: Wed Nov 26 18:53:49 2025 +0100 Darwin ,gitignore: add a wildcard for dSYM direatories in none Diff: --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 5542f4e4b6..33378bcb7c 100644 --- a/.gitignore +++ b/.gitignore @@ -1541,6 +1541,7 @@ /nightly/valgrind-old # /none/ +/none/*.dSYM /none/*.so /none/.deps /none/Makefile |
|
From: Florian K. <fk...@so...> - 2025-11-26 16:52:00
|
https://sourceware.org/cgit/valgrind/commit/?id=2020b9914d58cb756aeba645ddd180bc29566415 commit 2020b9914d58cb756aeba645ddd180bc29566415 Author: Florian Krohm <fl...@ei...> Date: Wed Nov 26 16:50:42 2025 +0000 s390x_features.c cleanup Remove detection of unneeded facilities: zarch, n3, exrl, mi3 Rename s390x-vx2 --> s390x-vxe2 to be consistent with VEX_HWCAPS_S390X_VXE2 Change vec2_float.vgtest accordingly Diff: --- none/tests/s390x/vec2_float.vgtest | 2 +- tests/s390x_features.c | 14 +++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/none/tests/s390x/vec2_float.vgtest b/none/tests/s390x/vec2_float.vgtest index 1f92d59ece..59cbe54ba9 100644 --- a/none/tests/s390x/vec2_float.vgtest +++ b/none/tests/s390x/vec2_float.vgtest @@ -1,2 +1,2 @@ prog: vec2_float -prereq: test -e vec2_float && ../../../tests/s390x_features s390x-vx2 +prereq: test -e vec2_float && ../../../tests/s390x_features s390x-vxe2 diff --git a/tests/s390x_features.c b/tests/s390x_features.c index f9aa966404..2b6af79f8a 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -225,22 +225,14 @@ static int go(char *feature, char *cpu) clear_facilities(facilities); stfle(facilities); - if (strcmp(feature, "s390x-zarch") == 0 ) { - match = (facilities[0] & FAC_BIT(1)) && (facilities[0] & FAC_BIT(2)); - } else if (strcmp(feature, "s390x-n3") == 0 ) { - match = facilities[0] & FAC_BIT(0); - } else if (strcmp(feature, "s390x-exrl") == 0 ) { - match = facilities[0] & FAC_BIT(35); - } else if (strcmp(feature, "s390x-vx") == 0 ) { + if (strcmp(feature, "s390x-vx") == 0 ) { /* VX needs kernel support; thus check the appropriate HWCAP bit. */ - match = GET_HWCAP() & 0x800; + match = (GET_HWCAP() & 0x800) && (facilities[2] & FAC_BIT(1)); } else if (strcmp(feature, "s390x-msa5") == 0 ) { match = facilities[0] & FAC_BIT(57); /* message security assist 5 facility */ } else if (strcmp(feature, "s390x-mi2") == 0 ) { match = facilities[0] & FAC_BIT(58); - } else if (strcmp(feature, "s390x-mi3") == 0 ) { - match = facilities[0] & FAC_BIT(61); - } else if (strcmp(feature, "s390x-vx2") == 0 ) { + } else if (strcmp(feature, "s390x-vxe2") == 0 ) { match = (GET_HWCAP() & 0x800) && (facilities[2] & FAC_BIT(20)); } else { return 2; // Unrecognised feature. |
|
From: Paul F. <pa...@so...> - 2025-11-25 20:10:59
|
https://sourceware.org/cgit/valgrind/commit/?id=e7d7d6e99797083014dbb7d288c09e8c365feb9e commit e7d7d6e99797083014dbb7d288c09e8c365feb9e Author: Paul Floyd <pj...@wa...> Date: Tue Nov 25 21:04:17 2025 +0100 FreeBSD regtest: turn off a few gdbserver tests on systems with sysctl debug.ptrace_attach_transparent FreeBSD 15 (out soon) and 16 (the dev branch) have changed the behaviour of ptrace. When vgdb uses ptrace to get Valgrind to poll gdbserver to get out of blocking syscalls the client may return a bogus result from the syscall. Setting the syscall to 0 turns off this change and all 3 affected testcases should return to normal behaviour. However, setting the syscall needs root privileges. So I've added a test to see if the syscall is present and set to 1. If it is the prereq is not satisfied. Diff: --- gdbserver_tests/mcinvokeWS.vgtest | 2 +- gdbserver_tests/nlcontrolc.vgtest | 2 +- gdbserver_tests/nlsigvgdb.vgtest | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gdbserver_tests/mcinvokeWS.vgtest b/gdbserver_tests/mcinvokeWS.vgtest index ced90fa183..54b11f7bc1 100644 --- a/gdbserver_tests/mcinvokeWS.vgtest +++ b/gdbserver_tests/mcinvokeWS.vgtest @@ -4,7 +4,7 @@ prog: sleepers args: 1 10000000 0 -S-S-S-S vgopts: --tool=memcheck --vgdb=yes --vgdb-prefix=./vgdb-prefix-mcinvokeWS stderr_filter: filter_make_empty -prereq: test -f vgdb.invoker +prereq: test -f vgdb.invoker && ( ! ../tests/os_test freebsd || [ "$(sysctl -n debug.ptrace_attach_transparent 2>/dev/null || echo 0)" -eq 0 ] ) progB: invoker argsB: 10 --vgdb-prefix=./vgdb-prefix-mcinvokeWS --wait=60 -c v.wait 0 # if the --wait is not enough, the test will fail or block diff --git a/gdbserver_tests/nlcontrolc.vgtest b/gdbserver_tests/nlcontrolc.vgtest index 09edfcaba5..6c60972c21 100644 --- a/gdbserver_tests/nlcontrolc.vgtest +++ b/gdbserver_tests/nlcontrolc.vgtest @@ -13,7 +13,7 @@ args: 1000000000 0 100000 BSBSBSBS 1 vgopts: --tool=none --vgdb=yes --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-nlcontrolc stderr_filter: filter_stderr # Bug 338633 nlcontrol hangs on arm64 currently. -prereq: test -e gdb -a -f vgdb.invoker && ! ../tests/os_test solaris +prereq: test -e gdb -a -f vgdb.invoker && ( ! ../tests/os_test solaris ) && ( ! ../tests/os_test freebsd || [ "$(sysctl -n debug.ptrace_attach_transparent 2>/dev/null || echo 0)" -eq 0 ] ) progB: gdb argsB: --quiet -l 60 --nx ./sleepers stdinB: nlcontrolc.stdinB.gdb diff --git a/gdbserver_tests/nlsigvgdb.vgtest b/gdbserver_tests/nlsigvgdb.vgtest index ad69a129f4..2e69109a29 100644 --- a/gdbserver_tests/nlsigvgdb.vgtest +++ b/gdbserver_tests/nlsigvgdb.vgtest @@ -7,7 +7,7 @@ prog: sleepers args: 1 10000000 0 -S-S-S-S 1 vgopts: --tool=none --vgdb=yes --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-nlsigvgdb stderr_filter: filter_stderr -prereq: test -e gdb -a -f vgdb.invoker +prereq: test -e gdb -a -f vgdb.invoker && ( ! ../tests/os_test freebsd || [ "$(sysctl -n debug.ptrace_attach_transparent 2>/dev/null || echo 0)" -eq 0 ] ) envB: LC_ALL=C progB: gdb argsB: --quiet -l 60 --nx ./sleepers |
|
From: Paul F. <pa...@so...> - 2025-11-25 20:04:10
|
https://sourceware.org/cgit/valgrind/commit/?id=730f1de48ad109a0bc7046154ff8c5a1a8a93886 commit 730f1de48ad109a0bc7046154ff8c5a1a8a93886 Author: Paul Floyd <pj...@wa...> Date: Tue Nov 25 21:03:35 2025 +0100 FreeBSD startup: do not skip exename if it is not present Don't remember why this code was there. Allowing no exename is a bad idea (argv[0] will be NULL). I don't think there is a need any more for this permissiveness. Diff: --- coregrind/m_initimg/initimg-freebsd.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/coregrind/m_initimg/initimg-freebsd.c b/coregrind/m_initimg/initimg-freebsd.c index 874d129f62..09f3dda847 100644 --- a/coregrind/m_initimg/initimg-freebsd.c +++ b/coregrind/m_initimg/initimg-freebsd.c @@ -410,7 +410,6 @@ static Addr setup_client_stack(const void* init_sp, Addr client_SP; /* client stack base (initial SP) */ Addr clstack_start; /* client_SP rounded down to nearest page */ Int i; - Bool have_exename; Word client_argv; vg_assert(VG_IS_PAGE_ALIGNED(clstack_end+1)); @@ -431,7 +430,6 @@ static Addr setup_client_stack(const void* init_sp, /* first of all, work out how big the client stack will be */ stringsize = 0; - have_exename = VG_(args_the_exename) != NULL; /* paste on the extra args if the loader needs them (ie, the #! interpreter and its argument) */ @@ -446,9 +444,7 @@ static Addr setup_client_stack(const void* init_sp, } /* now scan the args we're given... */ - if (have_exename) { - stringsize += VG_(strlen)( VG_(args_the_exename) ) + 1; - } + stringsize += VG_(strlen)( VG_(args_the_exename) ) + 1; for (i = 0; i < VG_(sizeXA)( VG_(args_for_client) ); i++) { argc++; @@ -506,7 +502,7 @@ static Addr setup_client_stack(const void* init_sp, /* OK, now we know how big the client stack is */ used_stacksize = sizeof(Word) + /* argc */ - (have_exename ? sizeof(HChar **) : 0) + /* argc[0] == exename */ + sizeof(HChar **) + /* argc[0] == exename */ sizeof(HChar **)*argc + /* argv */ sizeof(HChar **) + /* terminal NULL */ sizeof(HChar **)*envc + /* envp */ @@ -641,7 +637,7 @@ static Addr setup_client_stack(const void* init_sp, ptr = (Addr*)client_SP; /* --- client argc --- */ - *ptr++ = argc + (have_exename ? 1 : 0); + *ptr++ = argc + 1; /* --- client argv --- */ client_argv = (Word)ptr; @@ -652,9 +648,7 @@ static Addr setup_client_stack(const void* init_sp, *ptr++ = (Addr)copy_str(&strtab, info->interp_args); } - if (have_exename) { - *ptr++ = (Addr)copy_str(&strtab, VG_(args_the_exename)); - } + *ptr++ = (Addr)copy_str(&strtab, VG_(args_the_exename)); for (i = 0; i < VG_(sizeXA)( VG_(args_for_client) ); i++) { *ptr++ = (Addr)copy_str( |
|
From: Martin C. <mc...@so...> - 2025-11-25 15:51:45
|
https://sourceware.org/cgit/valgrind/commit/?id=2b4b31de6965c3af5ecaca2c33b039eb72ec3706 commit 2b4b31de6965c3af5ecaca2c33b039eb72ec3706 Author: Martin Cermak <mc...@re...> Date: Tue Nov 25 15:07:09 2025 +0100 Memory allegedly uninitialized after ioctl(PROCMAP_QUERY) Fix ioctl(fd, PROCMAP_QUERY, ...) so that valgrind correctly considers memory referenced by vma_name_size and vma_name_addr members of struct procmap_query as initialized by ioctl(). Extend ioctl syscall wrappers with needed PRE_MEM_WRITE() and mainly POST_MEM_WRITE(). Add a testcase. https://bugs.kde.org/show_bug.cgi?id=508328 Diff: --- .gitignore | 1 + NEWS | 1 + configure.ac | 15 ++++++++++ coregrind/m_syswrap/syswrap-linux.c | 34 ++++++++++++++++++++++ include/vki/vki-linux.h | 24 +++++++++++++++ memcheck/tests/linux/Makefile.am | 10 ++++++- memcheck/tests/linux/filter_ioctl_procmap_query | 6 ++++ memcheck/tests/linux/ioctl_procmap_query.c | 34 ++++++++++++++++++++++ .../tests/linux/ioctl_procmap_query.stderr.exp | 0 .../tests/linux/ioctl_procmap_query.stdout.exp | 2 ++ memcheck/tests/linux/ioctl_procmap_query.vgtest | 4 +++ 11 files changed, 130 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a9cb60c965..5542f4e4b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1193,6 +1193,7 @@ /memcheck/tests/linux/dlclose_leak_so.so /memcheck/tests/linux/getregset /memcheck/tests/linux/ioctl-tiocsig +/memcheck/tests/linux/ioctl_procmap_query /memcheck/tests/linux/lsframe1 /memcheck/tests/linux/lsframe2 /memcheck/tests/linux/Makefile diff --git a/NEWS b/NEWS index 89493bbf6a..252c8e8ec0 100644 --- a/NEWS +++ b/NEWS @@ -233,6 +233,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 508030 Add several missing syscall hooks to ppc64-linux 508093 VALGRIND_CLO_CHANGE does not update vex_control 508145 ppc64le needs ld.so hardwire for strcmp +508328 Memory allegedly uninitialized after ioctl(PROCMAP_QUERY) 508154 PRE(sys_fchownat) not handling VKI_AT_FDCWD 508638 Self-hosting not working on FreeBSD 508777 amd64-linux: add minimal scalar test diff --git a/configure.ac b/configure.ac index 869487db4d..09a352a707 100644 --- a/configure.ac +++ b/configure.ac @@ -2173,6 +2173,21 @@ AC_MSG_RESULT([no]) AM_CONDITIONAL(HAVE_NR_IO_PGETEVENTS, [test x$ac_have_nr_io_pgetevents = xyes]) +AC_MSG_CHECKING([for PROCMAP_QUERY]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include <linux/fs.h> +]], [[ +return PROCMAP_QUERY +]])], [ +ac_have_procmap_query=yes +AC_MSG_RESULT([yes]) +], [ +ac_have_procmap_query=no +AC_MSG_RESULT([no]) +]) + +AM_CONDITIONAL(HAVE_PROCMAP_QUERY, [test x$ac_have_procmap_query = xyes]) + #---------------------------------------------------------------------------- # Checking for supported compiler flags. #---------------------------------------------------------------------------- diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 4db8743dd0..8bf0bab56d 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -10826,6 +10826,26 @@ PRE(sys_ioctl) case VKI_EVIOCGRAB: /* This just takes an int argument. */ break; + case VKI_PROCMAP_QUERY: { + /* https://www.kernel.org/doc/html/latest/filesystems/proc.html */ + /* linux source: include/uapi/linux/fs.h:561 */ + struct vki_procmap_query *pq = + (struct vki_procmap_query *)(Addr)ARG3; + if (!ML_(safe_to_deref) (pq, sizeof(struct vki_procmap_query))) + break; + PRE_FIELD_READ("ioctl(PROCMAP_QUERY).size", pq->size); + PRE_FIELD_READ("ioctl(PROCMAP_QUERY).query_flags", pq->query_flags); + PRE_FIELD_READ("ioctl(PROCMAP_QUERY).query_addr", pq->query_addr); + PRE_FIELD_READ("ioctl(PROCMAP_QUERY).vma_name_size", pq->vma_name_size); + PRE_FIELD_READ("ioctl(PROCMAP_QUERY).vma_name_addr", pq->vma_name_addr); + PRE_FIELD_READ("ioctl(PROCMAP_QUERY).build_id_size", pq->build_id_size); + PRE_FIELD_READ("ioctl(PROCMAP_QUERY).build_id_addr", pq->build_id_addr); + if (pq->vma_name_size > 0) + PRE_MEM_WRITE("ioctl(PROCMAP_QUERY)", (Addr)pq->vma_name_addr, pq->vma_name_size); + if (pq->build_id_size > 0) + PRE_MEM_WRITE("ioctl(PROCMAP_QUERY)", (Addr)pq->build_id_addr, pq->build_id_size); + break; + } default: /* EVIOC* are variable length and return size written on success */ @@ -12984,6 +13004,20 @@ POST(sys_ioctl) case VKI_PTP_ENABLE_PPS: case VKI_PTP_PIN_SETFUNC: break; + case VKI_PROCMAP_QUERY: { + /* https://www.kernel.org/doc/html/latest/filesystems/proc.html */ + /* linux source: include/uapi/linux/fs.h:561 */ + struct vki_procmap_query *pq = + (struct vki_procmap_query *)(Addr)ARG3; + if (pq->vma_name_size > 0) + POST_MEM_WRITE(pq->vma_name_addr, pq->vma_name_size); + if (pq->build_id_size > 0) + POST_MEM_WRITE(pq->build_id_addr, pq->build_id_size); + /* assume everything is written/defined with POST_MEM_WRITE */ + /* instead of doing individual POST_FIELD_WRITEs */ + POST_MEM_WRITE((Addr)pq, pq->size); + break; + } default: /* EVIOC* are variable length and return size written on success */ diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h index 3f9272f4d1..59c4d57c8a 100644 --- a/include/vki/vki-linux.h +++ b/include/vki/vki-linux.h @@ -3900,6 +3900,30 @@ struct vki_ion_custom_data { #define VKI_ION_IOC_CUSTOM \ _VKI_IOWR(VKI_ION_IOC_MAGIC, 6, struct vki_ion_custom_data) +struct vki_procmap_query { + __vki_u64 size; + __vki_u64 query_flags; /* in */ + __vki_u64 query_addr; /* in */ + __vki_u64 vma_start; /* out */ + __vki_u64 vma_end; /* out */ + __vki_u64 vma_flags; /* out */ + __vki_u64 vma_page_size; /* out */ + __vki_u64 vma_offset; /* out */ + __vki_u64 inode; /* out */ + __vki_u32 dev_major; /* out */ + __vki_u32 dev_minor; /* out */ + __vki_u32 vma_name_size; /* in/out */ + __vki_u32 build_id_size; /* in/out */ + __vki_u64 vma_name_addr; /* in */ + __vki_u64 build_id_addr; /* in */ +}; + +// linux/fs.h +#define VKI_PROCFS_IOCTL_MAGIC 'f' + +#define VKI_PROCMAP_QUERY \ + _VKI_IOWR(VKI_PROCFS_IOCTL_MAGIC, 17, struct vki_procmap_query) + //---------------------------------------------------------------------- // From include/uapi/linux/sync_file.h 6.10.3 //---------------------------------------------------------------------- diff --git a/memcheck/tests/linux/Makefile.am b/memcheck/tests/linux/Makefile.am index e28866fc18..b9f273be8e 100644 --- a/memcheck/tests/linux/Makefile.am +++ b/memcheck/tests/linux/Makefile.am @@ -1,7 +1,8 @@ include $(top_srcdir)/Makefile.tool-tests.am -dist_noinst_SCRIPTS = filter_stderr +dist_noinst_SCRIPTS = filter_stderr \ + filter_ioctl_procmap_query EXTRA_DIST = \ aligned_alloc.vgtest aligned_alloc.stderr.exp \ @@ -19,6 +20,9 @@ EXTRA_DIST = \ dlclose_leak-no-keep.vgtest \ dlclose_leak.stderr.exp dlclose_leak.stdout.exp \ dlclose_leak.vgtest \ + ioctl_procmap_query.stderr.exp \ + ioctl_procmap_query.stdout.exp \ + ioctl_procmap_query.vgtest \ ioctl-tiocsig.vgtest ioctl-tiocsig.stderr.exp \ lsframe1.vgtest lsframe1.stdout.exp lsframe1.stderr.exp \ lsframe2.vgtest lsframe2.stdout.exp lsframe2.stderr.exp \ @@ -70,6 +74,10 @@ check_PROGRAMS = \ enomem \ memalign +if HAVE_PROCMAP_QUERY +check_PROGRAMS += ioctl_procmap_query +endif + if HAVE_OPENSSL check_PROGRAMS += bug480706 endif diff --git a/memcheck/tests/linux/filter_ioctl_procmap_query b/memcheck/tests/linux/filter_ioctl_procmap_query new file mode 100755 index 0000000000..bdd7641323 --- /dev/null +++ b/memcheck/tests/linux/filter_ioctl_procmap_query @@ -0,0 +1,6 @@ +#! /bin/sh + +# drop the 3rd (last) line of the output, since it's a +# binary blob (build_id) which needs to be printed but +# not checked +/usr/bin/head -2 diff --git a/memcheck/tests/linux/ioctl_procmap_query.c b/memcheck/tests/linux/ioctl_procmap_query.c new file mode 100644 index 0000000000..396cf3d26c --- /dev/null +++ b/memcheck/tests/linux/ioctl_procmap_query.c @@ -0,0 +1,34 @@ +#include <stdio.h> +#include <stdint.h> +#include <fcntl.h> +#include <sys/ioctl.h> +#include <linux/fs.h> +#include <unistd.h> +#include <string.h> + +int main(int argc, char** argv) +{ + char name[256]; + char buildid[256]; + char cwd[256]; + getcwd(cwd, sizeof(cwd)); + + struct procmap_query pq = { + .size = sizeof(pq), .query_addr = (uintptr_t)main, + .vma_name_size = 256, .vma_name_addr = (uintptr_t)name, + .build_id_size = 256, .build_id_addr = (uintptr_t)buildid + }; + int fd = open("/proc/self/maps", O_RDONLY); + ioctl(fd, PROCMAP_QUERY, &pq); + // print name but strip off the PWD prefix so that + // we always get a known output we can easily check + puts(name + strlen(cwd) + 1); + // buildid is a binary blob, not NUL terminated C string + buildid[pq.build_id_size-1] = '\0'; + // make sure that kernel returned some reasonable build_id_size + if (pq.build_id_size > 0 && pq.build_id_size < 256) + puts("OK"); + // print the buildid so that the bug can trigger + puts(buildid); +} + diff --git a/memcheck/tests/linux/ioctl_procmap_query.stderr.exp b/memcheck/tests/linux/ioctl_procmap_query.stderr.exp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/memcheck/tests/linux/ioctl_procmap_query.stdout.exp b/memcheck/tests/linux/ioctl_procmap_query.stdout.exp new file mode 100644 index 0000000000..280e91aa1e --- /dev/null +++ b/memcheck/tests/linux/ioctl_procmap_query.stdout.exp @@ -0,0 +1,2 @@ +ioctl_procmap_query +OK diff --git a/memcheck/tests/linux/ioctl_procmap_query.vgtest b/memcheck/tests/linux/ioctl_procmap_query.vgtest new file mode 100644 index 0000000000..8d12e07952 --- /dev/null +++ b/memcheck/tests/linux/ioctl_procmap_query.vgtest @@ -0,0 +1,4 @@ +prog: ioctl_procmap_query +vgopts: -q +stdout_filter: filter_ioctl_procmap_query +prereq: test -x ioctl_procmap_query |
|
From: Florian K. <fk...@so...> - 2025-11-25 13:51:14
|
https://sourceware.org/cgit/valgrind/commit/?id=5e0aa0cefa62fe3a9f712befb21e50650b9b3dea commit 5e0aa0cefa62fe3a9f712befb21e50650b9b3dea Author: Florian Krohm <fl...@ei...> Date: Tue Nov 25 13:50:37 2025 +0000 s390: PFPO facility related cleanups (BZ 509562) The PFPO facility is always present on the supported machines. - Remove VEX_HWCAPS_S390X_PFPO, s390_host_has_pfpo and EmFail_S390X_pfpo - Update tests/s390x_features.c and none/tests/s390x/pfpo - Update memcheck/tests/vbit-test Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 Diff: --- VEX/priv/guest_s390_toIR.c | 5 ----- VEX/priv/host_s390_defs.c | 1 - VEX/priv/host_s390_defs.h | 2 -- VEX/priv/main_main.c | 3 --- VEX/pub/libvex.h | 4 +--- VEX/pub/libvex_emnote.h | 3 --- coregrind/m_machine.c | 1 - memcheck/tests/vbit-test/irops.c | 10 +--------- none/tests/s390x/pfpo.vgtest | 1 - tests/s390x_features.c | 2 -- 10 files changed, 2 insertions(+), 30 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index b01849cb67..8f42c844d3 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -9530,11 +9530,6 @@ s390_call_pfpo_helper(IRExpr *gr0) static const HChar * s390_irgen_PFPO(void) { - if (! s390_host_has_pfpo) { - emulation_failure(EmFail_S390X_pfpo); - return "pfpo"; - } - IRTemp gr0 = newTemp(Ity_I32); /* word 1 [32:63] of GR 0 */ IRTemp test_bit = newTemp(Ity_I32); /* bit 32 of GR 0 - test validity */ IRTemp fn = newTemp(Ity_I32); /* [33:55] of GR 0 - function code */ diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index 9482193425..96c566823b 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -4838,7 +4838,6 @@ emit_E(UChar *p, UInt op) static UChar * s390_emit_PFPO(UChar *p) { - vassert(s390_host_has_pfpo); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) { S390_DISASM(MNM("pfpo")); } diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index b660b70776..f089eac9a1 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -918,8 +918,6 @@ VexInvalRange patchProfInc_S390(VexEndness endness_host, extern UInt s390_host_hwcaps; /* Convenience macros to test installed facilities */ -#define s390_host_has_pfpo \ - (s390_host_hwcaps & (VEX_HWCAPS_S390X_PFPO)) #define s390_host_has_vx \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_VX)) #define s390_host_has_msa5 \ diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index 9783d0e313..32a78190ad 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1544,8 +1544,6 @@ const HChar* LibVEX_EmNote_string ( VexEmNote ew ) return "Encountered an insn with the IEEE-invalid-operation-exception\n" " control (XiC) bit set to 1. This is not supported. Continuing anyway.\n" " IEEE-invalid-operation exceptions will not be suppressed."; - case EmFail_S390X_pfpo: - return "Instruction pfpo is not supported on this host"; case EmFail_S390X_invalid_PFPO_rounding_mode: return "The rounding mode in GPR 0 for the PFPO instruction" " is invalid"; @@ -1902,7 +1900,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps ) UInt hwcaps_bit; HChar name[6]; } hwcaps_list[] = { - { VEX_HWCAPS_S390X_PFPO, "pfpo" }, { VEX_HWCAPS_S390X_VX, "vx" }, { VEX_HWCAPS_S390X_MSA5, "msa5" }, { VEX_HWCAPS_S390X_MI2, "mi2" }, diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index 3fcecd00fd..07c39eb4ea 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -162,7 +162,6 @@ typedef #define VEX_S390X_MODEL_UNKNOWN 19 /* always last in list */ #define VEX_S390X_MODEL_MASK 0x3F -#define VEX_HWCAPS_S390X_PFPO (1<<17) /* Perform floating point ops facility */ #define VEX_HWCAPS_S390X_VX (1<<18) /* Vector facility */ #define VEX_HWCAPS_S390X_MSA5 (1<<19) /* Message-security-assistance facility 5 */ #define VEX_HWCAPS_S390X_MI2 (1<<20) /* Miscellaneous-instruction-extensions facility 2 */ @@ -176,8 +175,7 @@ typedef #define VEX_HWCAPS_S390X_MSA9 (1<<30) /* Message-security-assist extension 9 */ /* Special value representing all available s390x hwcaps */ -#define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_PFPO | \ - VEX_HWCAPS_S390X_VX | \ +#define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_VX | \ VEX_HWCAPS_S390X_MSA5 | \ VEX_HWCAPS_S390X_MI2 | \ VEX_HWCAPS_S390X_LSC2 | \ diff --git a/VEX/pub/libvex_emnote.h b/VEX/pub/libvex_emnote.h index 04a9e0a6e6..a3fa196520 100644 --- a/VEX/pub/libvex_emnote.h +++ b/VEX/pub/libvex_emnote.h @@ -94,9 +94,6 @@ typedef in VEX and is expected to be zero. */ EmWarn_S390X_XiC_not_zero, - /* pfpo insn is not supported on this host */ - EmFail_S390X_pfpo, - /* GPR 0 contains invalid rounding mode for PFPO instruction */ EmFail_S390X_invalid_PFPO_rounding_mode, diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index e285ec3d39..01a50c9b2c 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1565,7 +1565,6 @@ Bool VG_(machine_get_hwcaps)( void ) UInt hwcaps_bit; const HChar name[6]; // may need adjustment for new facility names } fac_hwcaps[] = { - { False, 44, VEX_HWCAPS_S390X_PFPO, "PFPO" }, { False, 129, VEX_HWCAPS_S390X_VX, "VX" }, { False, 57, VEX_HWCAPS_S390X_MSA5, "MSA5" }, { False, 58, VEX_HWCAPS_S390X_MI2, "MI2" }, diff --git a/memcheck/tests/vbit-test/irops.c b/memcheck/tests/vbit-test/irops.c index e3e06d7c78..8cd400e62a 100644 --- a/memcheck/tests/vbit-test/irops.c +++ b/memcheck/tests/vbit-test/irops.c @@ -1208,7 +1208,6 @@ get_irop(IROp op) if (p->op == op) { #ifdef __s390x__ #define S390X_FEATURES "../../../tests/s390x_features" - int rc; switch (op) { case Iop_I32StoD64: // CDFTR @@ -1253,14 +1252,7 @@ get_irop(IROp op) case Iop_D64toF128: case Iop_D128toF32: case Iop_D128toF64: - case Iop_D128toF128: { - /* These IROps require the Perform Floating Point Operation - facility */ - rc = system(S390X_FEATURES " s390x-pfpo"); - // s390x_features returns 1 if feature does not exist - rc /= 256; - if (rc != 0) return NULL; - } + case Iop_D128toF128: break; /* Other */ default: diff --git a/none/tests/s390x/pfpo.vgtest b/none/tests/s390x/pfpo.vgtest index 0f1f5b9c41..31d43c2856 100644 --- a/none/tests/s390x/pfpo.vgtest +++ b/none/tests/s390x/pfpo.vgtest @@ -1,2 +1 @@ prog: pfpo -prereq: test -e pfpo && ../../../tests/s390x_features s390x-pfpo diff --git a/tests/s390x_features.c b/tests/s390x_features.c index dc91ab549e..f9aa966404 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -231,8 +231,6 @@ static int go(char *feature, char *cpu) match = facilities[0] & FAC_BIT(0); } else if (strcmp(feature, "s390x-exrl") == 0 ) { match = facilities[0] & FAC_BIT(35); - } else if (strcmp(feature, "s390x-pfpo") == 0 ) { - match = facilities[0] & FAC_BIT(44); } else if (strcmp(feature, "s390x-vx") == 0 ) { /* VX needs kernel support; thus check the appropriate HWCAP bit. */ match = GET_HWCAP() & 0x800; |
|
From: Florian K. <fk...@so...> - 2025-11-25 13:24:25
|
https://sourceware.org/cgit/valgrind/commit/?id=ccbd64548f15918f04ee5ac852de6ad5fa87b6b6 commit ccbd64548f15918f04ee5ac852de6ad5fa87b6b6 Author: Florian Krohm <fl...@ei...> Date: Tue Nov 25 13:23:52 2025 +0000 s390: load/store-on-condition / high-word facility related cleanups (BZ 509562) The load/store-on-condition / high-word facility is always present on the supported machines. - Remove VEX_HWCAPS_S390X_LSC and s390_host_has_lsc - Update tests/s390x_features.c and none/tests/s390x/high-word Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 Diff: --- VEX/priv/host_s390_defs.c | 3 +-- VEX/priv/host_s390_defs.h | 2 -- VEX/priv/main_main.c | 1 - VEX/pub/libvex.h | 4 +--- coregrind/m_machine.c | 1 - none/tests/s390x/high-word.vgtest | 1 - tests/s390x_features.c | 2 -- 7 files changed, 2 insertions(+), 12 deletions(-) diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index 948eb977e9..9482193425 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -4950,7 +4950,6 @@ s390_emit_SRXT(UChar *p, UChar r3, UChar r1, UChar r2) static UChar * s390_emit_LOCGR(UChar *p, UChar m3, UChar r1, UChar r2) { - vassert(s390_host_has_lsc); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("locgr", cls_disasm), GPR(r1), GPR(r2), MASK(m3)); @@ -9614,7 +9613,7 @@ s390_insn_cond_move_emit(UChar *buf, const s390_insn *insn) p = buf; - if (s390_host_has_lsc && hregClass(dst) == HRcInt64) { + if (hregClass(dst) == HRcInt64) { /* LOCx is not the preferred way to implement an unconditional load. */ if (cond == S390_CC_ALWAYS) goto use_branch_insn; diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index f62244dcfc..b660b70776 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -918,8 +918,6 @@ VexInvalRange patchProfInc_S390(VexEndness endness_host, extern UInt s390_host_hwcaps; /* Convenience macros to test installed facilities */ -#define s390_host_has_lsc \ - (s390_host_hwcaps & (VEX_HWCAPS_S390X_LSC)) #define s390_host_has_pfpo \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_PFPO)) #define s390_host_has_vx \ diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index ce6f6bd112..9783d0e313 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1902,7 +1902,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps ) UInt hwcaps_bit; HChar name[6]; } hwcaps_list[] = { - { VEX_HWCAPS_S390X_LSC, "lsc" }, { VEX_HWCAPS_S390X_PFPO, "pfpo" }, { VEX_HWCAPS_S390X_VX, "vx" }, { VEX_HWCAPS_S390X_MSA5, "msa5" }, diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index 90fc9e39d5..3fcecd00fd 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -162,7 +162,6 @@ typedef #define VEX_S390X_MODEL_UNKNOWN 19 /* always last in list */ #define VEX_S390X_MODEL_MASK 0x3F -#define VEX_HWCAPS_S390X_LSC (1<<16) /* Conditional load/store facility */ #define VEX_HWCAPS_S390X_PFPO (1<<17) /* Perform floating point ops facility */ #define VEX_HWCAPS_S390X_VX (1<<18) /* Vector facility */ #define VEX_HWCAPS_S390X_MSA5 (1<<19) /* Message-security-assistance facility 5 */ @@ -177,8 +176,7 @@ typedef #define VEX_HWCAPS_S390X_MSA9 (1<<30) /* Message-security-assist extension 9 */ /* Special value representing all available s390x hwcaps */ -#define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_LSC | \ - VEX_HWCAPS_S390X_PFPO | \ +#define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_PFPO | \ VEX_HWCAPS_S390X_VX | \ VEX_HWCAPS_S390X_MSA5 | \ VEX_HWCAPS_S390X_MI2 | \ diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index b25358ba07..e285ec3d39 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1565,7 +1565,6 @@ Bool VG_(machine_get_hwcaps)( void ) UInt hwcaps_bit; const HChar name[6]; // may need adjustment for new facility names } fac_hwcaps[] = { - { False, 45, VEX_HWCAPS_S390X_LSC, "LSC" }, { False, 44, VEX_HWCAPS_S390X_PFPO, "PFPO" }, { False, 129, VEX_HWCAPS_S390X_VX, "VX" }, { False, 57, VEX_HWCAPS_S390X_MSA5, "MSA5" }, diff --git a/none/tests/s390x/high-word.vgtest b/none/tests/s390x/high-word.vgtest index 7c4293783a..ca27517f89 100644 --- a/none/tests/s390x/high-word.vgtest +++ b/none/tests/s390x/high-word.vgtest @@ -1,2 +1 @@ prog: high-word -prereq: ../../../tests/s390x_features 's390x-highw' diff --git a/tests/s390x_features.c b/tests/s390x_features.c index fa96ee8f4d..dc91ab549e 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -233,8 +233,6 @@ static int go(char *feature, char *cpu) match = facilities[0] & FAC_BIT(35); } else if (strcmp(feature, "s390x-pfpo") == 0 ) { match = facilities[0] & FAC_BIT(44); - } else if (strcmp(feature, "s390x-highw") == 0 ) { - match = facilities[0] & FAC_BIT(45); } else if (strcmp(feature, "s390x-vx") == 0 ) { /* VX needs kernel support; thus check the appropriate HWCAP bit. */ match = GET_HWCAP() & 0x800; |
|
From: Florian K. <fk...@so...> - 2025-11-25 13:04:21
|
https://sourceware.org/cgit/valgrind/commit/?id=52e90aecccc79383712b3b4227a7ef5196dad6b9 commit 52e90aecccc79383712b3b4227a7ef5196dad6b9 Author: Florian Krohm <fl...@ei...> Date: Tue Nov 25 13:03:37 2025 +0000 s390: floating-point-support-enhancement facility related cleanups (BZ 509562) The floating-point-support-enhancement facility is always present on the supported machines. - Remove VEX_HWCAPS_S390X_FGX and s390_host_has_fgx - Remove wrapper functions: s390_emit_LGDRw, s390_emit_LDGRw Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 Diff: --- VEX/priv/host_s390_defs.c | 44 +++++--------------------------------------- VEX/priv/host_s390_defs.h | 2 -- VEX/priv/main_main.c | 1 - VEX/pub/libvex.h | 4 +--- coregrind/m_machine.c | 1 - 5 files changed, 6 insertions(+), 46 deletions(-) diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index dde8d65466..948eb977e9 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -3658,8 +3658,6 @@ s390_emit_LDY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_LDGR(UChar *p, UChar r1, UChar r2) { - vassert(s390_host_has_fgx); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("ldgr"), FPR(r1), GPR(r2)); @@ -3670,8 +3668,6 @@ s390_emit_LDGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LGDR(UChar *p, UChar r1, UChar r2) { - vassert(s390_host_has_fgx); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("lgdr"), GPR(r1), FPR(r2)); @@ -5086,39 +5082,9 @@ s390_emit_load_32imm(UChar *p, UChar reg, UInt val) } /*------------------------------------------------------------*/ -/*--- Wrapper functions ---*/ +/*--- Emit functions for vector insns ---*/ /*------------------------------------------------------------*/ -static UChar * -s390_emit_LGDRw(UChar *p, UChar r1, UChar r2) -{ - if (s390_host_has_fgx) { - return s390_emit_LGDR(p, r1, r2); - } - - /* Store the FPR at memory[sp - 8]. This is safe because SP grows towards - smaller addresses and is 8-byte aligned. Then load the GPR from that - memory location/ */ - p = s390_emit_STDY(p, r2, R0, S390_REGNO_STACK_POINTER, DISP20(-8)); - return s390_emit_LG(p, r1, R0, S390_REGNO_STACK_POINTER, DISP20(-8)); -} - - -static UChar * -s390_emit_LDGRw(UChar *p, UChar r1, UChar r2) -{ - if (s390_host_has_fgx) { - return s390_emit_LDGR(p, r1, r2); - } - - /* Store the GPR at memory[sp - 8]. This is safe because SP grows towards - smaller addresses and is 8-byte aligned. Then load the FPR from that - memory location/ */ - p = s390_emit_STG(p, r2, R0, S390_REGNO_STACK_POINTER, DISP20(-8)); - return s390_emit_LDY(p, r1, R0, S390_REGNO_STACK_POINTER, DISP20(-8)); -} - - static UChar * s390_emit_VL(UChar *p, UChar v1, UChar x2, UChar b2, UShort d2) { @@ -8040,17 +8006,17 @@ s390_insn_move_emit(UChar *buf, const s390_insn *insn) if (dst_class == HRcFlt64 && src_class == HRcInt64) { if (insn->size == 4) { buf = s390_emit_SLLG(buf, R0, src, 0, DISP20(32)); /* r0 = src << 32 */ - return s390_emit_LDGRw(buf, dst, R0); + return s390_emit_LDGR(buf, dst, R0); } else { - return s390_emit_LDGRw(buf, dst, src); + return s390_emit_LDGR(buf, dst, src); } } if (dst_class == HRcInt64 && src_class == HRcFlt64) { if (insn->size == 4) { - buf = s390_emit_LGDRw(buf, dst, src); + buf = s390_emit_LGDR(buf, dst, src); return s390_emit_SRLG(buf, dst, dst, 0, DISP20(32)); /* dst >>= 32 */ } else { - return s390_emit_LGDRw(buf, dst, src); + return s390_emit_LGDR(buf, dst, src); } } if (dst_class == HRcFlt64 && src_class == HRcVec128) { diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index 1845ccd002..f62244dcfc 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -918,8 +918,6 @@ VexInvalRange patchProfInc_S390(VexEndness endness_host, extern UInt s390_host_hwcaps; /* Convenience macros to test installed facilities */ -#define s390_host_has_fgx \ - (s390_host_hwcaps & (VEX_HWCAPS_S390X_FGX)) #define s390_host_has_lsc \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_LSC)) #define s390_host_has_pfpo \ diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index c1cda11038..ce6f6bd112 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1902,7 +1902,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps ) UInt hwcaps_bit; HChar name[6]; } hwcaps_list[] = { - { VEX_HWCAPS_S390X_FGX, "fgx" }, { VEX_HWCAPS_S390X_LSC, "lsc" }, { VEX_HWCAPS_S390X_PFPO, "pfpo" }, { VEX_HWCAPS_S390X_VX, "vx" }, diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index b5ae0ebcc7..90fc9e39d5 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -162,7 +162,6 @@ typedef #define VEX_S390X_MODEL_UNKNOWN 19 /* always last in list */ #define VEX_S390X_MODEL_MASK 0x3F -#define VEX_HWCAPS_S390X_FGX (1<<10) /* FPR-GR transfer facility */ #define VEX_HWCAPS_S390X_LSC (1<<16) /* Conditional load/store facility */ #define VEX_HWCAPS_S390X_PFPO (1<<17) /* Perform floating point ops facility */ #define VEX_HWCAPS_S390X_VX (1<<18) /* Vector facility */ @@ -178,8 +177,7 @@ typedef #define VEX_HWCAPS_S390X_MSA9 (1<<30) /* Message-security-assist extension 9 */ /* Special value representing all available s390x hwcaps */ -#define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_FGX | \ - VEX_HWCAPS_S390X_LSC | \ +#define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_LSC | \ VEX_HWCAPS_S390X_PFPO | \ VEX_HWCAPS_S390X_VX | \ VEX_HWCAPS_S390X_MSA5 | \ diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index 7f794fd873..b25358ba07 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1565,7 +1565,6 @@ Bool VG_(machine_get_hwcaps)( void ) UInt hwcaps_bit; const HChar name[6]; // may need adjustment for new facility names } fac_hwcaps[] = { - { False, 41, VEX_HWCAPS_S390X_FGX, "FGX" }, { False, 45, VEX_HWCAPS_S390X_LSC, "LSC" }, { False, 44, VEX_HWCAPS_S390X_PFPO, "PFPO" }, { False, 129, VEX_HWCAPS_S390X_VX, "VX" }, |
|
From: Mark W. <ma...@kl...> - 2025-11-25 12:15:00
|
Sourceware service migration; downtime friday/weekend 28/29/30 nov Various sourceware.org, cygwin.com, gcc.gnu.org, dwarfstd.org, elfutils.org and valgrind.org services will migrate to a bigger server in a new datacenter this Friday afternoon. We already did a test migration and theoretically a fresh data sync to the new datacenter should take just ~4 hours. But there are also various DNS updates that need to be coordinated and might take some time to propagate. So expect some service interruptions starting Friday afternoon possibily extending into the weekend. Please follow https://fosstodon.org/@sourceware for updates. For more background about bigger servers, datacenter moves and (upcoming) service isolation see https://sourceware.org/sourceware-wiki/Migration2025/ |
|
From: Florian K. <fk...@so...> - 2025-11-25 09:14:37
|
https://sourceware.org/cgit/valgrind/commit/?id=2acc312dbcc098a9e33adcbbc309c6a7edfa9d41 commit 2acc312dbcc098a9e33adcbbc309c6a7edfa9d41 Author: Florian Krohm <fl...@ei...> Date: Tue Nov 25 09:14:11 2025 +0000 s390: general-instructions-extension facility related cleanups (BZ 509562) The general-instructions-extension facility is always present on the supported machines. - Remove VEX_HWCAPS_S390X_GIE and s390_host_has_gie - Remove wrapper functions: s390_emit_MFYw, s390_emit_MHYw, s390_emit_MSFIw - Update tests/s390x_features.c Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 Diff: --- VEX/priv/host_s390_defs.c | 101 +++++----------------------------------------- VEX/priv/host_s390_defs.h | 2 - VEX/priv/host_s390_isel.c | 2 +- VEX/priv/main_main.c | 1 - VEX/pub/libvex.h | 4 +- coregrind/m_machine.c | 1 - tests/s390x_features.c | 2 - 7 files changed, 12 insertions(+), 101 deletions(-) diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index 7b8dbe63db..dde8d65466 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -2108,8 +2108,6 @@ s390_emit_AGHI(UChar *p, UChar r1, UShort i2) static UChar * s390_emit_AGSI(UChar *p, UChar i2, UChar b1, UShort dl1, UChar dh1) { - vassert(s390_host_has_gie); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("agsi"), SDXB(dh1, dl1, 0, b1), INT((Int)(Char)i2)); @@ -2120,8 +2118,6 @@ s390_emit_AGSI(UChar *p, UChar i2, UChar b1, UShort dl1, UChar dh1) static UChar * s390_emit_ASI(UChar *p, UChar i2, UChar b1, UShort dl1, UChar dh1) { - vassert(s390_host_has_gie); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("asi"), SDXB(dh1, dl1, 0, b1), INT((Int)(Char)i2)); @@ -3092,8 +3088,6 @@ s390_emit_M(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_MFY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - vassert(s390_host_has_gie); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("mfy"), GPR(r1), SDXB(dh2, dl2, x2, b2)); @@ -3134,8 +3128,6 @@ s390_emit_MH(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_MHY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - vassert(s390_host_has_gie); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("mhy"), GPR(r1), SDXB(dh2, dl2, x2, b2)); @@ -3246,8 +3238,6 @@ s390_emit_MSG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_MSFI(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_gie); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("msfi"), GPR(r1), INT(i2)); @@ -3258,8 +3248,6 @@ s390_emit_MSFI(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_MSGFI(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_gie); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("msgfi"), GPR(r1), INT(i2)); @@ -3290,8 +3278,6 @@ s390_emit_MVI(UChar *p, UChar i2, UChar b1, UShort d1) static UChar * s390_emit_MVHHI(UChar *p, UChar b1, UShort d1, UShort i2) { - vassert(s390_host_has_gie); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("mvhhi"), UDXB(d1, 0, b1), INT((Int)(Short)i2)); @@ -3302,8 +3288,6 @@ s390_emit_MVHHI(UChar *p, UChar b1, UShort d1, UShort i2) static UChar * s390_emit_MVHI(UChar *p, UChar b1, UShort d1, UShort i2) { - vassert(s390_host_has_gie); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("mvhi"), UDXB(d1, 0, b1), INT((Int)(Short)i2)); @@ -3314,8 +3298,6 @@ s390_emit_MVHI(UChar *p, UChar b1, UShort d1, UShort i2) static UChar * s390_emit_MVGHI(UChar *p, UChar b1, UShort d1, UShort i2) { - vassert(s390_host_has_gie); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("mvghi"), UDXB(d1, 0, b1), INT((Int)(Short)i2)); @@ -5107,46 +5089,6 @@ s390_emit_load_32imm(UChar *p, UChar reg, UInt val) /*--- Wrapper functions ---*/ /*------------------------------------------------------------*/ -/* r1[32:63],r1+1[32:63] = r1+1[32:63] * memory[op2addr][0:31] */ -static UChar * -s390_emit_MFYw(UChar *p, UChar r1, UChar x, UChar b, UShort dl, UChar dh) -{ - if (s390_host_has_gie) { - return s390_emit_MFY(p, r1, x, b, dl, dh); - } - - /* Load from memory into R0, then MULTIPLY with R1 */ - p = s390_emit_LY(p, R0, x, b, dl, dh); - return s390_emit_MR(p, r1, R0); -} - -/* r1[32:63] = r1[32:63] * memory[op2addr][0:15] */ -static UChar * -s390_emit_MHYw(UChar *p, UChar r1, UChar x, UChar b, UShort dl, UChar dh) -{ - if (s390_host_has_gie) { - return s390_emit_MHY(p, r1, x, b, dl, dh); - } - - /* Load from memory into R0, then MULTIPLY with R1 */ - p = s390_emit_LHY(p, R0, x, b, dl, dh); - return s390_emit_MSR(p, r1, R0); -} - -/* r1[32:63] = r1[32:63] * i2 */ -static UChar * -s390_emit_MSFIw(UChar *p, UChar r1, UInt i2) -{ - if (s390_host_has_gie) { - return s390_emit_MSFI(p, r1, i2); - } - - /* Load I2 into R0; then MULTIPLY R0 with R1 */ - p = s390_emit_load_32imm(p, R0, i2); - return s390_emit_MSR(p, r1, R0); -} - - static UChar * s390_emit_LGDRw(UChar *p, UChar r1, UChar r2) { @@ -6785,8 +6727,6 @@ s390_insn_madd(UChar size, s390_amode *dst, UChar delta, ULong value) /* This insn will be mapped to an ASI or AGSI so we can only allow base register plus 12-bit / 20-bit displacement. */ vassert(dst->tag == S390_AMODE_B12 || dst->tag == S390_AMODE_B20); - /* ASI and AGSI require the GIE facility */ - vassert(s390_host_has_gie); insn->tag = S390_INSN_MADD; insn->size = size; @@ -8173,17 +8113,8 @@ s390_insn_load_immediate_emit(UChar *buf, const s390_insn *insn) static UChar * s390_emit_ilih(UChar *buf, UChar size, UChar dst, UChar r2) { - if (s390_host_has_gie) - return s390_emit_RISBG(buf, dst, r2, 64 - 8 * size, 63 - 4 * size, - 4 * size); - - /* Clear dst's upper half. */ - buf = s390_emit_SLLG(buf, dst, dst, 0, DISP20(64 - 4 * size)); - buf = s390_emit_SRLG(buf, dst, dst, 0, DISP20(64 - 4 * size)); - - /* Shift r2 by appropriate amount and OR it into dst. */ - buf = s390_emit_SLLG(buf, R0, r2, 0, DISP20(4 * size)); - return s390_emit_OGR(buf, dst, R0); + return s390_emit_RISBG(buf, dst, r2, 64 - 8 * size, 63 - 4 * size, + 4 * size); } @@ -8366,7 +8297,7 @@ s390_insn_alu_emit(UChar *buf, const s390_insn *insn) return s390_emit_SHY(buf, dst, x, b, DISP20(d)); case S390_ALU_MUL: - return s390_emit_MHYw(buf, dst, x, b, DISP20(d)); + return s390_emit_MHY(buf, dst, x, b, DISP20(d)); /* For bitwise operations: Move two bytes from memory into scratch register r0; then perform operation */ @@ -8497,7 +8428,7 @@ s390_insn_alu_emit(UChar *buf, const s390_insn *insn) return s390_emit_AFI(buf, dst, value); case S390_ALU_SUB: return s390_emit_SLFI(buf, dst, value); - case S390_ALU_MUL: return s390_emit_MSFIw(buf, dst, value); + case S390_ALU_MUL: return s390_emit_MSFI(buf, dst, value); case S390_ALU_AND: return s390_emit_NILF(buf, dst, value); case S390_ALU_OR: return s390_emit_OILF(buf, dst, value); case S390_ALU_XOR: return s390_emit_XILF(buf, dst, value); @@ -8530,7 +8461,7 @@ s390_insn_alu_emit(UChar *buf, const s390_insn *insn) return s390_emit_SGR(buf, dst, R0); case S390_ALU_MUL: - if (ulong_fits_signed_32bit(value) && s390_host_has_gie) { + if (ulong_fits_signed_32bit(value)) { return s390_emit_MSGFI(buf, dst, value); } /* Load constant into R0 then add */ @@ -9367,7 +9298,7 @@ s390_insn_mul_emit(UChar *buf, const s390_insn *insn) case S390_AMODE_B20: case S390_AMODE_BX20: if (signed_multiply) - return s390_emit_MFYw(buf, r1, x, b, DISP20(d)); + return s390_emit_MFY(buf, r1, x, b, DISP20(d)); else return s390_emit_ML(buf, r1, x, b, DISP20(d)); } @@ -10329,7 +10260,7 @@ s390_insn_mimm_emit(UChar *buf, const s390_insn *insn) return s390_emit_MVI(buf, value & 0xFF, b, d); } - if (s390_host_has_gie && ulong_fits_signed_16bit(value)) { + if (ulong_fits_signed_16bit(value)) { value &= 0xFFFF; switch (insn->size) { case 2: return s390_emit_MVHHI(buf, b, d, value); @@ -10734,13 +10665,7 @@ s390_insn_evcheck_emit(UChar *buf, const s390_insn *insn, d = amode->d; /* Decrement the dispatch counter in the guest state */ - if (s390_host_has_gie) { - buf = s390_emit_ASI(buf, -1, b, DISP20(d)); /* 6 bytes */ - } else { - buf = s390_emit_LHI(buf, R0, -1); /* 4 bytes */ - buf = s390_emit_A(buf, R0, 0, b, d); /* 4 bytes */ - buf = s390_emit_ST(buf, R0, 0, b, d); /* 4 bytes */ - } + buf = s390_emit_ASI(buf, -1, b, DISP20(d)); /* 6 bytes */ /* Jump over the next insn if >= 0 */ buf = s390_emit_BRC(buf, S390_CC_HE, (4 + 6 + 2) / 2); /* 4 bytes */ @@ -10771,13 +10696,7 @@ s390_insn_profinc_emit(UChar *buf, template will be patched once the memory location is known. For now we do this with address == 0. */ buf = s390_tchain_load64(buf, S390_REGNO_TCHAIN_SCRATCH, 0); - if (s390_host_has_gie) { - buf = s390_emit_AGSI(buf, 1, S390_REGNO_TCHAIN_SCRATCH, DISP20(0)); - } else { - buf = s390_emit_LGHI(buf, R0, 1); - buf = s390_emit_AG( buf, R0, 0, S390_REGNO_TCHAIN_SCRATCH, DISP20(0)); - buf = s390_emit_STG(buf, R0, 0, S390_REGNO_TCHAIN_SCRATCH, DISP20(0)); - } + buf = s390_emit_AGSI(buf, 1, S390_REGNO_TCHAIN_SCRATCH, DISP20(0)); return buf; } @@ -11223,7 +11142,7 @@ emit_S390Instr(Bool *is_profinc, UChar *buf, Int nbuf, const s390_insn *insn, Int evCheckSzB_S390(void) { - return s390_host_has_gie ? 18 : 24; + return 18; } diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index 9b5e3f00ac..1845ccd002 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -918,8 +918,6 @@ VexInvalRange patchProfInc_S390(VexEndness endness_host, extern UInt s390_host_hwcaps; /* Convenience macros to test installed facilities */ -#define s390_host_has_gie \ - (s390_host_hwcaps & (VEX_HWCAPS_S390X_GIE)) #define s390_host_has_fgx \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_FGX)) #define s390_host_has_lsc \ diff --git a/VEX/priv/host_s390_isel.c b/VEX/priv/host_s390_isel.c index a0d9b75373..9cb9b65d3b 100644 --- a/VEX/priv/host_s390_isel.c +++ b/VEX/priv/host_s390_isel.c @@ -5006,7 +5006,7 @@ s390_isel_stmt(ISelEnv *env, IRStmt *stmt) we can use a memory-to-memory insn */ difference = new_value - old_value; - if (s390_host_has_gie && ulong_fits_signed_8bit(difference)) { + if (ulong_fits_signed_8bit(difference)) { am = s390_amode_for_guest_state(offset); addInstr(env, s390_insn_madd(sizeofIRType(tyd), am, (difference & 0xFF), new_value)); diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index da3ccbd821..c1cda11038 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1902,7 +1902,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps ) UInt hwcaps_bit; HChar name[6]; } hwcaps_list[] = { - { VEX_HWCAPS_S390X_GIE, "gie" }, { VEX_HWCAPS_S390X_FGX, "fgx" }, { VEX_HWCAPS_S390X_LSC, "lsc" }, { VEX_HWCAPS_S390X_PFPO, "pfpo" }, diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index cef40335ef..b5ae0ebcc7 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -162,7 +162,6 @@ typedef #define VEX_S390X_MODEL_UNKNOWN 19 /* always last in list */ #define VEX_S390X_MODEL_MASK 0x3F -#define VEX_HWCAPS_S390X_GIE (1<<8) /* General-instruction-extension facility */ #define VEX_HWCAPS_S390X_FGX (1<<10) /* FPR-GR transfer facility */ #define VEX_HWCAPS_S390X_LSC (1<<16) /* Conditional load/store facility */ #define VEX_HWCAPS_S390X_PFPO (1<<17) /* Perform floating point ops facility */ @@ -179,8 +178,7 @@ typedef #define VEX_HWCAPS_S390X_MSA9 (1<<30) /* Message-security-assist extension 9 */ /* Special value representing all available s390x hwcaps */ -#define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_GIE | \ - VEX_HWCAPS_S390X_FGX | \ +#define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_FGX | \ VEX_HWCAPS_S390X_LSC | \ VEX_HWCAPS_S390X_PFPO | \ VEX_HWCAPS_S390X_VX | \ diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index e7aca5cb32..7f794fd873 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1565,7 +1565,6 @@ Bool VG_(machine_get_hwcaps)( void ) UInt hwcaps_bit; const HChar name[6]; // may need adjustment for new facility names } fac_hwcaps[] = { - { False, 34, VEX_HWCAPS_S390X_GIE, "GIE" }, { False, 41, VEX_HWCAPS_S390X_FGX, "FGX" }, { False, 45, VEX_HWCAPS_S390X_LSC, "LSC" }, { False, 44, VEX_HWCAPS_S390X_PFPO, "PFPO" }, diff --git a/tests/s390x_features.c b/tests/s390x_features.c index 593c8c556b..fa96ee8f4d 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -229,8 +229,6 @@ static int go(char *feature, char *cpu) match = (facilities[0] & FAC_BIT(1)) && (facilities[0] & FAC_BIT(2)); } else if (strcmp(feature, "s390x-n3") == 0 ) { match = facilities[0] & FAC_BIT(0); - } else if (strcmp(feature, "s390x-genins") == 0 ) { - match = facilities[0] & FAC_BIT(34); } else if (strcmp(feature, "s390x-exrl") == 0 ) { match = facilities[0] & FAC_BIT(35); } else if (strcmp(feature, "s390x-pfpo") == 0 ) { |
|
From: Paul F. <pa...@so...> - 2025-11-25 07:21:58
|
https://sourceware.org/cgit/valgrind/commit/?id=097cd6ccfc225c79b33d67b0f022f7179128b7cf commit 097cd6ccfc225c79b33d67b0f022f7179128b7cf Author: Paul Floyd <pj...@wa...> Date: Tue Nov 25 08:20:06 2025 +0100 Bug 512571 - regtest problems with darwin dsymuti There was alrwady a stderr filter for dsymutil, but only for DRD. So I moved that to tests/filter_stderr_basic.in I added single quotes around $dir in tests/vg_regtest.in for arch_test and os_test. That now prevents directory names containing spaces from being seen as more than one argument. Diff: --- NEWS | 1 + drd/tests/filter_stderr.in | 1 - tests/filter_stderr_basic.in | 6 ++++-- tests/vg_regtest.in | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 84673b4077..89493bbf6a 100644 --- a/NEWS +++ b/NEWS @@ -35,6 +35,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. '-Wno-alloc-size-larger-than=18446744073709551615' 512030 s390x: bfp-convert testcase fails 512037 malloc trace does not print free size or alignment +512571 regtest problems with darwin dsymuti To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/drd/tests/filter_stderr.in b/drd/tests/filter_stderr.in index 485a588b89..fea9bcff9d 100644 --- a/drd/tests/filter_stderr.in +++ b/drd/tests/filter_stderr.in @@ -27,7 +27,6 @@ $SED \ -e "/^warning: evaluate_Dwarf3_Expr: unhandled DW_OP_.*/d" \ -e '/^warning: addVar:.*/d' \ -e 's/^Allocation context: Data section of .\//Allocation context: BSS section of /' \ --e '/^run: \/usr\/bin\/dsymutil.*/d' \ -e "s/, in frame #[0-9]* of thread /, in frame #? of thread /" \ -e "s/(\(functional\|thread\):[0-9]*)/(\1:...)/" \ -e "s/(tc20_verifywrap.c:261)/(tc20_verifywrap.c:262)/" \ diff --git a/tests/filter_stderr_basic.in b/tests/filter_stderr_basic.in index d14ca727df..90d8993195 100644 --- a/tests/filter_stderr_basic.in +++ b/tests/filter_stderr_basic.in @@ -77,7 +77,9 @@ $SED "s/[0-9][0-9]* bytes below stack pointer/.... bytes below stack pointer/" | $SED '/warning: the debug information found in "[^"]*" does not match/d' | # Suppress warnings from Dwarf reader -$SED '/warning: evaluate_Dwarf3_Expr: unhandled DW_OP_/d' +$SED '/warning: evaluate_Dwarf3_Expr: unhandled DW_OP_/d' | # Suppress Darwin dyld errors -$SED '/^used_suppression:.*OSX.*dyld.*default.supp:*/d' +$SED '/^used_suppression:.*OSX.*dyld.*default.supp:*/d' | +# Suppress Darwin running dsymutil +$SED -e '/^run: \/usr\/bin\/dsymutil.*/d' \ diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in index 0d7ec71a66..9bc95fcbbf 100644 --- a/tests/vg_regtest.in +++ b/tests/vg_regtest.in @@ -689,8 +689,8 @@ sub test_one_dir($$) # ppc/ directories ('arch_test' returns 1 for this case). Likewise for # the OS and platform. # Nb: weird Perl-ism -- exit code of '1' is seen by Perl as 256... - if (256 == system("$tests_dir/tests/arch_test $dir")) { return; } - if (256 == system("$tests_dir/tests/os_test $dir")) { return; } + if (256 == system("$tests_dir/tests/arch_test '$dir'")) { return; } + if (256 == system("$tests_dir/tests/os_test '$dir'")) { return; } if ($dir =~ /(\w+)-(\w+)/ && 256 == system("$tests_dir/tests/platform_test $1 $2")) { return; } if ($dir =~ "dSYM") { return; } |
|
From: Florian K. <fk...@so...> - 2025-11-24 23:22:14
|
https://sourceware.org/cgit/valgrind/commit/?id=64f3a489997b7f8f574caaa3ed87ee15557390d0 commit 64f3a489997b7f8f574caaa3ed87ee15557390d0 Author: Florian Krohm <fl...@ei...> Date: Mon Nov 24 23:21:29 2025 +0000 s390: extended-immediate facility related cleanups (BZ 509562) The extended-immediate facility is always present on the supported machines. - Remove VEX_HWCAPS_S390X_EIMM and s390_host_has_eimm - Remove unused functions: s390_emit_LLILH, s390_emit_IILL, s390_emit_IILH, s390_emit_IIHL, s390_emit_IIHH - Remove wrapper functions: s390_emit_NILFw, s390_emit_OILFw, s390_emit_XILFw, s390_emit_LBRw, s390_emit_LGBRw, s390_emit_LHRw, s390_emit_LGHRw, s390_emit_LGFIw, s390_emit_LLCRw, s390_emit_LLGCRw, s390_emit_LLHRw, s390_emit_LLGHRw, s390_emit_LLCw, s390_emit_LLHw, s390_emit_LLILFw, s390_emit_AFIw, s390_emit_SLFIw, s390_emit_SLGFIw, s390_emit_LTw, s390_emit_LTGw, s390_emit_CFIw, s390_emit_CLFIw - Update tests/s390x_features.c Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 Diff: --- VEX/priv/host_s390_defs.c | 663 +++++----------------------------------------- VEX/priv/host_s390_defs.h | 2 - VEX/priv/main_main.c | 1 - VEX/pub/libvex.h | 4 +- coregrind/m_machine.c | 1 - tests/s390x_features.c | 2 - 6 files changed, 65 insertions(+), 608 deletions(-) diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index 4831e1d67d..7b8dbe63db 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -2048,8 +2048,6 @@ s390_emit_AG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_AFI(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("afi"), GPR(r1), INT(i2)); @@ -2060,8 +2058,6 @@ s390_emit_AFI(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_AGFI(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("agfi"), GPR(r1), INT(i2)); @@ -2186,8 +2182,6 @@ s390_emit_NG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_NIHF(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("nihf"), GPR(r1), UINT(i2)); @@ -2198,8 +2192,6 @@ s390_emit_NIHF(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_NILF(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("nilf"), GPR(r1), UINT(i2)); @@ -2340,8 +2332,6 @@ s390_emit_CG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_CFI(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("cfi"), GPR(r1), INT(i2)); @@ -2352,8 +2342,6 @@ s390_emit_CFI(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_CGFI(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("cgfi"), GPR(r1), INT(i2)); @@ -2474,8 +2462,6 @@ s390_emit_CLG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_CLFI(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("clfi"), GPR(r1), UINT(i2)); @@ -2486,8 +2472,6 @@ s390_emit_CLFI(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_CLGFI(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("clgfi"), GPR(r1), UINT(i2)); @@ -2628,8 +2612,6 @@ s390_emit_XG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_XIHF(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("xihf"), GPR(r1), UINT(i2)); @@ -2640,8 +2622,6 @@ s390_emit_XIHF(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_XILF(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("xilf"), GPR(r1), UINT(i2)); @@ -2662,8 +2642,6 @@ s390_emit_XC(UChar *p, UInt l, UChar b1, UShort d1, UChar b2, UShort d2) static UChar * s390_emit_FLOGR(UChar *p, UChar r1, UChar r2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("flogr"), GPR(r1), GPR(r2)); @@ -2694,8 +2672,6 @@ s390_emit_ICY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_IIHF(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("iihf"), GPR(r1), UINT(i2)); @@ -2703,31 +2679,9 @@ s390_emit_IIHF(UChar *p, UChar r1, UInt i2) } -static UChar * -s390_emit_IIHH(UChar *p, UChar r1, UShort i2) -{ - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("iihh"), GPR(r1), UINT(i2)); - - return emit_RI(p, 0xa5000000, r1, i2); -} - - -static UChar * -s390_emit_IIHL(UChar *p, UChar r1, UShort i2) -{ - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("iihl"), GPR(r1), UINT(i2)); - - return emit_RI(p, 0xa5010000, r1, i2); -} - - static UChar * s390_emit_IILF(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("iilf"), GPR(r1), UINT(i2)); @@ -2735,26 +2689,6 @@ s390_emit_IILF(UChar *p, UChar r1, UInt i2) } -static UChar * -s390_emit_IILH(UChar *p, UChar r1, UShort i2) -{ - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("iilh"), GPR(r1), UINT(i2)); - - return emit_RI(p, 0xa5020000, r1, i2); -} - - -static UChar * -s390_emit_IILL(UChar *p, UChar r1, UShort i2) -{ - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("iill"), GPR(r1), UINT(i2)); - - return emit_RI(p, 0xa5030000, r1, i2); -} - - static UChar * s390_emit_IPM(UChar *p, UChar r1, UChar r2) { @@ -2838,8 +2772,6 @@ s390_emit_LGF(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_LGFI(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("lgfi"), GPR(r1), INT(i2)); @@ -2870,8 +2802,6 @@ s390_emit_LTGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LT(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("lt"), GPR(r1), SDXB(dh2, dl2, x2, b2)); @@ -2882,8 +2812,6 @@ s390_emit_LT(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_LTG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("ltg"), GPR(r1), SDXB(dh2, dl2, x2, b2)); @@ -2894,8 +2822,6 @@ s390_emit_LTG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_LBR(UChar *p, UChar r1, UChar r2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("lbr"), GPR(r1), GPR(r2)); @@ -2906,8 +2832,6 @@ s390_emit_LBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LGBR(UChar *p, UChar r1, UChar r2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("lgbr"), GPR(r1), GPR(r2)); @@ -2958,8 +2882,6 @@ s390_emit_LCGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LHR(UChar *p, UChar r1, UChar r2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("lhr"), GPR(r1), GPR(r2)); @@ -2970,8 +2892,6 @@ s390_emit_LHR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LGHR(UChar *p, UChar r1, UChar r2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("lghr"), GPR(r1), GPR(r2)); @@ -3052,8 +2972,6 @@ s390_emit_LLGF(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_LLCR(UChar *p, UChar r1, UChar r2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("llcr"), GPR(r1), GPR(r2)); @@ -3064,8 +2982,6 @@ s390_emit_LLCR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LLGCR(UChar *p, UChar r1, UChar r2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("llgcr"), GPR(r1), GPR(r2)); @@ -3076,8 +2992,6 @@ s390_emit_LLGCR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LLC(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("llc"), GPR(r1), SDXB(dh2, dl2, x2, b2)); @@ -3098,8 +3012,6 @@ s390_emit_LLGC(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_LLHR(UChar *p, UChar r1, UChar r2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("llhr"), GPR(r1), GPR(r2)); @@ -3110,8 +3022,6 @@ s390_emit_LLHR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LLGHR(UChar *p, UChar r1, UChar r2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("llghr"), GPR(r1), GPR(r2)); @@ -3122,8 +3032,6 @@ s390_emit_LLGHR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LLH(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("llh"), GPR(r1), SDXB(dh2, dl2, x2, b2)); @@ -3144,8 +3052,6 @@ s390_emit_LLGH(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_LLILF(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("llilf"), GPR(r1), UINT(i2)); @@ -3153,16 +3059,6 @@ s390_emit_LLILF(UChar *p, UChar r1, UInt i2) } -static UChar * -s390_emit_LLILH(UChar *p, UChar r1, UShort i2) -{ - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("llilh"), GPR(r1), UINT(i2)); - - return emit_RI(p, 0xa50e0000, r1, i2); -} - - static UChar * s390_emit_LLILL(UChar *p, UChar r1, UShort i2) { @@ -3480,8 +3376,6 @@ s390_emit_OG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_OIHF(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("oihf"), GPR(r1), UINT(i2)); @@ -3492,8 +3386,6 @@ s390_emit_OIHF(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_OILF(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("oilf"), GPR(r1), UINT(i2)); @@ -3714,8 +3606,6 @@ s390_emit_SHY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_SLFI(UChar *p, UChar r1, UInt i2) { - vassert(s390_host_has_eimm); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("slfi"), GPR(r1), UINT(i2)); @@ -5190,33 +5080,16 @@ s390_emit_load_64imm(UChar *p, UChar reg, ULong val) return s390_emit_LGHI(p, reg, val); } - if (s390_host_has_eimm) { - if (ulong_fits_unsigned_32bit(val)) { - return s390_emit_LLILF(p, reg, val); - } - if (ulong_fits_signed_32bit(val)) { - /* LGFI's sign extension will recreate the correct 64-bit value */ - return s390_emit_LGFI(p, reg, val); - } - /* Do it in two steps: upper half [0:31] and lower half [32:63] */ - p = s390_emit_IIHF(p, reg, val >> 32); - return s390_emit_IILF(p, reg, val & 0xFFFFFFFF); - } - - /* Fall back */ if (ulong_fits_unsigned_32bit(val)) { - p = s390_emit_LLILH(p, reg, (val >> 16) & 0xFFFF); /* sets val[32:47] - val[0:31] = 0 */ - p = s390_emit_IILL(p, reg, val & 0xFFFF); /* sets val[48:63] */ - return p; + return s390_emit_LLILF(p, reg, val); } - - p = s390_emit_IIHH(p, reg, (val >> 48) & 0xFFFF); - p = s390_emit_IIHL(p, reg, (val >> 32) & 0xFFFF); - p = s390_emit_IILH(p, reg, (val >> 16) & 0xFFFF); - p = s390_emit_IILL(p, reg, val & 0xFFFF); - - return p; + if (ulong_fits_signed_32bit(val)) { + /* LGFI's sign extension will recreate the correct 64-bit value */ + return s390_emit_LGFI(p, reg, val); + } + /* Do it in two steps: upper half [0:31] and lower half [32:63] */ + p = s390_emit_IIHF(p, reg, val >> 32); + return s390_emit_IILF(p, reg, val & 0xFFFFFFFF); } /* Load a 32-bit immediate VAL into register REG. */ @@ -5227,13 +5100,7 @@ s390_emit_load_32imm(UChar *p, UChar reg, UInt val) /* LHI's sign extension will recreate the correct 32-bit value */ return s390_emit_LHI(p, reg, val); } - if (s390_host_has_eimm) { - return s390_emit_IILF(p, reg, val); - } - /* val[0:15] --> (val >> 16) & 0xFFFF - val[16:31] --> val & 0xFFFF */ - p = s390_emit_IILH(p, reg, (val >> 16) & 0xFFFF); - return s390_emit_IILL(p, reg, val & 0xFFFF); + return s390_emit_IILF(p, reg, val); } /*------------------------------------------------------------*/ @@ -5280,311 +5147,6 @@ s390_emit_MSFIw(UChar *p, UChar r1, UInt i2) } -/* r1[32:63] = r1[32:63] & i2 */ -static UChar * -s390_emit_NILFw(UChar *p, UChar r1, UInt i2) -{ - if (s390_host_has_eimm) { - return s390_emit_NILF(p, r1, i2); - } - - /* Load I2 into R0; then AND R0 with R1 */ - p = s390_emit_load_32imm(p, R0, i2); - return s390_emit_NR(p, r1, R0); -} - - -/* r1[32:63] = r1[32:63] | i2 */ -static UChar * -s390_emit_OILFw(UChar *p, UChar r1, UInt i2) -{ - if (s390_host_has_eimm) { - return s390_emit_OILF(p, r1, i2); - } - - /* Load I2 into R0; then AND R0 with R1 */ - p = s390_emit_load_32imm(p, R0, i2); - return s390_emit_OR(p, r1, R0); -} - - -/* r1[32:63] = r1[32:63] ^ i2 */ -static UChar * -s390_emit_XILFw(UChar *p, UChar r1, UInt i2) -{ - if (s390_host_has_eimm) { - return s390_emit_XILF(p, r1, i2); - } - - /* Load I2 into R0; then AND R0 with R1 */ - p = s390_emit_load_32imm(p, R0, i2); - return s390_emit_XR(p, r1, R0); -} - - -/* r1[32:63] = sign_extend(r2[56:63]) */ -static UChar * -s390_emit_LBRw(UChar *p, UChar r1, UChar r2) -{ - if (s390_host_has_eimm) { - return s390_emit_LBR(p, r1, r2); - } - - p = s390_emit_LR(p, r1, r2); /* r1 = r2 */ - p = s390_emit_SLL(p, r1, R0, 24); /* r1 = r1 << 24 */ - return s390_emit_SRA(p, r1, R0, 24); /* r1 = r1 >>a 24 */ -} - - -/* r1[0:63] = sign_extend(r2[56:63]) */ -static UChar * -s390_emit_LGBRw(UChar *p, UChar r1, UChar r2) -{ - if (s390_host_has_eimm) { - return s390_emit_LGBR(p, r1, r2); - } - - p = s390_emit_LR(p, r1, r2); /* r1 = r2 */ - p = s390_emit_SLLG(p, r1, r1, R0, DISP20(56)); /* r1 = r1 << 56 */ - return s390_emit_SRAG(p, r1, r1, R0, DISP20(56)); /* r1 = r1 >>a 56 */ -} - - -/* r1[32:63] = sign_extend(r2[48:63]) */ -static UChar * -s390_emit_LHRw(UChar *p, UChar r1, UChar r2) -{ - if (s390_host_has_eimm) { - return s390_emit_LHR(p, r1, r2); - } - - p = s390_emit_LR(p, r1, r2); /* r1 = r2 */ - p = s390_emit_SLL(p, r1, R0, 16); /* r1 = r1 << 16 */ - return s390_emit_SRA(p, r1, R0, 16); /* r1 = r1 >>a 16 */ -} - - -/* r1[0:63] = sign_extend(r2[48:63]) */ -static UChar * -s390_emit_LGHRw(UChar *p, UChar r1, UChar r2) -{ - if (s390_host_has_eimm) { - return s390_emit_LGHR(p, r1, r2); - } - - p = s390_emit_LR(p, r1, r2); /* r1 = r2 */ - p = s390_emit_SLLG(p, r1, r1, R0, DISP20(48)); /* r1 = r1 << 48 */ - return s390_emit_SRAG(p, r1, r1, R0, DISP20(48)); /* r1 = r1 >>a 48 */ -} - - -/* r1[0:63] = sign_extend(i2) */ -static UChar * -s390_emit_LGFIw(UChar *p, UChar r1, UInt i2) -{ - if (s390_host_has_eimm) { - return s390_emit_LGFI(p, r1, i2); - } - - p = s390_emit_load_32imm(p, R0, i2); - return s390_emit_LGFR(p, r1, R0); -} - - -/* r1[32:63] = zero_extend($r2[56:63]) */ -static UChar * -s390_emit_LLCRw(UChar *p, UChar r1, UChar r2) -{ - if (s390_host_has_eimm) { - return s390_emit_LLCR(p, r1, r2); - } - - p = s390_emit_LR(p, r1, r2); - p = s390_emit_LHI(p, R0, 0xFF); - return s390_emit_NR(p, r1, R0); -} - - -/* r1[0:63] = zero_extend($r2[56:63]) */ -static UChar * -s390_emit_LLGCRw(UChar *p, UChar r1, UChar r2) -{ - if (s390_host_has_eimm) { - return s390_emit_LLGCR(p, r1, r2); - } - - p = s390_emit_LR(p, r1, r2); - p = s390_emit_LLILL(p, R0, 0xFF); - return s390_emit_NGR(p, r1, R0); -} - - -/* r1[32:63] = zero_extend(r2[48:63]) */ -static UChar * -s390_emit_LLHRw(UChar *p, UChar r1, UChar r2) -{ - if (s390_host_has_eimm) { - return s390_emit_LLHR(p, r1, r2); - } - - p = s390_emit_LR(p, r1, r2); - p = s390_emit_LLILL(p, R0, 0xFFFF); - return s390_emit_NR(p, r1, R0); -} - - -/* r1[0:63] = zero_extend(r2[48:63]) */ -static UChar * -s390_emit_LLGHRw(UChar *p, UChar r1, UChar r2) -{ - if (s390_host_has_eimm) { - return s390_emit_LLGHR(p, r1, r2); - } - - p = s390_emit_LR(p, r1, r2); - p = s390_emit_LLILL(p, R0, 0xFFFF); - return s390_emit_NGR(p, r1, R0); -} - - -/* r1[32:63] = zero_extend(mem[op2addr][0:7]) */ -static UChar * -s390_emit_LLCw(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl, UChar dh) -{ - if (s390_host_has_eimm) { - return s390_emit_LLC(p, r1, x2, b2, dl, dh); - } - - if (dh == 0) { - p = s390_emit_IC(p, r1, x2, b2, dl); - } else { - p = s390_emit_ICY(p, r1, x2, b2, dl, dh); - } - p = s390_emit_LLILL(p, R0, 0xFF); - return s390_emit_NR(p, r1, R0); -} - - -/* r1[32:63] = zero_extend(mem[op2addr][0:15]) */ -static UChar * -s390_emit_LLHw(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl, UChar dh) -{ - if (s390_host_has_eimm) { - return s390_emit_LLH(p, r1, x2, b2, dl, dh); - } - - p = s390_emit_LLGH(p, r1, x2, b2, dl, dh); - p = s390_emit_LLILL(p, R0, 0xFFFF); - return s390_emit_NR(p, r1, R0); -} - - -/* r1[0:63] = zero_extend(i2) */ -static UChar * -s390_emit_LLILFw(UChar *p, UChar r1, UInt i2) -{ - if (s390_host_has_eimm) { - return s390_emit_LLILF(p, r1, i2); - } - - p = s390_emit_LLILH(p, r1, (i2 >> 16) & 0xFFFF); /* i2[0:15] */ - return s390_emit_OILL(p, r1, i2 & 0xFFFF); -} - - -/* r1[32:63] = r1[32:63] + i2 */ -static UChar * -s390_emit_AFIw(UChar *p, UChar r1, UInt i2) -{ - if (s390_host_has_eimm) { - return s390_emit_AFI(p, r1, i2); - } - /* Load 32 bit immediate to R0 then add */ - p = s390_emit_load_32imm(p, R0, i2); - return s390_emit_AR(p, r1, R0); -} - - -/* r1[32:63] = r1[32:63] - i2 */ -static UChar * -s390_emit_SLFIw(UChar *p, UChar r1, UInt i2) -{ - if (s390_host_has_eimm) { - return s390_emit_SLFI(p, r1, i2); - } - - /* Load 32 bit immediate to R0 then subtract */ - p = s390_emit_load_32imm(p, R0, i2); - return s390_emit_SR(p, r1, R0); -} - - -/* r1[0:63] = r1[0:63] - zero_extend(i2) */ -static UChar * -s390_emit_SLGFIw(UChar *p, UChar r1, UInt i2) -{ - if (s390_host_has_eimm) { - return s390_emit_SLGFI(p, r1, i2); - } - - /* Load zero-extended 32 bit immediate to R0 then subtract */ - p = s390_emit_load_64imm(p, R0, i2); - return s390_emit_SGR(p, r1, R0); -} - - -static UChar * -s390_emit_LTw(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl, UChar dh) -{ - if (s390_host_has_eimm) { - return s390_emit_LT(p, r1, x2, b2, dl, dh); - } - /* Load 32 bit from memory to R0 then compare */ - if (dh == 0) { - p = s390_emit_L(p, R0, x2, b2, dl); - } else { - p = s390_emit_LY(p, R0, x2, b2, dl, dh); - } - return s390_emit_LTR(p, r1, R0); -} - - -static UChar * -s390_emit_LTGw(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl, UChar dh) -{ - if (s390_host_has_eimm) { - return s390_emit_LTG(p, r1, x2, b2, dl, dh); - } - /* Load 64 bit from memory to R0 then compare */ - p = s390_emit_LG(p, R0, x2, b2, dl, dh); - return s390_emit_LTGR(p, r1, R0); -} - - -static UChar * -s390_emit_CFIw(UChar *p, UChar r1, UInt i2) -{ - if (s390_host_has_eimm) { - return s390_emit_CFI(p, r1, i2); - } - /* Load 32 bit immediate to R0 then compare */ - p = s390_emit_load_32imm(p, R0, i2); - return s390_emit_CR(p, r1, R0); -} - - -static UChar * -s390_emit_CLFIw(UChar *p, UChar r1, UInt i2) -{ - if (s390_host_has_eimm) { - return s390_emit_CLFI(p, r1, i2); - } - /* Load 32 bit immediate to R0 then compare */ - p = s390_emit_load_32imm(p, R0, i2); - return s390_emit_CLR(p, r1, R0); -} - - static UChar * s390_emit_LGDRw(UChar *p, UChar r1, UChar r2) { @@ -8900,7 +8462,7 @@ s390_insn_alu_emit(UChar *buf, const s390_insn *insn) return s390_emit_AHI(buf, dst, value); case S390_ALU_SUB: - return s390_emit_SLFIw(buf, dst, value); + return s390_emit_SLFI(buf, dst, value); case S390_ALU_MUL: return s390_emit_MHI(buf, dst, value); @@ -8932,13 +8494,13 @@ s390_insn_alu_emit(UChar *buf, const s390_insn *insn) if (uint_fits_signed_16bit(value)) { return s390_emit_AHI(buf, dst, value); } - return s390_emit_AFIw(buf, dst, value); + return s390_emit_AFI(buf, dst, value); - case S390_ALU_SUB: return s390_emit_SLFIw(buf, dst, value); + case S390_ALU_SUB: return s390_emit_SLFI(buf, dst, value); case S390_ALU_MUL: return s390_emit_MSFIw(buf, dst, value); - case S390_ALU_AND: return s390_emit_NILFw(buf, dst, value); - case S390_ALU_OR: return s390_emit_OILFw(buf, dst, value); - case S390_ALU_XOR: return s390_emit_XILFw(buf, dst, value); + case S390_ALU_AND: return s390_emit_NILF(buf, dst, value); + case S390_ALU_OR: return s390_emit_OILF(buf, dst, value); + case S390_ALU_XOR: return s390_emit_XILF(buf, dst, value); case S390_ALU_LSH: return s390_emit_SLL(buf, dst, 0, value); case S390_ALU_RSH: return s390_emit_SRL(buf, dst, 0, value); case S390_ALU_RSHA: return s390_emit_SRA(buf, dst, 0, value); @@ -8952,7 +8514,7 @@ s390_insn_alu_emit(UChar *buf, const s390_insn *insn) if (ulong_fits_signed_16bit(value)) { return s390_emit_AGHI(buf, dst, value); } - if (ulong_fits_signed_32bit(value) && s390_host_has_eimm) { + if (ulong_fits_signed_32bit(value)) { return s390_emit_AGFI(buf, dst, value); } /* Load constant into R0 then add */ @@ -8961,7 +8523,7 @@ s390_insn_alu_emit(UChar *buf, const s390_insn *insn) case S390_ALU_SUB: if (ulong_fits_unsigned_32bit(value)) { - return s390_emit_SLGFIw(buf, dst, value); + return s390_emit_SLGFI(buf, dst, value); } /* Load value into R0; then subtract from destination reg */ buf = s390_emit_load_64imm(buf, R0, value); @@ -8977,31 +8539,16 @@ s390_insn_alu_emit(UChar *buf, const s390_insn *insn) /* Do it in two steps: upper half [0:31] and lower half [32:63] */ case S390_ALU_AND: - if (s390_host_has_eimm) { - buf = s390_emit_NIHF(buf, dst, value >> 32); - return s390_emit_NILF(buf, dst, value & 0xFFFFFFFF); - } - /* Load value into R0; then combine with destination reg */ - buf = s390_emit_load_64imm(buf, R0, value); - return s390_emit_NGR(buf, dst, R0); + buf = s390_emit_NIHF(buf, dst, value >> 32); + return s390_emit_NILF(buf, dst, value & 0xFFFFFFFF); case S390_ALU_OR: - if (s390_host_has_eimm) { - buf = s390_emit_OIHF(buf, dst, value >> 32); - return s390_emit_OILF(buf, dst, value & 0xFFFFFFFF); - } - /* Load value into R0; then combine with destination reg */ - buf = s390_emit_load_64imm(buf, R0, value); - return s390_emit_OGR(buf, dst, R0); + buf = s390_emit_OIHF(buf, dst, value >> 32); + return s390_emit_OILF(buf, dst, value & 0xFFFFFFFF); case S390_ALU_XOR: - if (s390_host_has_eimm) { - buf = s390_emit_XIHF(buf, dst, value >> 32); - return s390_emit_XILF(buf, dst, value & 0xFFFFFFFF); - } - /* Load value into R0; then combine with destination reg */ - buf = s390_emit_load_64imm(buf, R0, value); - return s390_emit_XGR(buf, dst, R0); + buf = s390_emit_XIHF(buf, dst, value >> 32); + return s390_emit_XILF(buf, dst, value & 0xFFFFFFFF); /* No special considerations for long displacement here. Only the six least significant bits of VALUE will be taken; all other bits are @@ -9040,30 +8587,30 @@ s390_widen_emit(UChar *buf, const s390_insn *insn, UInt from_size, because the upper half-word will not be looked at. */ if (insn->size == 4 || insn->size == 2) { /* 8 --> 32 8 --> 16 */ if (sign_extend) - return s390_emit_LBRw(buf, r1, r2); + return s390_emit_LBR(buf, r1, r2); else - return s390_emit_LLCRw(buf, r1, r2); + return s390_emit_LLCR(buf, r1, r2); } if (insn->size == 8) { /* 8 --> 64 */ if (sign_extend) - return s390_emit_LGBRw(buf, r1, r2); + return s390_emit_LGBR(buf, r1, r2); else - return s390_emit_LLGCRw(buf, r1, r2); + return s390_emit_LLGCR(buf, r1, r2); } goto fail; case 2: if (insn->size == 4) { /* 16 --> 32 */ if (sign_extend) - return s390_emit_LHRw(buf, r1, r2); + return s390_emit_LHR(buf, r1, r2); else - return s390_emit_LLHRw(buf, r1, r2); + return s390_emit_LLHR(buf, r1, r2); } if (insn->size == 8) { /* 16 --> 64 */ if (sign_extend) - return s390_emit_LGHRw(buf, r1, r2); + return s390_emit_LGHR(buf, r1, r2); else - return s390_emit_LLGHRw(buf, r1, r2); + return s390_emit_LLGHR(buf, r1, r2); } goto fail; @@ -9094,7 +8641,7 @@ s390_widen_emit(UChar *buf, const s390_insn *insn, UInt from_size, if (sign_extend) return s390_emit_LB(buf, r1, x, b, DISP20(d)); else - return s390_emit_LLCw(buf, r1, x, b, DISP20(d)); + return s390_emit_LLC(buf, r1, x, b, DISP20(d)); } if (insn->size == 8) { if (sign_extend) @@ -9107,7 +8654,7 @@ s390_widen_emit(UChar *buf, const s390_insn *insn, UInt from_size, case 2: if (insn->size == 4) { /* 16 --> 32 */ if (sign_extend == 0) - return s390_emit_LLHw(buf, r1, x, b, DISP20(d)); + return s390_emit_LLH(buf, r1, x, b, DISP20(d)); switch (src->tag) { case S390_AMODE_B12: @@ -9184,9 +8731,9 @@ s390_widen_emit(UChar *buf, const s390_insn *insn, UInt from_size, case 4: if (insn->size == 8) { /* 32 --> 64 */ if (sign_extend) - return s390_emit_LGFIw(buf, r1, value); + return s390_emit_LGFI(buf, r1, value); else - return s390_emit_LLILFw(buf, r1, value); + return s390_emit_LLILF(buf, r1, value); } goto fail; @@ -9481,10 +9028,10 @@ s390_insn_test_emit(UChar *buf, const s390_insn *insn) } case 4: - return s390_emit_LTw(buf, R0, x, b, DISP20(d)); + return s390_emit_LT(buf, R0, x, b, DISP20(d)); case 8: - return s390_emit_LTGw(buf, R0, x, b, DISP20(d)); + return s390_emit_LTG(buf, R0, x, b, DISP20(d)); default: goto fail; @@ -9723,19 +9270,17 @@ s390_insn_compare_emit(UChar *buf, const s390_insn *insn) switch (insn->size) { case 4: if (signed_comparison) - return s390_emit_CFIw(buf, r1, value); + return s390_emit_CFI(buf, r1, value); else - return s390_emit_CLFIw(buf, r1, value); + return s390_emit_CLFI(buf, r1, value); case 8: - if (s390_host_has_eimm) { - if (signed_comparison) { - if (ulong_fits_signed_32bit(value)) - return s390_emit_CGFI(buf, r1, value); - } else { - if (ulong_fits_unsigned_32bit(value)) - return s390_emit_CLGFI(buf, r1, value); - } + if (signed_comparison) { + if (ulong_fits_signed_32bit(value)) + return s390_emit_CGFI(buf, r1, value); + } else { + if (ulong_fits_unsigned_32bit(value)) + return s390_emit_CLGFI(buf, r1, value); } buf = s390_emit_load_64imm(buf, R0, value); if (signed_comparison) @@ -10057,35 +9602,10 @@ s390_insn_clz_emit(UChar *buf, const s390_insn *insn) } default: - goto fail; - } - - /* Use FLOGR if you can */ - if (s390_host_has_eimm) { - return s390_emit_FLOGR(p, r1, r2); + vpanic("s390_insn_clz_emit"); } - /* - r0 = r2; - r1 = 64; - while (r0 != 0) { - r1 -= 1; - r0 >>= 1; - } - */ - p = s390_emit_LTGR(p, R0, r2); - p = s390_emit_LLILL(p, r1, 64); - - p = s390_emit_BRC(p, S390_CC_E, (4 + 4 + 6 + 4 + 4)/ 2); /* 4 bytes */ - p = s390_emit_AGHI(p, r1, (UShort)-1); /* r1 -= 1; 4 bytes */ - p = s390_emit_SRLG(p, R0, R0, R0, DISP20(1)); /* r0 >>= 1; 6 bytes */ - p = s390_emit_LTGR(p, R0, R0); /* set cc 4 bytes */ - p = s390_emit_BRC(p, S390_CC_NE, /* 4 bytes */ - (UShort)(-(4 + 6 + 4) / 2)); - return p; - - fail: - vpanic("s390_insn_clz_emit"); + return s390_emit_FLOGR(p, r1, r2); } @@ -10914,19 +10434,9 @@ s390_tchain_load64(UChar *buf, UChar regno, ULong value) { UChar *begin = buf; - if (s390_host_has_eimm) { - /* Do it in two steps: upper half [0:31] and lower half [32:63] */ - buf = s390_emit_IIHF(buf, regno, value >> 32); - buf = s390_emit_IILF(buf, regno, value & 0xFFFFFFFF); - } else { - buf = s390_emit_IILL(buf, regno, value & 0xFFFF); - value >>= 16; - buf = s390_emit_IILH(buf, regno, value & 0xFFFF); - value >>= 16; - buf = s390_emit_IIHL(buf, regno, value & 0xFFFF); - value >>= 16; - buf = s390_emit_IIHH(buf, regno, value & 0xFFFF); - } + /* Do it in two steps: upper half [0:31] and lower half [32:63] */ + buf = s390_emit_IIHF(buf, regno, value >> 32); + buf = s390_emit_IILF(buf, regno, value & 0xFFFFFFFF); vassert(buf - begin == s390_tchain_load64_len()); @@ -10937,10 +10447,7 @@ s390_tchain_load64(UChar *buf, UChar regno, ULong value) static UInt s390_tchain_load64_len(void) { - if (s390_host_has_eimm) { - return 6 + 6; /* IIHF + IILF */ - } - return 4 + 4 + 4 + 4; /* IIHH + IIHL + IILH + IILL */ + return 6 + 6; /* IIHF + IILF */ } /* Verify that CODE is the code sequence generated by s390_tchain_load64 @@ -10950,46 +10457,15 @@ static const UChar * s390_tchain_verify_load64(const UChar *code, UChar regno, ULong value) { UInt regmask = regno << 4; - UInt hw; - - if (s390_host_has_eimm) { - /* Check for IIHF */ - vassert(code[0] == 0xC0); - vassert(code[1] == (0x08 | regmask)); - vassert(*(const UInt *)&code[2] == (value >> 32)); - /* Check for IILF */ - vassert(code[6] == 0xC0); - vassert(code[7] == (0x09 | regmask)); - vassert(*(const UInt *)&code[8] == (value & 0xFFFFFFFF)); - } else { - /* Check for IILL */ - hw = value & 0xFFFF; - vassert(code[0] == 0xA5); - vassert(code[1] == (0x03 | regmask)); - vassert(code[2] == (hw >> 8)); - vassert(code[3] == (hw & 0xFF)); - - /* Check for IILH */ - hw = (value >> 16) & 0xFFFF; - vassert(code[4] == 0xA5); - vassert(code[5] == (0x02 | regmask)); - vassert(code[6] == (hw >> 8)); - vassert(code[7] == (hw & 0xFF)); - - /* Check for IIHL */ - hw = (value >> 32) & 0xFFFF; - vassert(code[8] == 0xA5); - vassert(code[9] == (0x01 | regmask)); - vassert(code[10] == (hw >> 8)); - vassert(code[11] == (hw & 0xFF)); - - /* Check for IIHH */ - hw = (value >> 48) & 0xFFFF; - vassert(code[12] == 0xA5); - vassert(code[13] == (0x00 | regmask)); - vassert(code[14] == (hw >> 8)); - vassert(code[15] == (hw & 0xFF)); - } + + /* Check for IIHF */ + vassert(code[0] == 0xC0); + vassert(code[1] == (0x08 | regmask)); + vassert(*(const UInt *)&code[2] == (value >> 32)); + /* Check for IILF */ + vassert(code[6] == 0xC0); + vassert(code[7] == (0x09 | regmask)); + vassert(*(const UInt *)&code[8] == (value & 0xFFFFFFFF)); return code + s390_tchain_load64_len(); } @@ -11000,21 +10476,10 @@ s390_tchain_verify_load64(const UChar *code, UChar regno, ULong value) static UChar * s390_tchain_patch_load64(UChar *code, ULong imm64) { - if (s390_host_has_eimm) { - /* Patch IIHF */ - *(UInt *)&code[2] = imm64 >> 32; - /* Patch IILF */ - *(UInt *)&code[8] = imm64 & 0xFFFFFFFF; - } else { - code[3] = imm64 & 0xFF; imm64 >>= 8; - code[2] = imm64 & 0xFF; imm64 >>= 8; - code[7] = imm64 & 0xFF; imm64 >>= 8; - code[6] = imm64 & 0xFF; imm64 >>= 8; - code[11] = imm64 & 0xFF; imm64 >>= 8; - code[10] = imm64 & 0xFF; imm64 >>= 8; - code[15] = imm64 & 0xFF; imm64 >>= 8; - code[14] = imm64 & 0xFF; imm64 >>= 8; - } + /* Patch IIHF */ + *(UInt *)&code[2] = imm64 >> 32; + /* Patch IILF */ + *(UInt *)&code[8] = imm64 & 0xFFFFFFFF; return code + s390_tchain_load64_len(); } diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index 9a66b2abc9..9b5e3f00ac 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -918,8 +918,6 @@ VexInvalRange patchProfInc_S390(VexEndness endness_host, extern UInt s390_host_hwcaps; /* Convenience macros to test installed facilities */ -#define s390_host_has_eimm \ - (s390_host_hwcaps & (VEX_HWCAPS_S390X_EIMM)) #define s390_host_has_gie \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_GIE)) #define s390_host_has_fgx \ diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index ae97ec182c..da3ccbd821 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1902,7 +1902,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps ) UInt hwcaps_bit; HChar name[6]; } hwcaps_list[] = { - { VEX_HWCAPS_S390X_EIMM, "eimm" }, { VEX_HWCAPS_S390X_GIE, "gie" }, { VEX_HWCAPS_S390X_FGX, "fgx" }, { VEX_HWCAPS_S390X_LSC, "lsc" }, diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index 710b3bb564..cef40335ef 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -162,7 +162,6 @@ typedef #define VEX_S390X_MODEL_UNKNOWN 19 /* always last in list */ #define VEX_S390X_MODEL_MASK 0x3F -#define VEX_HWCAPS_S390X_EIMM (1<<7) /* Extended-immediate facility */ #define VEX_HWCAPS_S390X_GIE (1<<8) /* General-instruction-extension facility */ #define VEX_HWCAPS_S390X_FGX (1<<10) /* FPR-GR transfer facility */ #define VEX_HWCAPS_S390X_LSC (1<<16) /* Conditional load/store facility */ @@ -180,8 +179,7 @@ typedef #define VEX_HWCAPS_S390X_MSA9 (1<<30) /* Message-security-assist extension 9 */ /* Special value representing all available s390x hwcaps */ -#define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_EIMM | \ - VEX_HWCAPS_S390X_GIE | \ +#define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_GIE | \ VEX_HWCAPS_S390X_FGX | \ VEX_HWCAPS_S390X_LSC | \ VEX_HWCAPS_S390X_PFPO | \ diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index 2c613708aa..e7aca5cb32 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1565,7 +1565,6 @@ Bool VG_(machine_get_hwcaps)( void ) UInt hwcaps_bit; const HChar name[6]; // may need adjustment for new facility names } fac_hwcaps[] = { - { False, 21, VEX_HWCAPS_S390X_EIMM, "EIMM" }, { False, 34, VEX_HWCAPS_S390X_GIE, "GIE" }, { False, 41, VEX_HWCAPS_S390X_FGX, "FGX" }, { False, 45, VEX_HWCAPS_S390X_LSC, "LSC" }, diff --git a/tests/s390x_features.c b/tests/s390x_features.c index 592b5487c8..593c8c556b 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -229,8 +229,6 @@ static int go(char *feature, char *cpu) match = (facilities[0] & FAC_BIT(1)) && (facilities[0] & FAC_BIT(2)); } else if (strcmp(feature, "s390x-n3") == 0 ) { match = facilities[0] & FAC_BIT(0); - } else if (strcmp(feature, "s390x-eimm") == 0 ) { - match = facilities[0] & FAC_BIT(21); } else if (strcmp(feature, "s390x-genins") == 0 ) { match = facilities[0] & FAC_BIT(34); } else if (strcmp(feature, "s390x-exrl") == 0 ) { |
|
From: Florian K. <fk...@so...> - 2025-11-24 22:32:12
|
https://sourceware.org/cgit/valgrind/commit/?id=623a7e49b8975331430f2e91c18da8e6f52e2e19 commit 623a7e49b8975331430f2e91c18da8e6f52e2e19 Author: Florian Krohm <fl...@ei...> Date: Mon Nov 24 22:31:44 2025 +0000 Fix a typo. Diff: --- VEX/pub/libvex_emnote.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VEX/pub/libvex_emnote.h b/VEX/pub/libvex_emnote.h index 432decb2b7..04a9e0a6e6 100644 --- a/VEX/pub/libvex_emnote.h +++ b/VEX/pub/libvex_emnote.h @@ -85,12 +85,12 @@ typedef EmWarn_PPC64_redir_underflow, /* Various BFP insns have an M4 field containing the - IEEE-inexact-exception (XxC) control bit. That bit cannot me modelled + IEEE-inexact-exception (XxC) control bit. That bit cannot be modelled in VEX and is expected to be zero. */ EmWarn_S390X_XxC_not_zero, /* Various DFP insns have an M4 field containing the - IEEE-invalid-operation (XiC) control bit. That bit cannot me modelled + IEEE-invalid-operation (XiC) control bit. That bit cannot be modelled in VEX and is expected to be zero. */ EmWarn_S390X_XiC_not_zero, |
|
From: Florian K. <fk...@so...> - 2025-11-24 18:40:18
|
https://sourceware.org/cgit/valgrind/commit/?id=9d2e3da555be7d8c874059436cfd425628f98149 commit 9d2e3da555be7d8c874059436cfd425628f98149 Author: Florian Krohm <fl...@ei...> Date: Mon Nov 24 18:39:39 2025 +0000 s390: ETF2/ETF3-enhancement facilities related cleanups (BZ 509562) The ETF2/ETF3-enhancement facilities are always present on the supported machines. - Remove VEX_HWCAPS_S390X_ETF2 and s390_host_has_etf2 - Remove VEX_HWCAPS_S390X_ETF3 and s390_host_has_etf3 - Update tests/s390x_features.c Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 Diff: --- VEX/priv/guest_s390_toIR.c | 14 +++++++------- VEX/priv/host_s390_defs.h | 4 ---- VEX/priv/main_main.c | 2 -- VEX/pub/libvex.h | 4 ---- coregrind/m_machine.c | 2 -- none/tests/s390x/cu12_1.vgtest | 1 - none/tests/s390x/cu14_1.vgtest | 1 - none/tests/s390x/cu21_1.vgtest | 1 - none/tests/s390x/cu24_1.vgtest | 1 - tests/s390x_features.c | 2 -- 10 files changed, 7 insertions(+), 25 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index fffd375ded..b01849cb67 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -15495,7 +15495,7 @@ s390_irgen_TROO(UChar m3, UChar r1, UChar r2) mkexpr(tab_addr))); assign(op1, load(Ity_I8, mkexpr(result))); - if (! s390_host_has_etf2 || (m3 & 0x1) == 0) { + if ((m3 & 0x1) == 0) { s390_cc_set_val(1); next_insn_if(binop(Iop_CmpEQ8, mkexpr(op1), mkexpr(test_byte))); } @@ -15545,7 +15545,7 @@ s390_irgen_TRTO(UChar m3, UChar r1, UChar r2) assign(op1, load(Ity_I8, mkexpr(result))); - if (! s390_host_has_etf2 || (m3 & 0x1) == 0) { + if ((m3 & 0x1) == 0) { s390_cc_set_val(1); next_insn_if(binop(Iop_CmpEQ8, mkexpr(op1), mkexpr(test_byte))); } @@ -15594,7 +15594,7 @@ s390_irgen_TROT(UChar m3, UChar r1, UChar r2) mkexpr(tab_addr))); assign(op1, load(Ity_I16, mkexpr(result))); - if (! s390_host_has_etf2 || (m3 & 0x1) == 0) { + if ((m3 & 0x1) == 0) { s390_cc_set_val(1); next_insn_if(binop(Iop_CmpEQ16, mkexpr(op1), mkexpr(test_byte))); } @@ -15643,7 +15643,7 @@ s390_irgen_TRTT(UChar m3, UChar r1, UChar r2) mkexpr(tab_addr))); assign(op1, load(Ity_I16, mkexpr(result))); - if (! s390_host_has_etf2 || (m3 & 0x1) == 0) { + if ((m3 & 0x1) == 0) { s390_cc_set_val(1); next_insn_if(binop(Iop_CmpEQ16, mkexpr(op1), mkexpr(test_byte))); } @@ -15789,7 +15789,7 @@ s390_irgen_CU21(UChar m3, UChar r1, UChar r2) /* Before we can test whether the 1st operand is exhausted we need to test for an invalid low surrogate. Because cc=2 outranks cc=1. */ - if (s390_host_has_etf3 && (m3 & 0x1) == 1) { + if ((m3 & 0x1) == 1) { IRExpr *invalid_low_surrogate = binop(Iop_And64, mkexpr(retval), mkU64(0xff)); @@ -15920,7 +15920,7 @@ s390_irgen_CU24(UChar m3, UChar r1, UChar r2) /* Before we can test whether the 1st operand is exhausted we need to test for an invalid low surrogate. Because cc=2 outranks cc=1. */ - if (s390_host_has_etf3 && (m3 & 0x1) == 1) { + if ((m3 & 0x1) == 1) { IRExpr *invalid_low_surrogate = binop(Iop_And64, mkexpr(retval), mkU64(0xff)); @@ -16202,7 +16202,7 @@ s390_irgen_cu12_cu14(UChar m3, UChar r1, UChar r2, Bool is_cu12) assign(len1, get_gpr_dw0(r1 + 1)); assign(len2, get_gpr_dw0(r2 + 1)); - UInt extended_checking = s390_host_has_etf3 && (m3 & 0x1) == 1; + UInt extended_checking = (m3 & 0x1) == 1; /* We're processing the 2nd operand 1 byte at a time. Therefore, if there is less than 1 byte left, then the 2nd operand is exhausted diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index 7a5b6f5522..9a66b2abc9 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -924,10 +924,6 @@ extern UInt s390_host_hwcaps; (s390_host_hwcaps & (VEX_HWCAPS_S390X_GIE)) #define s390_host_has_fgx \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_FGX)) -#define s390_host_has_etf2 \ - (s390_host_hwcaps & (VEX_HWCAPS_S390X_ETF2)) -#define s390_host_has_etf3 \ - (s390_host_hwcaps & (VEX_HWCAPS_S390X_ETF3)) #define s390_host_has_lsc \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_LSC)) #define s390_host_has_pfpo \ diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index 22eac293ee..ae97ec182c 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1905,8 +1905,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps ) { VEX_HWCAPS_S390X_EIMM, "eimm" }, { VEX_HWCAPS_S390X_GIE, "gie" }, { VEX_HWCAPS_S390X_FGX, "fgx" }, - { VEX_HWCAPS_S390X_ETF2, "etf2" }, - { VEX_HWCAPS_S390X_ETF3, "etf3" }, { VEX_HWCAPS_S390X_LSC, "lsc" }, { VEX_HWCAPS_S390X_PFPO, "pfpo" }, { VEX_HWCAPS_S390X_VX, "vx" }, diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index 1d1b3d7ec3..710b3bb564 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -165,8 +165,6 @@ typedef #define VEX_HWCAPS_S390X_EIMM (1<<7) /* Extended-immediate facility */ #define VEX_HWCAPS_S390X_GIE (1<<8) /* General-instruction-extension facility */ #define VEX_HWCAPS_S390X_FGX (1<<10) /* FPR-GR transfer facility */ -#define VEX_HWCAPS_S390X_ETF2 (1<<11) /* ETF2-enhancement facility */ -#define VEX_HWCAPS_S390X_ETF3 (1<<13) /* ETF3-enhancement facility */ #define VEX_HWCAPS_S390X_LSC (1<<16) /* Conditional load/store facility */ #define VEX_HWCAPS_S390X_PFPO (1<<17) /* Perform floating point ops facility */ #define VEX_HWCAPS_S390X_VX (1<<18) /* Vector facility */ @@ -186,8 +184,6 @@ typedef VEX_HWCAPS_S390X_GIE | \ VEX_HWCAPS_S390X_FGX | \ VEX_HWCAPS_S390X_LSC | \ - VEX_HWCAPS_S390X_ETF3 | \ - VEX_HWCAPS_S390X_ETF2 | \ VEX_HWCAPS_S390X_PFPO | \ VEX_HWCAPS_S390X_VX | \ VEX_HWCAPS_S390X_MSA5 | \ diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index 45f185d98a..2c613708aa 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1568,8 +1568,6 @@ Bool VG_(machine_get_hwcaps)( void ) { False, 21, VEX_HWCAPS_S390X_EIMM, "EIMM" }, { False, 34, VEX_HWCAPS_S390X_GIE, "GIE" }, { False, 41, VEX_HWCAPS_S390X_FGX, "FGX" }, - { False, 24, VEX_HWCAPS_S390X_ETF2, "ETF2" }, - { False, 30, VEX_HWCAPS_S390X_ETF3, "ETF3" }, { False, 45, VEX_HWCAPS_S390X_LSC, "LSC" }, { False, 44, VEX_HWCAPS_S390X_PFPO, "PFPO" }, { False, 129, VEX_HWCAPS_S390X_VX, "VX" }, diff --git a/none/tests/s390x/cu12_1.vgtest b/none/tests/s390x/cu12_1.vgtest index f712482932..6b224d3c21 100644 --- a/none/tests/s390x/cu12_1.vgtest +++ b/none/tests/s390x/cu12_1.vgtest @@ -1,2 +1 @@ -prereq: ../../../tests/s390x_features s390x-etf3 prog: cu12_1 diff --git a/none/tests/s390x/cu14_1.vgtest b/none/tests/s390x/cu14_1.vgtest index 330a2cf7a7..b722c3ab9a 100644 --- a/none/tests/s390x/cu14_1.vgtest +++ b/none/tests/s390x/cu14_1.vgtest @@ -1,2 +1 @@ -prereq: ../../../tests/s390x_features s390x-etf3 prog: cu14_1 diff --git a/none/tests/s390x/cu21_1.vgtest b/none/tests/s390x/cu21_1.vgtest index 153c7a4ee7..92f3ede249 100644 --- a/none/tests/s390x/cu21_1.vgtest +++ b/none/tests/s390x/cu21_1.vgtest @@ -1,2 +1 @@ -prereq: ../../../tests/s390x_features s390x-etf3 prog: cu21_1 diff --git a/none/tests/s390x/cu24_1.vgtest b/none/tests/s390x/cu24_1.vgtest index 992ccdce23..84372fb08c 100644 --- a/none/tests/s390x/cu24_1.vgtest +++ b/none/tests/s390x/cu24_1.vgtest @@ -1,2 +1 @@ -prereq: ../../../tests/s390x_features s390x-etf3 prog: cu24_1 diff --git a/tests/s390x_features.c b/tests/s390x_features.c index 1a5b4f5f78..592b5487c8 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -235,8 +235,6 @@ static int go(char *feature, char *cpu) match = facilities[0] & FAC_BIT(34); } else if (strcmp(feature, "s390x-exrl") == 0 ) { match = facilities[0] & FAC_BIT(35); - } else if (strcmp(feature, "s390x-etf3") == 0 ) { - match = facilities[0] & FAC_BIT(30); } else if (strcmp(feature, "s390x-pfpo") == 0 ) { match = facilities[0] & FAC_BIT(44); } else if (strcmp(feature, "s390x-highw") == 0 ) { |
|
From: Florian K. <fk...@so...> - 2025-11-24 18:17:16
|
https://sourceware.org/cgit/valgrind/commit/?id=c9ab89c34658f6f1464226896b3fbda423cd4c6e commit c9ab89c34658f6f1464226896b3fbda423cd4c6e Author: Florian Krohm <fl...@ei...> Date: Mon Nov 24 18:16:22 2025 +0000 s390: message-security-assist facility related cleanups (BZ 509562) The message-security-assist facility is always present on the supported machines. - Remove VEX_HWCAPS_S390X_MSA and s390_host_has_msa - Remove EmFail_S390X_msa Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 Diff: --- VEX/priv/guest_s390_toIR.c | 20 -------------------- VEX/priv/host_s390_defs.h | 2 -- VEX/priv/main_main.c | 5 ----- VEX/pub/libvex.h | 2 -- VEX/pub/libvex_emnote.h | 4 ---- coregrind/m_machine.c | 1 - 6 files changed, 34 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 58656966ff..fffd375ded 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -20079,10 +20079,6 @@ s390_irgen_NNPA(void) static const HChar * s390_irgen_KM(UChar r1, UChar r2) { - if (! s390_host_has_msa) { - emulation_failure(EmFail_S390X_msa); - return "km"; - } s390_insn_assert("km", r1 != 0 && r1 % 2 == 0 && r2 != 0 && r2 % 2 == 0); extension(S390_EXT_KM, r1 | (r2 << 4)); return "km"; @@ -20091,10 +20087,6 @@ s390_irgen_KM(UChar r1, UChar r2) static const HChar * s390_irgen_KMC(UChar r1, UChar r2) { - if (! s390_host_has_msa) { - emulation_failure(EmFail_S390X_msa); - return "kmc"; - } s390_insn_assert("kmc", r1 != 0 && r1 % 2 == 0 && r2 != 0 && r2 % 2 == 0); extension(S390_EXT_KMC, r1 | (r2 << 4)); return "kmc"; @@ -20103,10 +20095,6 @@ s390_irgen_KMC(UChar r1, UChar r2) static const HChar * s390_irgen_KIMD(UChar r1, UChar r2) { - if (! s390_host_has_msa) { - emulation_failure(EmFail_S390X_msa); - return "kimd"; - } /* r1 is reserved */ s390_insn_assert("kimd", r2 != 0 && r2 % 2 == 0); extension(S390_EXT_KIMD, r1 | (r2 << 4)); @@ -20116,10 +20104,6 @@ s390_irgen_KIMD(UChar r1, UChar r2) static const HChar * s390_irgen_KLMD(UChar r1, UChar r2) { - if (! s390_host_has_msa) { - emulation_failure(EmFail_S390X_msa); - return "klmd"; - } /* r1 is only used by some functions */ s390_insn_assert("klmd", r2 != 0 && r2 % 2 == 0); extension(S390_EXT_KLMD, r1 | (r2 << 4)); @@ -20129,10 +20113,6 @@ s390_irgen_KLMD(UChar r1, UChar r2) static const HChar * s390_irgen_KMAC(UChar r1, UChar r2) { - if (! s390_host_has_msa) { - emulation_failure(EmFail_S390X_msa); - return "kmac"; - } /* r1 is ignored */ s390_insn_assert("kmac", r2 != 0 && r2 % 2 == 0); extension(S390_EXT_KMAC, r1 | (r2 << 4)); diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index c668a182ca..7a5b6f5522 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -950,8 +950,6 @@ extern UInt s390_host_hwcaps; (s390_host_hwcaps & (VEX_HWCAPS_S390X_VXE2)) #define s390_host_has_vxd \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_VXD)) -#define s390_host_has_msa \ - (s390_host_hwcaps & (VEX_HWCAPS_S390X_MSA)) #define s390_host_has_msa8 \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_MSA8)) #define s390_host_has_msa9 \ diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index 05937d32fa..22eac293ee 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1577,10 +1577,6 @@ const HChar* LibVEX_EmNote_string ( VexEmNote ew ) return "Encountered an instruction that requires the vector-packed-decimal\n" " facility.\n" " That facility is not available on this host"; - case EmFail_S390X_msa: - return "Encountered an instruction that requires the message-security" - " assist.\n" - " That assist is not available on this host"; case EmFail_S390X_msa8: return "Encountered an instruction that requires the" " message-security-assist extension 8.\n" @@ -1922,7 +1918,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps ) { VEX_HWCAPS_S390X_DFLT, "dflt" }, { VEX_HWCAPS_S390X_VXE2, "vxe2" }, { VEX_HWCAPS_S390X_VXD, "vxd" }, - { VEX_HWCAPS_S390X_MSA, "msa" }, { VEX_HWCAPS_S390X_MSA8, "msa8" }, { VEX_HWCAPS_S390X_MSA9, "msa9" }, }; diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index 4ff407c1e2..1d1b3d7ec3 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -178,7 +178,6 @@ typedef #define VEX_HWCAPS_S390X_DFLT (1<<24) /* Deflate-conversion facility */ #define VEX_HWCAPS_S390X_VXE2 (1<<25) /* Vector-enhancements facility 2 */ #define VEX_HWCAPS_S390X_VXD (1<<26) /* Vector packed-decimal facility */ -#define VEX_HWCAPS_S390X_MSA (1<<27) /* Message-security assist */ #define VEX_HWCAPS_S390X_MSA8 (1<<29) /* Message-security-assist extension 8 */ #define VEX_HWCAPS_S390X_MSA9 (1<<30) /* Message-security-assist extension 9 */ @@ -199,7 +198,6 @@ typedef VEX_HWCAPS_S390X_DFLT | \ VEX_HWCAPS_S390X_VXE2 | \ VEX_HWCAPS_S390X_VXD | \ - VEX_HWCAPS_S390X_MSA | \ VEX_HWCAPS_S390X_MSA8 | \ VEX_HWCAPS_S390X_MSA9) diff --git a/VEX/pub/libvex_emnote.h b/VEX/pub/libvex_emnote.h index 3f5821d523..432decb2b7 100644 --- a/VEX/pub/libvex_emnote.h +++ b/VEX/pub/libvex_emnote.h @@ -130,10 +130,6 @@ typedef this host */ EmFail_S390X_vxd, - /* insn needs message-security assist which is not available on - this host */ - EmFail_S390X_msa, - /* insn needs message-security-assist extension 8 which is not available on this host */ EmFail_S390X_msa8, diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index cdb0ca9a94..45f185d98a 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1581,7 +1581,6 @@ Bool VG_(machine_get_hwcaps)( void ) { False, 165, VEX_HWCAPS_S390X_NNPA, "NNPA" }, { False, 148, VEX_HWCAPS_S390X_VXE2, "VXE2" }, { False, 134, VEX_HWCAPS_S390X_VXD, "VXD" }, - { False, 17, VEX_HWCAPS_S390X_MSA, "MSA" }, { False, 146, VEX_HWCAPS_S390X_MSA8, "MSA8" }, { False, 155, VEX_HWCAPS_S390X_MSA9, "MSA9" }, }; |